Files
pad/internal/server
xarmian 4269bdd4cc fix(watchevents): the same hole, told to the stream holding it open (BUG-2730)
fanOutLocally already DETECTED a gap in the received notification
sequence, logged the exact id range, and raised knownFrom so a client
RECONNECTING across it was honestly told sync_required. A client holding
the stream OPEN across the same gap was told nothing: it stayed
connected, kept receiving everything after the hole, and never saw what
went missing. The instance knew; the one consumer whose correctness
depended on it did not.

Subscribers now carry the same capacity-1 coalescing gap channel the
activity bus grew, raised from two different scopes:

- per-INSTANCE, to every live subscriber, when this instance discovers a
  hole in what it received — a sequence gap, a counter that went
  backwards, an epoch change. Instance-scoped is the whole scope: the
  ids never arrived HERE, other instances may have them, and every
  subscriber registered at the moment of detection is exactly the set
  that was connected across the hole.
- per-SUBSCRIBER, to one connection, when its channel was full.

The watch SSE handler answers with sync_required mid-stream. The pad CLI
monitor already clears its cursor on that event, so the client half
needed no change.

Refs BUG-2730.
2026-08-23 00:15:19 +00:00
..