Files
pad/internal
xarmian be47896e13 fix(events): hold both wire forms to the same id rule (BUG-2736)
Codex round 16. The positive-id check lived inside the PREFIXED branch of
decodePayload, so a bare payload carrying id 0 or a negative was accepted:
delivered with no SSE cursor for the client to advance to, and — once an epoch
has been adopted — read as the sequence going backwards and used to discard
every replay buffer.

The check is now a function both branches call, which is the by-construction
form rather than a second copy that can drift. Same route as an unreadable
payload: this workspace's coverage ends and the next resume says so.

The failing case that made this worth finding is the one my own round-11 test
did not cover — it exercised the prefixed form only, because that is the form
the guard was written next to. Symmetry asserted in the rejections table now,
for both forms.

Claude-Session: https://claude.ai/code/session_01JVDBKbgn3Xt7ndW1YoYd8X
2026-08-22 21:08:48 +00:00
..
2026-03-26 01:52:36 +00:00