Skip to content

feat: target-ontology-adapter §4 Loader pipeline #101

@deanban

Description

@deanban

adapter -> normalizer -> hasher -> materializer loader pipeline: cross-reference resolution, deterministic snapshot hashing, per-facet EnrichmentDecisionRecord derivation, context-card hashing/drift detection, and the LoadedTarget output.

Tracking: #97. Source: openspec/changes/target-ontology-adapter/tasks.md §4.

Tasks

  • 4.1 NormalizedTargetModel value object
  • 4.2 TargetModelNormalizer.normalize
  • 4.3 Dangling property-ref resolution
  • 4.4 Dangling vocabulary-ref resolution
  • 4.5 Dangling FK-ref resolution
  • 4.6 Stable ordering invariants
  • 4.7 Reject DTOs carrying snapshot_hash field
  • 4.8 SnapshotHasher.hash (SHA-256 hex)
  • 4.9 Canonical-JSON serializer
  • 4.10 Pinned golden-manifest digest
  • 4.11 Facet + EnrichmentStatus enums
  • 4.11a FacetDecision model
  • 4.11b EnrichmentDecisionRecord (all five facets)
  • 4.12 Effective-completeness resolution
  • 4.13 Per-facet derivation rules
  • 4.13a One record per entity composition
  • 4.13b iter_terms NotImplementedError -> EXTERNAL routing
  • 4.14 enrichment.skip_facets build-config opt-out
  • 4.14a card_hash computation in loader
  • 4.14b CardContentDriftError
  • 4.14c aggregate_context_card_version derivation
  • 4.15 LoadedTarget model
  • 4.16 load_target orchestration
  • 4.17 Stage-counter spy for ordering invariant
  • 4.18 Cross-ref rejection tests
  • 4.19 Ordering-invariance tests
  • 4.20 Hasher determinism tests
  • 4.21 Hasher rejects snapshot_hash test
  • 4.22 Pinned-digest CI test
  • 4.23 Per-facet derivation table-driven tests
  • 4.23a One-record-per-entity test
  • 4.23b card_hash determinism + drift tests
  • 4.23c aggregate_context_card_version tests
  • 4.24 skip_facets opt-out tests
  • 4.25 Lazy selected_refs test
  • 4.26 LoaderStageOrderError test

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions