Sync conflict strategies for offline-first capture forms

Once a record can change in two places, you need a resolution rule. Most teams pick one implicitly by writing the sync code first and discovering the rule later, which is how silent data loss ships.

The options

StrategyCostFails when
Append-onlyLowestRecords genuinely need editing after capture
Last-write-winsLowTwo edits race; one is discarded silently
Per-field mergeMediumFields are semantically coupled
CRDTHighRarely — but the machinery outweighs the problem for a sign-in form

Why append-only usually wins for capture

A sign-in is an event, not a mutable row. The visitor typed their details at a moment in time; nothing later changes what they typed. Modelling it as an append-only log removes conflicts by construction — there is no second writer to disagree with.

Edits then become new events rather than mutations, and the current state is a fold over the log. You get an audit trail for free, which matters when the data is someone's contact information.

Idempotency is the other half

Retries are guaranteed on a flaky connection, so the server must dedupe. Generate a UUID on the device at capture time and use it as the idempotency key. Do not key on (email, listing) — the same visitor can legitimately sign in at two open houses on the same afternoon.