Expand description
A record from another machine, taken into the Vault (docs/specs/SPEC_VAULT_SHARED_ACROSS_MACHINES_LAN_AND_CLOUD_2026_11_01.md
sections 6.2 to 6.5): the other half of super::sync_capture, which writes this machine’s changes into the log.
Taker::receive hands a record to the sync layer with the Vault’s adapter (super::sync_adapter), and when the layer
makes it, or keeps it as the other side of a conflict, puts the result in the store:
- A change that follows on from what this machine holds replaces the entry’s value. The value it replaces is kept for 7 days as a version, like an edit made here.
- A change made apart from what this machine holds is a conflict, and a value is never merged: the later version is the
entry’s value on every machine, and the other is kept as a version that says “changed on
at the same time” ( versions::KEPT_PREFIX) and is not pruned. Only the tags are merged, as a union. - A tombstone deletes the entry, its versions and its grants, unless the entry has moved to another Vault, or a rotation of it is waiting to be confirmed (then the delete is the kept side of a conflict, and the entry stays).
- A change to an entry this machine deleted brings the entry back when it is the later of the two, under the id the record names, and the delete is kept as a version that holds no value.
A record names an entry by one of its link ids (sync_links), and never makes a second entry for an id that one entry
has. A new entry is made with the ids the record carries, the record’s own first, in the same transaction as its row, so a
capture can never give a taken entry an id of its own in between.
What the person keeps to themselves on this machine stays: the agents an entry is shared with and when it was last used are
not replaced (EntryBody::into_row). What arrives is checked first: a kind this machine does not know, or a secret part the
kind does not have, is not taken.
Where a conflict keeps nothing in the store, the side that lost is still in the log, sealed: when the entry is deleted (a
change made apart from a delete has nowhere to be kept once the entry is gone), and when the entry is not here to attach it to.
A pane that lists conflicts reads it from there; this module only says so (Effect::KeptInLog).
Taking and capturing run one at a time on one worker: both read the store, then write it, and neither locks the other out.
Structs§
- Taken
- What
Taker::receivedid: what the layer made of the record, what the store did, and the version a conflict kept. - Taker
- This machine’s side of the sync layer for the Vault: its store, the Vault’s keys, this machine’s own key, and its profiles.
Enums§
- Effect
- What taking a record did to the store.