* fix(buzz): page reconnect history instead of dropping older messages
On reconnect the Buzz gateway asked the relay for a single capped page of
room history and treated EOSE as a complete recovery. Any backlog larger
than the per-room replay limit was never requested again, so those messages
never reached handleBuzzInbound, the agent, or the session transcript, and
nothing reported the loss.
The room subscription now records how much history its first page returned
and, when that page filled the limit, pages older history through the relay
until it is exhausted. Each page is dispatched through the existing bounded
replay queue and the next page waits for queue capacity, so recovery stays
memory bounded. A room whose backlog cannot be paged past a single
timestamp is now reported instead of dropped silently.
Membership tracking moves to room-membership-tracker.ts because buzz-bus.ts
was already at the 700 line ceiling.
* fix(buzz): hold dispatch capacity while a history page is in flight
Catch-up asked the replay queue whether capacity existed and then issued the
relay query, but nothing held those slots. Live room events arriving while
the query was in flight could consume them, so admitting the page afterwards
could report overflow, which closes the dispatch queue and drops every
queued message before forcing a reconnect. A busy room with slow inbound
handlers could repeat that instead of finishing recovery.
Capacity is now reserved rather than sampled. reserveCapacity resolves with a
reservation that owns its slots until released, page events are admitted
through that reservation, and the reservation is released once the page is
enqueued. Live enqueues keep the full pending limit and are never rejected
earlier because a reservation is outstanding. An overflow reported through a
reservation means the relay exceeded the page it was asked for, so it is
reported as a history error instead of tearing down the session.
* fix(buzz): bound reconnect history pages
* fix(buzz): preserve replay reservations
* test(buzz): cover catch-up settlement paths
* fix(buzz): drain saturated history ranges
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Restore standalone Buzz npm and ClawHub packaging by using the shipped QA runner SDK surface and generated dependency lock workflow.
Prepared head SHA: 58d0a52c61
Co-authored-by: Shakker <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd