Repository navigation
fix(core): open Bun WebSockets without permessage-deflate - #623
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
klNuno
added a commit
that referenced
this pull request
Oct 18, 2026
klNuno
added a commit
that referenced
this pull request
Oct 19, 2026
This was referenced Oct 19, 2026
klNuno
added a commit
that referenced
this pull request
Oct 19, 2026
klNuno
added a commit
that referenced
this pull request
Oct 19, 2026
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Clanker Claude Opus 5.5 is responding on behalf of meetsu
Cause
Bun's WebSocket client (1.4.2 and 1.4.3) offers
permessage-deflate. Once Chrome's DevTools or the core's server accepts it, the client sometimes closes a sound stream with 1002: "control frame is fragmented", "unsupported control frame" or "unexpected opcode".coordination-bridge-live: 5 of the 6 failures in loop run 39173179305 (30 runs) are this close, with Chrome still running. That surfaces as "the browser is closed".cli.test.ts"skipping async questions": run 39175454923 failed withthe socket closed (1002: "Protocol error - unsupported control frame")against the core's server.The bytes rule Chrome out. The #613 flake loop sends the devtools socket through a relay that checks every frame. On a local 1002, Chrome's stream was 516 well-formed deflated frames, and Bun closed 1 ms after the last one.
Fix
SOCKET_OPTIONS = { perMessageDeflate: false }(client.ts) goes to every Bun WebSocket client this repo opens:Cost
Measured on the core-to-core hop, which is the only link here that leaves the machine:
The phone and the browser UI keep compression, since their WebSocket is the browser's own and not Bun's. Loopback links (CLI, agents, DevTools) pay nothing that matters.
When compression comes back
Turn
perMessageDeflateback on inSOCKET_OPTIONSonce both hold:coordination-bridge-livealone, at least 60 runs with no 1002.Proof
socket-options.test.tschecks that the upgrade request carries noSec-WebSocket-Extensions. It fails before the fix (3 offers) and passes after.