Skip to content

Graph ingestion: evidence-bound entities and relations (#49)#65

Merged
aurexav merged 1 commit intomainfrom
review/issue-49-graph-ingestion
Feb 19, 2026
Merged

Graph ingestion: evidence-bound entities and relations (#49)#65
aurexav merged 1 commit intomainfrom
review/issue-49-graph-ingestion

Conversation

@aurexav
Copy link
Member

@aurexav aurexav commented Feb 19, 2026

Implements #49 (depends on #64): extend ingestion to support evidence-bound entities/relations and persist them into the graph tables.

Key changes

  • API/contract: structured.entities + structured.relations on add_note, and extractor output supports the same on add_event.
  • Validation: strict evidence binding for relation subject/predicate/object; optional per-note field_path surfaced on REJECT_STRUCTURED_INVALID.
  • Persistence: upserts graph entities/aliases and active facts; duplicates attach evidence via conflict-safe upsert (no aborted transactions).
  • Tests/docs: acceptance coverage for graph ingestion + duplicate evidence; spec docs updated.

Verification

  • cargo make fmt-rust-check
  • cargo make lint
  • cargo make test-rust
  • set -a && source .env && set +a && cargo make test-integration
  • set -a && source .env && set +a && ELF_QDRANT_HTTP_URL=http://127.0.0.1:51889 cargo make e2e

…"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"]}
Base automatically changed from review/issue-48-graph-memory to main February 19, 2026 07:04
@aurexav aurexav merged commit 3238168 into main Feb 19, 2026
4 of 5 checks passed
@aurexav aurexav deleted the review/issue-49-graph-ingestion branch February 19, 2026 07:04
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +449 to +450
if let Some(structured) = args.structured
&& structured.has_graph_fields()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant