Sync and conflicts

How sync works

Every change accepted on a node is appended to that node's own log of signed changes, stamped with a clock and signed by the device key. Paired nodes send each other what the other lacks every 20 seconds, verify every signature, and apply everything in the same order. Same changes, same order: every node ends up the same. A restart resumes where it stopped.

Your vaults sync on the same log, as text that merges: two devices editing the same document at once keep both edits, with no conflict markers. Front-matter fields merge one by one, the later change of a field winning. (The Docs vault is the exception: each node writes it from its own release; see The Docs vault.)

How records merge

Each contract says, action by action, how concurrent changes merge:

RuleMeaningExample
commutesBoth apply, in any orderTwo people adding to the same grocery list
last_writerThe later one winsRenaming a list on two devices
exclusiveOnly one can apply; the other is a conflictApproving or paying the same invoice twice

Actions that declare nothing are exclusive, so nothing merges silently that wasn't designed to. Contract authors: Merge rules for sync.

Didn't merge

When a change from another device no longer applies here (the same thing changed on both while apart), it is kept as a conflict. Nothing is dropped.

Settings → Devices and sync → Didn't merge lists each one: the action, the record, which device sent it, and why it didn't apply. Open What it carried to see its arguments, do what is right (redo it, or not), then write what you did ("Kept this device's version") and press Settle.

Limits today

  • Your accomplice's own records (conversations, memory, approvals) do not sync between nodes yet. Coming soon
  • Records created before a node kept its log do not travel.
  • A move of a document syncs as a delete and a create.