Docs impact: guides/mesh.md in green-tea-docs still describes the 4,000,000-character frame check as the effective limit. With the #107 defaults, a mesh frame over 1 MiB is closed with 1009…
Follow-up verification on PR head 26bacdb: both findings from review 2 are resolved. (1) InboundFanout.accept() checks every subscriber for capacity before offering a frame, and the regression test confirms an overflow frame reaches neither the fast nor the stalled subscriber. (2) CHANNEL_TAP runs the bound inside adapter channel.push(), before the unbounded async channel can queue a burst. I repeated the real loopback createHttpServer probe with maxWsQueue: 2 and 2,000 frames in one write: close(1013) was called at frame 3 (previous head: frame 2,000). The remaining ws message events were parsed but not queued by Green Tea. Verified locally: 652 unit tests, Deno 34, Bun 24, edge, lint, format, typecheck, build, complexity, production audit (0 advisories), and clean diff. These two review findings are closed; this comment does not assess the separate PR open items.
Both items from review 2 are fixed in 26bacdb.
(1) A rejected frame now reaches no consumer. accept() checks every consumer's capacity before delivering to any of them. Test: `maxWsQueue:…
Follow-up review of 7fa02d1: the original two-consumer hang is fixed. Two gaps remain. (1) Must fix — src/http/ws-core.ts:138-142: accept() offers a frame to subscribers in order, then discovers a later subscriber's queue is full and closes 1013. With maxWsQueue=1, a fast and a stalled subscriber, the overflow frame was delivered to the fast subscriber while the slow one never received it. This lets a rejected frame trigger only some handler side effects. Check all subscriber capacity before delivering the frame, and test that the overflow frame reaches none. (2) Must fix — src/http/ws-core.ts:106-110 and src/http/ws.ts's nodeSocket: the bound check runs in an async pump after the unbounded channel() has accepted frames. The installed Node ws server emits messages synchronously by default; 100,000 synchronous pushes produced no close until the event loop yielded, then 1013. Enforce the bound at the synchronous adapter input, before an unbounded queue, and test a burst sent without yielding. All local gates passed at this head: 649 unit tests, Deno 34, Bun 24, edge, lint, format, typecheck, build, complexity, and production audit. Verdict: fix 1 and 2 before merge.
Fixed in 7fa02d1. boundInbound now gives each inbound iterator its own queue, and maxWsQueue bounds each queue. One consumer's return() no longer ends the others. Frames that arrive before…
What this change does: adds bounds and safety checks across static serving, HTTP body reads, WebSocket handling, and runtime adapters. Must fix before merge: src/http/ws-core.ts:83-84,113-119 returns the same InboundFifo for every @inbound() iterator, and a second pending next() overwrites the first waiter. A handler with two consumers waiting for one frame hangs one consumer forever; sequential consumers split frames instead of receiving the previous channel's fan-out. I reproduced the hang on PR head f78c9dc with two iterators and one pushed frame. Preserve bounded fan-out for each subscriber, or explicitly reject a second consumer as a documented breaking change; add a two-consumer regression test. The 89 focused tests passed but cover only one consumer. Verdict: fix this before merge.