Effect Vector Clock Causality
Ordering distributed events by causality instead of two lying wall clocks. Deciding a conflict by timestamp drops the real later edit when clocks disagree by 200ms; vector clocks track what each node had observed, so happened-before is a fact, not a guess. Genuinely concurrent edits (neither saw the other) are detected as concurrent rather than ranked, so the system surfaces a conflict to merge instead of silently overwriting a real change. Each node bumps only its own counter on a local event and merges element-wise maxima on receive, and comparison is a pure total function returning before, after, equal, or concurrent. The demo catches a conflict last-write-wins would have dropped. Pinned to effect 4.0.0-beta.98.
npx shadcn@latest add https://ui.aryank.space/r/effect-vector-clock-causality.jsonInstalls from ui.aryank.space. To add it by hand, copy the files in Files below, or register the @compronents namespace via the docs.
Two nodes edit the same doc; their clocks disagree by 200ms. Last-write-wins by timestamp picks the wrong one and silently deletes the edit that was actually made later.