Skip to content

feat: target-ontology-adapter §5 Materializer + graph storage #102

@deanban

Description

@deanban

Neo4j materialization for model_role=TARGET nodes plus EnrichmentDecision storage. Includes GraphWriter protocol, idempotent MERGE keys, edge-endpoint constraint nodes, integrity check between compact Entity.enrichment_<facet>_status and structured EnrichmentDecision, and the new Cypher migration.

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

Tasks

  • 5.1 GraphWriter Protocol
  • 5.2 Neo4jGraphWriter concrete impl
  • 5.3 InMemoryGraphWriter test double
  • 5.4 TargetModelMaterializer.write
  • 5.5 Entity writes with compact enrichment_<facet>_status props
  • 5.6 Property writes
  • 5.7 Term writes (only when present)
  • 5.8 Constraint writes
  • 5.9 TargetObligation writes
  • 5.10 EnrichmentDecision node + :HAS_ENRICHMENT_DECISION
  • 5.10a Edge-endpoint Constraint nodes
  • 5.10b EnrichmentStatusDivergenceError integrity check
  • 5.11 Idempotent MERGE keys
  • 5.12 Cypher migration (label, rel, uniqueness, indexes)
  • 5.13 Reversible down-migration
  • 5.14 InMemory writer sequence tests
  • 5.15 Idempotency tests
  • 5.16 model_role=TARGET on every write
  • 5.17 Integration: golden-manifest round-trip
  • 5.18 Integration: idempotency in Neo4j
  • 5.19 Integration: two snapshot-hash generations coexist
  • 5.20 Integration: enrichment-status indexed query (EXPLAIN)
  • 5.20a Integration: edge-endpoint constraint payload

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