Repository navigation
Detach disposed tunnel session socket listeners - #8259
Merged
Merged
Conversation
2 of 3 tasks
alexburlis
added a commit
to alexburlis/omnyo
that referenced
this pull request
Nov 26, 2026
Record the upstream PRs, revisions, contributors, and Omnyo integration commits for merge d2a24ac in docs/upstream-credits.md. Original-PR: get-bb/bb#7663 Original-Commit: get-bb/bb@1737a03 Original-Author: rufi Original-PR: get-bb/bb#8055 Original-Commit: get-bb/bb@651ae20 Original-Author: Jake Lancaster Original-PR: get-bb/bb#8075 Original-Commit: get-bb/bb@511e1ed Original-Author: Jake Lancaster Original-Co-Author: Michael Yong Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8096 Original-Commit: get-bb/bb@775090b Original-Author: Michael Yong Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8145 Original-Commit: get-bb/bb@8de6711 Original-Commit: get-bb/bb@0d3db49 Original-Commit: get-bb/bb@92d3a76 Original-Commit: get-bb/bb@6705422 Original-Author: Michael Yong Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8171 Original-Commit: get-bb/bb@b56ed04 Original-Author: Jake Lancaster Original-PR: get-bb/bb#8238 Original-Commit: get-bb/bb@2a9a142 Original-Author: SawyerHood Original-PR: get-bb/bb#8247 Original-Commit: get-bb/bb@ba4ae22 Original-Author: Salem Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8259 Original-Commit: get-bb/bb@96f40a9 Original-Author: SawyerHood Original-PR: get-bb/bb#8263 Original-Commit: get-bb/bb@141e40a Original-Author: mk Original-PR: get-bb/bb#8266 Original-Commit: get-bb/bb@84e20e9 Original-Author: ILIA GOLUBEV
scowalt
pushed a commit
to scowalt/bb
that referenced
this pull request
Dec 1, 2026
🚨 **SLOP COP** 🚨 · `new-issue-autopilot` ## Human comments ## What was wrong `TunnelSession.dispose()` aborted existing streams but left its anonymous socket message listener attached. Frames delivered after disposal still dispatched HTTP or WebSocket work through the retired session's origin resolver. Connect disposes sessions before gracefully closing their transports, and that resolver can reach an invalidated plugin API. [Reproduction and root-cause report](https://get-bb.github.io/reports/issues/8258.html): **PARTIALLY REPRODUCED**, high confidence in the disposal defect. Both real-WebSocket regression cases fail on trusted main and again in a second clean checkout at `a8c32288cf24894fbe85cb3a9ca0469c7a997ed6`. The reported whole-server restart was not reproduced; this PR fixes the directly demonstrated lifecycle defect, not an independently verified process crash. ## What changed - Keep stable references to the session-owned socket message and close handlers and detach only those handlers before aborting streams. - Add real-WebSocket regressions for late HTTP and WebSocket opening frames after disposal, with a pending stream already present. - Use the repository's shared-worker Vitest configuration in the owning package. - Three files in the tunnel-client subsystem: **109 additions + 20 deletions = 129 changed text lines**, counted with `git diff --numstat origin/main`. - No dependencies, generated files, stored-data changes, wire/protocol changes, public API changes, or CLI behavior changes. ## How you verified - Before production changes: `pnpm exec turbo run test --filter=@bb/tunnel-client -- test/disposal.test.ts` fails both cases because the origin resolver runs after disposal. Repeated the same failure in a second clean trusted checkout. - After the fix: the same focused command passes both cases. - `pnpm exec turbo run test lint typecheck --filter=@bb/tunnel-client` passes: 29 tests, lint, and typecheck. - `pnpm exec turbo run test typecheck --filter=bb-plugin-connect` passes: 158 tests and typecheck. - `pnpm exec oxfmt` on the three changed files and `git diff --check` pass. No binary changes. - A full monorepo build hits an unrelated unresolved Plugin SDK runtime import in plugin bundling, including after SDK type generation. The report includes the build failure log; no unrelated build changes are included. Fixes get-bb#8258 > AGENT GENERATED <!-- slopcop:rule=new-issue-autopilot run=run_tx70go1tmwxnqfki sha=issue-8258 kind=summary --> Co-authored-by: SawyerHood <[email protected]>
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.
🚨 SLOP COP 🚨 ·
new-issue-autopilotHuman comments
What was wrong
TunnelSession.dispose()aborted existing streams but left its anonymous socket message listener attached. Frames delivered after disposal still dispatched HTTP or WebSocket work through the retired session's origin resolver. Connect disposes sessions before gracefully closing their transports, and that resolver can reach an invalidated plugin API.Reproduction and root-cause report: PARTIALLY REPRODUCED, high confidence in the disposal defect. Both real-WebSocket regression cases fail on trusted main and again in a second clean checkout at
b0ddaad731565d7e4de68d824120d802fc78f7d5. The reported whole-server restart was not reproduced; this PR fixes the directly demonstrated lifecycle defect, not an independently verified process crash.What changed
git diff --numstat origin/main.How you verified
pnpm exec turbo run test --filter=@bb/tunnel-client -- test/disposal.test.tsfails both cases because the origin resolver runs after disposal. Repeated the same failure in a second clean trusted checkout.pnpm exec turbo run test lint typecheck --filter=@bb/tunnel-clientpasses: 29 tests, lint, and typecheck.pnpm exec turbo run test typecheck --filter=bb-plugin-connectpasses: 158 tests and typecheck.pnpm exec oxfmton the three changed files andgit diff --checkpass. No binary changes.Fixes #8258