Skip to content

Replay the join→reopen gap — the fourth (structural) deaf-kickoff variant - #2353

Merged
joelteply merged 1 commit into
canaryfrom
fix/rejoin-replay
Aug 21, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/rejoin-replay

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The epoch-driven stream reopen is live-tail: anything published between join_room and the reopen was delivered to nobody, and the kickoff is published milliseconds after the join — it lost the race by construction on every dispatch (verified with the room-routing fix already live: event durable in the round room, kickoffs: 1, zero raw_event rows).

The reopen now replays the gap: page_recent(32), lamport-watermark deduped (seeded at prime from the transcript head so no history floods, per #131), same decode/chunk-skip/self-skip as the live path, queued ahead of the live stream. Work-event bridge runs for replayed events (dedups by event id). New probe persona.inbound.rejoin_replayed {scanned, replayed, watermark} — this loss class has been invisible four times.

Deployed and probe-verified live (boot instance fired honestly vacuous with scanned: 0). Hermetic test needs the #187 TwoAircLoopback fixture, per the test-fixtures doctrine.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…deaf-kickoff variant

The epoch-driven stream reopen (P0 20b44763) re-opens with the enlarged room set
but is LIVE-TAIL: anything published between join_room and the reopen was
delivered to nobody. The benchmark kickoff is published milliseconds after the
join, so it lost this race BY CONSTRUCTION on every dispatch — verified today
with the room-routing fix already in place: event durably in the round room,
`kickoffs: 1`, zero `persona.inbound.raw_event` rows for any subscriber, and the
addressee spent the afternoon solving a gym exercise she COULD see.

The reopen now REPLAYS the gap: page_recent(32), keep events strictly newer than
the conversation's lamport watermark, same decode + chunk-skip + self-skip rules
as the live path, queued ahead of the live stream (they are older; ordering keeps
an addressed kickoff ahead of the chatter that follows it). The work-event bridge
runs for replayed events too — it dedups by event id, so no double-fire.

Watermark discipline: seeded at prime() from the transcript head, so the first
runtime join can never replay pre-subscribe history as fresh perception (#131
"the room starts at join", preserved under replay); advanced on every non-chunk
live event and every replayed event. `persona.inbound.rejoin_replayed
{scanned, replayed, watermark}` makes delivery visible — this class of loss has
now been invisible four times.

Deaf-kickoff lineage, for the record: #417 (voice authored as the addressee),
P0 20b44763 (assignees never subscribed to runtime rooms), 814a5af (kickoff
said in the voice's room, not the round's), and this (the reopen race). Each
layer's fix was correct and necessary; this one closes the last structural gap
between "published" and "perceivable".

Live verification is the gate for this commit (probe chain: resubscribed →
rejoin_replayed{replayed≥1} → addressee raw_event → turn). A hermetic test needs
a stream-capable citizen fixture — that is task #187's TwoAircLoopback, noted
there rather than a parallel inline mock (per the test-fixtures doctrine).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply enabled auto-merge (squash) August 21, 2026 22:09
@joelteply
joelteply merged commit 3e7209d into canary Aug 21, 2026
5 checks passed
@joelteply
joelteply deleted the fix/rejoin-replay branch August 21, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant