Change Detection / Diff
August 7, 2026 · View on GitHub
Diffing two read targets uses a three-level algorithm:
- Manifest diff: skip sub-tables whose
(table_version, table_branch)is unchanged. - Lineage check:
- Same branch lineage → fast path: use the per-row
_row_last_updated_at_versioncolumn to classify Insert/Update/Delete. - Different lineages → ID-based streaming comparison.
- Same branch lineage → fast path: use the per-row
- Row-level diff: streaming, no full materialization.
Public API
diff_between(from: ReadTarget, to: ReadTarget, filter: Option<ChangeFilter>) -> ChangeSetdiff_commits(from_commit_id, to_commit_id, filter)— cross-branch safe.
Types
ChangeOp: Insert | Update | Delete
EntityKind: Node | Edge
EntityChange { table_key, kind, type_name, id, op, manifest_version, endpoints?: {src, dst} }
ChangeFilter { kinds?, type_names?, ops? }
ChangeSet { from_version, to_version, branch?, changes[], stats }
Ordering
Changed table lifetimes are grouped in ascending graph-visible table_key
order, with immutable table identity as the hidden tie-breaker when one alias
names multiple lifetimes across the compared snapshots. Entity order within one
table is not a public guarantee; callers that need their own total order must
sort the returned changes explicitly.