Repository navigation
Replay the join→reopen gap — the fourth (structural) deaf-kickoff variant - #2353
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The epoch-driven stream reopen is live-tail: anything published between
join_roomand 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 probepersona.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