Skip to main content

Module types

Module types 

Source
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§

DiffEdge
An edge row from one side of a diff.
DiffVertex
A vertex row from one side of a diff.
EdgeDiff
Edge-side of ForkDiff.
EdgePropertyChange
A change to one edge’s properties.
ForkDiff
The full delta from one fork view to another.
PromoteReport
Outcome of Uni::promote_from_fork.
PropertyChange
A single property’s before/after pair.
VertexDiff
Vertex-side of ForkDiff.
VertexPropertyChange
A change to one vertex’s properties.

Enums§

PromotePattern
Selector for Uni::promote_from_fork.