Skip to main content

Module sync

Module sync 

Source
Expand description

Reconcile two Stores. Any store can be a sync peer. Append-only kinds auto-merge by union; structured/opaque divergences are surfaced as conflicts. sync_with_ancestry 3-way-merges structured bodies against their real common ancestor when an AncestryStore retains it; sync uses an empty base (correct for append-only union, safe otherwise) — see ADR 0016.

Structs§

SyncConflict
A divergence that could not be auto-merged and needs caller/CLI resolution.
SyncReport
What a sync run did.

Functions§

sync
Reconcile stores a and b. After a clean run (no conflicts), both stores hold the same set of records for every key.
sync_with_ancestry
As sync, but 3-way-merges divergent Structured bodies against their real common ancestor when one is available. ancestry is a content-addressed store of past bodies keyed by revision hash (see AncestryStore): when two records diverge from a shared parent revision whose body it holds, that body is the merge base; otherwise sync falls back to the empty base (ADR 0016).