feat: target ontology adapter protocol and manifest loader#109
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TargetOntologyAdapterprotocol (PEP 544) with declarative target-side DTOs insrc/sema/models/target/and thesrc/sema/targets/package mirroringconnectors/.normalizer → hashing → materializer) with hash-versioned identity forEntity/Property/Constraint/TargetObligation/EnrichmentDecision/Term, per-facetEnrichmentDecisionRecords, andis_currentflips scoped to the loaded subset.ManifestTargetAdapteras the protocol's golden compliance fixture (YAML/JSON), plus version-aware registry, entry-point discovery hook, andsema 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 passuv run mypy src/sema/targets/ src/sema/models/target/ src/sema/graph/target_loader_migrations.py— cleantests/integration/targets/test_target_loader_round_trip.py)sema target load --manifest tests/unit/targets/fixtures/golden_manifest.yaml