Sync protocol
Intent objects
Every edit is expressed as an intent: a semantic operation ("insert character at paragraph P position C", "check task T", "move calendar event E to time X"). Intents are content-addressed by SHA-256 over their canonical serialisation.
Local commit
Intents are applied to the local DOM immediately, appended to a local intent log, and flushed to the region every 60 ms or when the log crosses 24 KB.
Region reconciliation
Concurrent intents are ordered by (workspace Lamport timestamp, session UUID). The reconciler applies each intent to the authoritative state, records the resulting hash, and writes both intent and hash to the durable log.
Fan-out
Reconciled intents are pushed to every live sync socket for the workspace over a persistent HTTP/2 stream. Receiving browsers apply the intent to their local DOM and verify the hash; mismatches trigger a full-state resync (rare, less than one in a million intents in production).
Replication
Every reconciled intent is written to two additional availability zones within the home region. Business-plan workspaces also receive a nightly cross-region snapshot with 90-day retention.
Snapshots
Hourly point-in-time snapshots, 30-day retention. Snapshots are stored encrypted with per-workspace keys distinct from the live-store keys.