Graph ingestion: evidence-bound entities and relations (#49)#65
Conversation
…"Ingest evidence-bound graph entities and relations","intent":"Implement issue 49 ingestion from add_note and add_event into graph tables","impact":"Persists graph facts with evidence links and adds validation, field_path, tests, and docs","breaking":false,"risk":"medium","refs":["gh:#49","gh:#56"]}
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3238168ff8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let Some(structured) = args.structured | ||
| && structured.has_graph_fields() |
There was a problem hiding this comment.
Validate graph-only structured notes before persisting
This new persistence path runs for any extracted note with entities/relations, but reject_extracted_note_if_structured_invalid still skips validation when structured.is_effectively_empty() is true (and that helper only considers summary/facts/concepts). In the add_event flow, a graph-only note can therefore bypass evidence-binding checks and write unsupported relations to graph_facts instead of being rejected with REJECT_STRUCTURED_INVALID, which corrupts graph quality whenever the extractor emits only graph fields.
Useful? React with 👍 / 👎.
Implements #49 (depends on #64): extend ingestion to support evidence-bound entities/relations and persist them into the graph tables.
Key changes
structured.entities+structured.relationson add_note, and extractor output supports the same on add_event.field_pathsurfaced onREJECT_STRUCTURED_INVALID.Verification
cargo make fmt-rust-checkcargo make lintcargo make test-rustset -a && source .env && set +a && cargo make test-integrationset -a && source .env && set +a && ELF_QDRANT_HTTP_URL=http://127.0.0.1:51889 cargo make e2e