The s2 loro-room client (RoomClient, /session/{chatId}/ws) predates chat2
and survived only as the migration overlap. Every chat in the fleet is on
chat2 (v0.1.34 shipped born-chat2 + host sweep + first-contact push), so
the legacy path was pure cost: an extra socket per straggler chat and
~2400 lines of dead transport.
- crates/sync: room.rs and its tests deleted; RoomClient/RoomEvent/
RoomTuning gone. The shared vocabulary (SyncError, UrlProvider,
StaticUrl, RoomStatsSnapshot) moves to types.rs — registry and chat2
clients keep using it unchanged. s2_reader example and the s2 live
edge-convergence test removed.
- doc_host: handle.room field, spawn_s2_join, and fetch_s2_room_doc
deleted. Gen-1 straggler chats now open read-only on their local fat
doc; when this device hosts one, the existing quiet-seed posts the
chat2 checkpoint and flips the registry (its wait-for-s2-join gate is
gone — with no s2 writers anywhere, the host's local doc is the
authority). Transcript salvage keeps its rollback-copy source only.
The cutover watcher and migration sweep stay: they are what converges
any straggler.
- SyncStatus / `zeron sync`: per-chat rows now report chat2 stats
(cursor/headSeq/pending/rows/resets) instead of s2 room stats; the
workspace registry line is unchanged.
- Edge: SessionRoom DO stays deployed for pre-cutover released clients;
no current client dials it (noted in ARCHITECTURE.md; server-side
removal is separate cleanup).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- binary/CLI `comet` -> `zeron`; crates comet-* -> zeron-*; COMET_* -> ZERON_*
- data dir ~/.comet-native -> ~/.zeron, with a one-shot rename migration
- services: comet-native.service -> zeron.service; launchd sh.zeron.comet ->
sh.zeron.app; macOS bundle id dev.comet.native -> sh.zeron.app
- release artifacts comet-<ver>-* -> zeron-<ver>-*; drop the Comet.app
tarball-path compat hack in package-macos.sh
- iOS: Comet -> Zeron targets/dirs, bundle id sh.zeron.Zeron, zeron:// scheme
- clients default to https://edge.zeron.sh; installer + landing on zeron.sh
- kept on purpose: repo name, worker names (comet-native-edge/comet-landing;
DO storage is bound to the script name), R2 bucket names, and legacy
comet.zeron.sh routes so 0.1.x clients keep working
zeron-<ver>-* artifacts don't exist until the next release, so curl-install
and landing downloads 404 between this deploy and the 0.2.0 tag.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The self-repair cutover (docs/chat2-sync.md), motivated by tonight's
incident: a cold reader no client release could heal, because s2's
full-history WS backfill burst dies on some network paths. chat2 readers
fetch one compact checkpoint over Range-resumable HTTP instead.
- doc_host open() branches on the registry's roomGen: 2 → chat2 join
(supervised dial, 60s deadline, backoff, wake redial; ChatClient resolves
only after full catch-up) with local commits fed to the relay via
subscribe_local_update; else → the extracted s2 join, unchanged.
- Host-side lazy migration (M1/M2): on opening an s2 chat it hosts, the
host spawns a seed — rebuild_thin_doc → POST seed checkpoint
(seqCovered=0) → rollback copy of the fat lineage → persist thin
(epoch 2, cursor 0) → flip registry roomGen=2 LAST (crash before the
flip = chat stays on s2, retried next open). Live handle is retired
(never persists the fat doc again) and dropped when unpinned.
- Reader discard-and-adopt (M3): opening a roomGen-2 chat with a local
epoch<2 doc keeps a rollback snapshot ({chat}.pre-chat2), re-queues own
pending commands, starts fresh, and lets the chat2 catch-up repopulate.
No user action — the self-repair path.
- chat2 host duties on the quiesce tick: threshold checkpoints
(rowBytes>512KB || rows>200, seqCovered=cursor) and the last-64 tail
sidecar publish (the iOS/thin-reader fallback).
- plan_catch_up + run_session: checkpoint PRESENCE keys on checkpointSize,
not checkpointSeq — a seeded room's checkpoint covers seq 0, and the
seq==0 shortcut (present in BOTH sites) made adopted readers skip the
seed and render empty transcripts. Caught by the live gauntlet: the real
ChatClient now cold-reads a scratch room seeded with this session's real
573KB doc → 276KB thin checkpoint over HTTP → all 36 messages converge.
Suites: full workspace green (31 result sets). Gauntlet: rebuild → seed
POST → real-ChatClient cold read on a deployed scratch worker, plus the
seeded-at-zero regression test.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Artifacts from the verification pass, for the C3 session and CI-someday:
- edge/scripts/chat2-check.mjs: 65-check wire-level E2E against a deployed
worker (protocol, guards, checkpoint lifecycle, quota, sidecars, blob-route
isolation + '#' encoding, reset).
- edge/scripts/chat2-crosscheck.mjs + crates/sync/examples/chat2_live.rs:
real ChatClient (tungstenite + actor) vs a JS Loro peer through a live
ChatRoom — checkpoint-then-rows leg, live push/ack, byte-level convergence.
- edge/scripts/chat2-persist-check.mjs: seed/verify pair proving rows,
checkpoint, frontier meta and sidecars survive DO eviction (redeploy).
- crates/doc/examples/rebuild_whale.rs: M1 rebuild against a real snapshot
file; the 1b65e93d whale: 1,079,986 -> 152,934 bytes (7.1x), 384 sidecar
payloads, idempotent, 8ms.
- edge/wrangler.chat2test.jsonc: throwaway staging config (dev auth, isolated
bucket, workers.dev) used to run all of the above; deploy, test, delete.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 2026-08-04 incident, caught live with 0.1.17 logging + wrangler tail:
work-laptop's workspace-room socket had its writes accepted and fanned out
(its rows reached other devices minutes-fresh) while receiving NOTHING back
— title stuck at "New session", no Working indicator — until the DO
instance recycled (16:30:19Z "connection closed"), which healed every
device at once. The wedge then re-formed within minutes.
Three failure-shape fixes and one observability fix:
- Probe clock now keyed on SERVER-PUSHED %LOR frames (broadcasts, backfill,
join answers), never acks: a deaf-receiving socket whose own writes keep
getting acked used to reset the probe on every ack and was never probed.
Acks still extend the JOIN deadline (slow-uplink pushes must not be
killed mid-drain — the original adversarial finding stands).
- ProbeSync RPC + window-focus rising edge in the shell: focusing the app
probes the workspace room and every open chat room (each gated on ≥30s
broadcast-quiet), so a wedged device heals seconds after you look at it
instead of minutes later.
- edge: a member socket that throws on broadcast send is CLOSED, not
skipped — the client redials and VV-backfills within seconds. The old
swallow left a permanently deaf peer that still pinged and wrote.
- Mid-session rejoins now log at info: this morning's recovery was
completely silent, which made the incident timeline unreconstructable.
Also: doc_surgery dump-workspace mode (used to prove work-laptop's writes
were landing during the incident).
Regression test: own_write_acks_do_not_suppress_the_probe.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The one-off recovery tool from the Jul 28 devbox incident, kept as an
example: inspect-workspace / inspect-chat / cut-chat against a
docs.sqlite3 store. serde_json joins sync's dev-dependencies for it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>