Skip to content

feat: target ontology adapter protocol and manifest loader#109

Merged
deanban merged 1 commit into
mainfrom
dean/feat/target-ontology-adapter
May 8, 2026
Merged

feat: target ontology adapter protocol and manifest loader#109
deanban merged 1 commit into
mainfrom
dean/feat/target-ontology-adapter

Conversation

@deanban

@deanban deanban commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds TargetOntologyAdapter protocol (PEP 544) with declarative target-side DTOs in src/sema/models/target/ and the src/sema/targets/ package mirroring connectors/.
  • Three-stage loader pipeline (normalizer → hashing → materializer) with hash-versioned identity for Entity/Property/Constraint/TargetObligation/EnrichmentDecision/Term, per-facet EnrichmentDecisionRecords, and is_current flips scoped to the loaded subset.
  • ManifestTargetAdapter as the protocol's golden compliance fixture (YAML/JSON), plus version-aware registry, entry-point discovery hook, and sema target load --manifest <path> CLI surface.

Closes

Closes #97, #98, #99, #100, #101, #102, #103, #104, #105, #106, #107

Test plan

  • uv run pytest tests/unit/targets/ tests/unit/models/target/ -q — 166+ unit tests pass
  • uv run mypy src/sema/targets/ src/sema/models/target/ src/sema/graph/target_loader_migrations.py — clean
  • Integration round-trip against live Neo4j (tests/integration/targets/test_target_loader_round_trip.py)
  • Manual smoke: sema target load --manifest tests/unit/targets/fixtures/golden_manifest.yaml

Adds TargetOntologyAdapter protocol with declarative target-side DTOs,
three-stage loader (normalize, hash, materialize), per-facet enrichment
decisions, hash-versioned identity for schema-bearing nodes, and
ManifestTargetAdapter as the protocol's golden compliance fixture.

Signed-off-by: deanban <3989225+deanban@users.noreply.github.com>
@deanban deanban merged commit ea2aed7 into main May 8, 2026
3 checks passed
@deanban deanban deleted the dean/feat/target-ontology-adapter branch May 8, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: target-ontology-adapter (umbrella tracking issue)

1 participant