Skip to content

CONVERGENCE_EVENTS

const CONVERGENCE_EVENTS: readonly [{ effect: "overlay upserted; a journal mutation appended (records base server version for ADR-0015)"; event: "local create/update/delete enqueued"; }, { effect: "journal row → sending"; event: "mutation sent"; }, { effect: "journal row → acked, server_updated_at_us stamped; entity shows acked_unobserved until the echo catches up"; event: "mutation acked"; }, { effect: "synced row applied; the barrier predicate runs; resolved entities clear overlay + acked journal"; event: "Electric insert/update observed"; }, { effect: "resolved by synced-row absence (deletes carry no Server version — ADR-0010)"; event: "Electric delete observed"; }, { effect: "clear overlay/journal only through the shared barrier predicate (decision 4)"; event: "resolution"; }, { effect: "conflict_state recorded on the journal row (ADR-0015); surfaced in the view"; event: "conflict detected"; }, { effect: "journal row → quarantined (terminal, ADR-0006), overlay kept; surfaced as quarantined_count/quarantine_state"; event: "mutation quarantined"; }, { effect: "subscription reset + re-stream; affected entity state re-derives from the fresh synced rows"; event: "shape must-refetch"; }]

Defined in: packages/contracts/src/convergence-model.ts:160

The event model the Convergence model implements (ADR-0011). The per-entity convergence state is derived from synced + overlay + journal — never a mutated row — so this table is the spec the derivation answers to, not a state machine that is stepped. Exported so a test can assert the implemented derivation covers every event.