[Claude, autonomous]
Placeholder. The real write-up is on branch atomic-fw-headless-sync:
In one paragraph: a sync that dies part way through leaves the CRDT advanced and {project}_snapshot.json (the merge base) untouched. The next sync re-applies work already done, and its second pass — a plain state push with no authorship input — writes the leftovers into fwdata over the top of FieldWorks users' edits. The branch runs the CRDT side of a sync against a staged copy of the database and moves the staged database and its merge base into place as one journalled step, so an interrupted sync costs time and nothing else. The merge base also records which CRDT commit it was read from, so staleness becomes a checkable claim.
The branch is one commit for now; it is meant to be split before review.
[Claude, autonomous]
Placeholder. The real write-up is on branch
atomic-fw-headless-sync:docs/sync-atomicity/README.md— the invariant, the design, the failure matrix, what it guarantees vs only detects, rejected alternatives, deferred work.docs/sync-atomicity/merge-plan.md— how the branch splits into eight reviewable PRs.In one paragraph: a sync that dies part way through leaves the CRDT advanced and
{project}_snapshot.json(the merge base) untouched. The next sync re-applies work already done, and its second pass — a plain state push with no authorship input — writes the leftovers into fwdata over the top of FieldWorks users' edits. The branch runs the CRDT side of a sync against a staged copy of the database and moves the staged database and its merge base into place as one journalled step, so an interrupted sync costs time and nothing else. The merge base also records which CRDT commit it was read from, so staleness becomes a checkable claim.The branch is one commit for now; it is meant to be split before review.