Files
pad/docs
xarmian 53afc2172c fix(events): a generation we cannot vouch for ends coverage, not just the message (BUG-2736)
Codex round 19, inside round 6's own fix.

Round 6 made a LOWER generation inside the straggler window discard the
message. It left the replay buffers valid — so a client reconnecting during
that window was told it was caught up. Harmless if the message really was a
straggler, and thirty seconds of silently missed events if the generation had
regressed instead, because then the messages being discarded ARE the live
stream. A bus that has just decided it cannot classify what it is seeing must
not go on claiming it can answer for the span.

Coverage now ends on the first lower generation. The CLASSIFICATION still
waits out the window — the epoch is not adopted there — so a true straggler
does not drag the bus into the dead space. Its cost is one extra drop next to
a rotation that had already dropped the buffers, which is nearly free and loud
either way.

That changes what epoch_regressed means, so its documentation changed with it:
it now reports that a lower generation was SEEN, and the two causes are told
apart by count rather than at the moment it fires. One alongside an
epoch_change is a message in flight during a rotation; a run of them is Redis
losing writes.

The test asserts both halves — the straggler still does not move the epoch and
is still not buffered, AND coverage ends — plus the control that the live
generation re-establishes coverage immediately, so this is a resync rather
than a dead bus.

Claude-Session: https://claude.ai/code/session_01JVDBKbgn3Xt7ndW1YoYd8X
2026-08-22 21:38:28 +00:00
..