You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
graphql(ws): Lagged errors are swallowed, so slow subscribers silently miss events #489
crate:nodegitlawb-node — the serving node and REST APIkind:bugDefect fix — wrong or unsafe behaviorsev:mediumDegraded but workaround existssubsystem:apiNode REST API request/response surface
Both /graphql/ws subscription streams route broadcast errors to None in their filter_map arms (crates/gitlawb-node/src/graphql/subscription.rs:31-46, :57-69). For a BroadcastStream, Err is RecvError::Lagged(n) once the 256-cap broadcast buffer (main.rs:288-289) overruns a slow consumer, and senders use let _ = tx.send(...), so lagging subscribers simply stop receiving some events with no error frame and no resync signal.
Impact
A slow subscriber (or one lagged by a burst of pushes to hot repos, which any peer can generate on its own public repos through the announce gate) silently misses ref_updates and task_events while the stream looks healthy: replication and UI triggers built on the stream miss events. Integrity-of-delivery, not confidentiality; the write-side announce gate holds.
Remediation
Surface Lagged as an error/resync frame (or close the stream) so consumers know events were dropped.
Related: #422 covers the resource side of the same endpoint, with no per-client connection cap, idle timeout or rate limit on /graphql/ws. Both are still true on main.
Direction, not a verified requirement: if the fix here is to close the stream on Lagged, it is best decided together with the idle timeout proposed in #422, since both set how long a slow or abandoned subscriber holds its broadcast receiver. Surfacing Lagged as an error frame instead leaves #422's caps as the only bound.
crate:nodegitlawb-node — the serving node and REST APIkind:bugDefect fix — wrong or unsafe behaviorsev:mediumDegraded but workaround existssubsystem:apiNode REST API request/response surface
Activity
beardthelion commentedon Nov 17, 2026
Related: #422 covers the resource side of the same endpoint, with no per-client connection cap, idle timeout or rate limit on
/graphql/ws. Both are still true on main.Direction, not a verified requirement: if the fix here is to close the stream on
Lagged, it is best decided together with the idle timeout proposed in #422, since both set how long a slow or abandoned subscriber holds its broadcast receiver. SurfacingLaggedas an error frame instead leaves #422's caps as the only bound.