Expand description
What the Vault does when a record arrives from another machine (docs/specs/SPEC_VAULT_SHARED_ACROSS_MACHINES_LAN_AND_CLOUD_2026_11_01.md
sections 6.2 to 6.5): the answer the sync layer asks of an adapter, Applied, KeptLocal or Conflict(both).
A value is never merged and never lost to a clock. When two machines change an entry before either has seen the
other’s change, the later version becomes current and the other is kept, as a version called “changed on
Every function is pure over versions and tags: no store, no clock, no network. The records’ bodies stay sealed in
super::sync_seal; what is decided here needs only their versions.
Structs§
- Change
- A record arriving from another machine, as far as the merge needs to know it.
- Held
- What this machine holds of the same record.
Enums§
- Decision
- The adapter’s answer to the layer (spec 6.3).
- Kept
- The state of the version that did not become current.
- Side
- Which of two versions is the one every machine uses from now on.
Functions§
- merge
- What to do with
changewhen this machine holdsheld(None, or no versions, if it has never had the record). - only_
here - After a full resync: the records only this machine has (
mine, againsttheirs, the ids every other member holds). They are shown to the person as “Only on this machine: keep or delete”, never brought back or deleted silently. - union_
tags a’s tags, then those ofbthatadoes not have.