Expand description
Phase 6 — Fork diff & promote types.
ForkDiff describes the structural delta between two fork views
(or a fork and primary). The convention is forward: diff(a, b)
is the delta that, if applied to a, would produce b. So
added rows exist in b only, deleted exist in a only, and
changed is a per-row before/after on rows with matching identity.
Identity is UniId for vertices and (src_uid, dst_uid, type)
for edges. Both are content-addressed (vertex UID = SHA3-256 of
(label, ext_id, properties); edge UID is the tuple of endpoint
UIDs plus the edge type), so the diff is correct across two
unrelated forks that happen to have rolled the same VIDs. The
per-side VID is preserved on DiffVertex as informational; pairing
never depends on it.
Phase 6a (the initial MVP) keyed diffs by VID. Phase 6b lifted identity to UID so siblings-off-a-shared-parent and totally unrelated forks compare correctly.
PromotePattern is the spec for what to scan on a fork during
Uni::promote_from_fork. Phase 6 supports the most common shape
(label + optional Cypher WHERE clause); future phases may grow
relationship-aware patterns.
Structs§
- Diff
Edge - An edge row from one side of a diff.
- Diff
Vertex - A vertex row from one side of a diff.
- Edge
Diff - Edge-side of
ForkDiff. - Edge
Property Change - A change to one edge’s properties.
- Fork
Diff - The full delta from one fork view to another.
- Promote
Report - Outcome of
Uni::promote_from_fork. - Property
Change - A single property’s before/after pair.
- Vertex
Diff - Vertex-side of
ForkDiff. - Vertex
Property Change - A change to one vertex’s properties.
Enums§
- Promote
Pattern - Selector for
Uni::promote_from_fork.