Grounding Wiring Service
Materialises (:Proposition)-[:GROUNDED_IN]->(:<entity>) edges by walking each proposition's existing grounding: List<String> and, for every id that resolves via NamedEntityDataRepository.findById, writing the edge to the resolved entity.
What this gives consumers. Edge-anchored provenance — given any KG edge or proposition you can trace back to the actual source entity (EmailSignal, MeetingSignal, Document, WebPage, File, …) the system was reading when it inferred the fact. One-hop graph query instead of an opaque string id.
Backward-compatible by design.
Proposition.groundingis unchanged — still aList<String>.Ids that don't resolve to a stored entity (legacy chunk hashes, free-text fingerprints, message-level ids that don't have their own entity row) are silently skipped — no edge written, no error.
Idempotent via NamedEntityDataRepository.mergeRelationship: re-running over the same propositions does not duplicate edges.
Any entity type the dictionary knows about is a valid target; the wiring doesn't care which.
Convention for grounding ids that should anchor edges. Pass the entity's stable id verbatim — EmailSignal.id, MeetingSignal.id, Document.id, etc. — into Proposition.grounding. The extractor populating grounding decides the contract; this service just follows what's there.
Wired into com.embabel.dice.proposition.extraction.IncrementalPropositionExtraction via an optional ctor parameter; consumers that don't supply one see no behaviour change.
Constructors
Functions
Walk propositions and write GROUNDED_IN edges for every grounding id that resolves to a stored entity. Returns a small report; most callers just want to log the count.