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
Bound SSE buffering and stop polling when a client cannot receive events #345
The event stream continues polling and writing when the HTTP writable buffer is saturated. An authenticated account with environment.read, a sufficiently large accessible history and a slow connection can make the API retain queued event data.
The existing controls remain useful: eight streams per account, batches of 100 every two seconds, a one-hour lifetime and repeated credential/permission checks. They do not implement a byte budget or wait for the writable stream to drain. This is a conditional availability risk, not a demonstrated process crash.
Evidence
Audited code: c761e67d1aad834679cfae5569f8722e74084f4d; the subsequently merged ADR-only #341 does not change this path.
An isolated local test invoked the actual pumpEvents with a blocked Node Writable: 1,000 writes continued after 1,000 false returns, retaining 256,000 bytes in ten simulated polling cycles. This test did not involve a live HTTP/Caddy connection or demonstrate an OOM.
Acceptance criteria
Wait for drain, or close slow streams within an explicit bounded time/queued-byte budget.
Stop fetching further database batches while the client cannot accept the current batch.
Disconnect, abort and shutdown release listeners and buffered work promptly.
Preserve live credential/permission checks while waiting, or use a bounded deadline that preserves the revocation guarantee.
Cover a blocked writer and a slow client through Caddy with bounded resource assertions; normal delivery/reconnection still work.
Activity