#107 (core #117) bounds every inbound WebSocket message to limits.maxWsMessageBytes, 1 MiB by default. The teapot's mesh control channel goes through the same bound. However, src/mesh/teapot.ts sets MAX_FRAME_CHARS = 4_000_000 and explains that size as being 'above the 1 MB default body limit an RPC can legitimately carry, with room for the JSON overhead of the envelope'.
So an RPC whose body sits near maxBodyBytes (1 MB default), once JSON-encoded, likely exceeds 1 MiB. The teapot would then close the control channel with 1009, where before #107 it would have accepted the frame. The existing mesh suites pass, but none of them sends a frame that large.
To do:
Add a test with an RPC body close to 1 MB on Node, Deno and Bun.
If it fails, either exempt the control channel from maxWsMessageBytes, or derive its cap from maxBodyBytes plus the envelope overhead, consistent with MAX_FRAME_CHARS.
#107 (core #117) bounds every inbound WebSocket message to `limits.maxWsMessageBytes`, 1 MiB by default. The teapot's mesh control channel goes through the same bound. However, `src/mesh/teapot.ts` sets `MAX_FRAME_CHARS = 4_000_000` and explains that size as being 'above the 1 MB default body limit an RPC can legitimately carry, with room for the JSON overhead of the envelope'.
So an RPC whose body sits near `maxBodyBytes` (1 MB default), once JSON-encoded, likely exceeds 1 MiB. The teapot would then close the control channel with `1009`, where before #107 it would have accepted the frame. The existing mesh suites pass, but none of them sends a frame that large.
To do:
- Add a test with an RPC body close to 1 MB on Node, Deno and Bun.
- If it fails, either exempt the control channel from `maxWsMessageBytes`, or derive its cap from `maxBodyBytes` plus the envelope overhead, consistent with `MAX_FRAME_CHARS`.
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 before that check runs. Whatever this issue decides needs a matching docs change. The companion docs PR (green-tea-docs #23) left that page alone on purpose.
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` before that check runs. Whatever this issue decides needs a matching docs change. The companion docs PR (green-tea-docs #23) left that page alone on purpose.
Fixed in 26.11.0-rc.1 (411c7ef, 2fc7bab, 8f73779). From the changelog:
A mesh RPC whose body is within maxBodyBytes reaches the teapot again (#120). The 1 MiB WebSocket cap from #107 also bounded the mesh control channel, so a request body that fit the HTTP limit could still exceed it once the teacup wrapped it in an RPC frame. A text body near 1 MB was enough, because JSON escaping doubles every " and backslash, and any body limit raised above 1 MiB was capped at 1 MiB on the channel. Either way the teapot closed the whole channel with 1009, and every request through that link failed with 503 until it reconnected. The control channel is now bounded by the teapot's limits.maxBodyBytes: six times the body limit, the most JSON escaping can grow a body (a control character becomes \u0001), plus 1 MiB for headers and the rest of the envelope. That is 7,048,576 bytes at the 1 MB default, up from the frame parser's former fixed 4,000,000. limits.maxWsMessageBytes still governs every user @Ws route, unchanged. On Bun, which takes one native payload limit for all sockets, a teapot raises that limit to the control channel's bound, so an oversized frame on a user route is refused by the framework instead: still 1009, on every Bun version, where Bun before 1.4 refused natively by dropping the connection (1006). The larger bound applies only once the peer's hello is accepted. Until then the channel takes hello-sized frames (64 KiB), and on Node a peer that sends more than that before its hello is dropped before ws assembles the frame. Bun and Deno have no per-socket limit for the framework to hold that to, so there an unauthenticated peer can still make the teapot receive one frame up to the channel's bound before refusing it. If untrusted peers can reach a Bun or Deno teapot's /__mesh__/control, limit frame size at the proxy in front of it.
Fixed in **26.11.0-rc.1** (`411c7ef`, `2fc7bab`, `8f73779`). From the changelog:
- **A mesh RPC whose body is within `maxBodyBytes` reaches the teapot again** (#120). The 1 MiB WebSocket cap from #107 also bounded the mesh control channel, so a request body that fit the HTTP limit could still exceed it once the teacup wrapped it in an RPC frame. A text body near 1 MB was enough, because JSON escaping doubles every `"` and backslash, and any body limit raised above 1 MiB was capped at 1 MiB on the channel. Either way the teapot closed the whole channel with `1009`, and every request through that link failed with `503` until it reconnected. The control channel is now bounded by the teapot's `limits.maxBodyBytes`: six times the body limit, the most JSON escaping can grow a body (a control character becomes `\u0001`), plus 1 MiB for headers and the rest of the envelope. That is 7,048,576 bytes at the 1 MB default, up from the frame parser's former fixed 4,000,000. `limits.maxWsMessageBytes` still governs every user `@Ws` route, unchanged. On Bun, which takes one native payload limit for all sockets, a teapot raises that limit to the control channel's bound, so an oversized frame on a user route is refused by the framework instead: still `1009`, on every Bun version, where Bun before 1.4 refused natively by dropping the connection (`1006`). The larger bound applies only once the peer's `hello` is accepted. Until then the channel takes hello-sized frames (64 KiB), and on Node a peer that sends more than that before its hello is dropped before `ws` assembles the frame. Bun and Deno have no per-socket limit for the framework to hold that to, so there an unauthenticated peer can still make the teapot receive one frame up to the channel's bound before refusing it. If untrusted peers can reach a Bun or Deno teapot's `/__mesh__/control`, limit frame size at the proxy in front of it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
#107 (core #117) bounds every inbound WebSocket message to
limits.maxWsMessageBytes, 1 MiB by default. The teapot's mesh control channel goes through the same bound. However,src/mesh/teapot.tssetsMAX_FRAME_CHARS = 4_000_000and explains that size as being 'above the 1 MB default body limit an RPC can legitimately carry, with room for the JSON overhead of the envelope'.So an RPC whose body sits near
maxBodyBytes(1 MB default), once JSON-encoded, likely exceeds 1 MiB. The teapot would then close the control channel with1009, where before #107 it would have accepted the frame. The existing mesh suites pass, but none of them sends a frame that large.To do:
maxWsMessageBytes, or derive its cap frommaxBodyBytesplus the envelope overhead, consistent withMAX_FRAME_CHARS.Docs impact:
guides/mesh.mdin 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 with1009before that check runs. Whatever this issue decides needs a matching docs change. The companion docs PR (green-tea-docs #23) left that page alone on purpose.Merged into develop in #142 (CARD-24, FPRD-001c, 2026-10-23). Left open until the 1c acceptance gate (CARD-22), per the 1a/1b convention.
Fixed in 26.11.0-rc.1 (
411c7ef,2fc7bab,8f73779). From the changelog:maxBodyBytesreaches the teapot again (#120). The 1 MiB WebSocket cap from #107 also bounded the mesh control channel, so a request body that fit the HTTP limit could still exceed it once the teacup wrapped it in an RPC frame. A text body near 1 MB was enough, because JSON escaping doubles every"and backslash, and any body limit raised above 1 MiB was capped at 1 MiB on the channel. Either way the teapot closed the whole channel with1009, and every request through that link failed with503until it reconnected. The control channel is now bounded by the teapot'slimits.maxBodyBytes: six times the body limit, the most JSON escaping can grow a body (a control character becomes\u0001), plus 1 MiB for headers and the rest of the envelope. That is 7,048,576 bytes at the 1 MB default, up from the frame parser's former fixed 4,000,000.limits.maxWsMessageBytesstill governs every user@Wsroute, unchanged. On Bun, which takes one native payload limit for all sockets, a teapot raises that limit to the control channel's bound, so an oversized frame on a user route is refused by the framework instead: still1009, on every Bun version, where Bun before 1.4 refused natively by dropping the connection (1006). The larger bound applies only once the peer'shellois accepted. Until then the channel takes hello-sized frames (64 KiB), and on Node a peer that sends more than that before its hello is dropped beforewsassembles the frame. Bun and Deno have no per-socket limit for the framework to hold that to, so there an unauthenticated peer can still make the teapot receive one frame up to the channel's bound before refusing it. If untrusted peers can reach a Bun or Deno teapot's/__mesh__/control, limit frame size at the proxy in front of it.