Skip to content

feat(cdc): define graph change feed and land C0 foundation - #446

Open
aaltshuler wants to merge 1 commit into
mainfrom
codex/graph-cdc-foundation
Open

feat(cdc): define graph change feed and land C0 foundation#446
aaltshuler wants to merge 1 commit into
mainfrom
codex/graph-cdc-foundation

Conversation

@aaltshuler

@aaltshuler aaltshuler commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add RFC-0030 for a graph-commit change feed derived from existing manifest lineage and Lance history
  • extract immutable-identity table intervals for shared net-diff and future per-commit CDC derivation
  • classify direct first-parent adjacency in O(1) without an ancestry index or history walk
  • pin the Lance exact-end DatasetDelta requirement and stable row/version columns across every graph table in the shared fixture

Scope

This is C0 only. It adds no public feed API, cursor, WAL, coordinator, tombstone store, or persistent state. Existing diff_commits remains a net-current comparison.

Validation

  • cargo test -p omnigraph-engine --test changes --locked
  • cargo test -p omnigraph-engine --test lance_surface_guards --locked
  • cargo test -p omnigraph-engine --test forbidden_apis --locked
  • scripts/check-agents-md.sh
  • git diff --check

Greptile Summary

This PR establishes the C0 foundation for commit-oriented CDC without exposing a feed API or adding persistent feed state.

  • Extracts immutable-identity table intervals and reuses them in the existing net-current diff.
  • Adds direct first-parent adjacency classification while preserving current diff_commits semantics.
  • Pins Lance exact-end delta behavior and graph-table row/version-column assumptions with runtime guards.
  • Documents the proposed graph change-feed and retained-history contract in RFC-0030.

Confidence Score: 5/5

The PR appears safe to merge; the executable changes preserve current diff semantics and add well-scoped CDC foundation types and guards.

Identity-based interval extraction matches the manifest’s immutable table-lifetime model, and first-parent classification returns the same resolved commits to the unchanged net-diff path.

Important Files Changed

Filename Overview
crates/omnigraph/src/changes/mod.rs Extracts stable identity-keyed table intervals and preserves the existing diff behavior while making table traversal deterministic.
crates/omnigraph/src/db/graph_coordinator.rs Adds O(1) direct first-parent classification from the child commit’s persisted parent pointer.
crates/omnigraph/src/db/commit_graph.rs Introduces a crate-private typed container for a first-parent graph transition.
crates/omnigraph/src/db/omnigraph.rs Routes diff_commits through range classification while reducing both variants to the original endpoint pair.
crates/omnigraph/tests/lance_surface_guards.rs Adds runtime guards for exact-end DatasetDelta images and stable row/version columns across graph tables.
crates/omnigraph/tests/forbidden_apis.rs Registers the new coordinator read-only method with the repository’s closed-surface guard.
docs/dev/testing.md Updates the test ownership map for CDC foundation coverage.
docs/rfcs/0030-cdc-time-travel.md Defines the draft graph-commit feed, cursor, retention, row-image, and ordering contracts while clearly separating future phases from C0.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[From commit ID] --> C[Resolve commit range]
  B[To commit ID] --> C
  C --> D{Child points to from as first parent?}
  D -->|Yes| E[FirstParent edge]
  D -->|No| F[Arbitrary range]
  E --> G[Resolve exact manifest snapshots]
  F --> G
  G --> H[Pair table endpoints by immutable identity]
  H --> I[Existing net-current row diff]
Loading

Reviews (1): Last reviewed commit: "feat(cdc): establish graph change-feed f..." | Re-trigger Greptile

Context used (3)

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