PropositionGraphMapper

Converts between the dice Proposition (system of record) and its Drivine graph projections. Enums are stored as their name; TemporalMetadata is flattened to scalar node properties; metadata rides along as a Drivine @PropertyBag.

Two views over the same :Proposition node:

  • PropositionView — lean (mentions only); the bulk/query/vector workhorse, and now the read side of every path. toProposition from it returns a Proposition with empty provenanceEntries (provenance isn't projected).

  • PropositionWithProvenanceView — adds DERIVED_FROM → shared SourceNode. Sources are MERGEd by SourceLocator.key(), so a source cited by many propositions is one node. Provenance writes and reads moved to raw Cypher, keyed by evidence identity, so parallel source revisions keep their own edges; what still runs through this view is the DELETE_ORPHAN cascade in DrivinePropositionRepository.delete, which takes every edge a proposition has and prunes only the sources left with no citations.

The graph carries an embedding that is not part of Proposition; the repository owns it and passes it in. EntityMention.hints is not yet persisted.

Functions

Link copied to clipboard

Full view: mentions + provenance (DERIVED_FROM → shared SourceNode).

Link copied to clipboard
fun toView(p: Proposition, embedding: List<Float>? = null): PropositionView

Lean view: mentions only.