GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — fix(provider): handle SSE reader cancel rejections by AlexanderWillner · Pull Request #44912 · anomalyco/opencode Conversation
|
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found. The search identified several related but distinct PRs addressing different aspects of SSE stream handling (PRs #39970, #43607, #40010, #39516), but none of them are duplicates of PR #44912. This PR specifically addresses unhandled promise rejections from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…d AbortError #attemptConfigApply ends every directory's subscription (#stopPumps aborts its owner controller) before it SIGTERMs the server. The opencode SDK's SSE client answers that abort with `void reader.cancel()` (@opencode-ai/sdk 1.18.18, dist/gen/core/serverSentEvents.gen.js:29, createSseClient's abortHandler). The abort has already errored the fetch body with the abort's reason, so under Bun 1.4 that cancel rejects with the very AbortError #stopPumps created, and nothing observes it: every config apply logged an unhandledRejection (stack abort <- #stopPumps <- #attemptConfigApply), and a process without a handler went down. The SDK is patched where the promise is made: the cancel is observed, a rejection carrying the subscriber's own abort reason is the expected end of that subscription, and any other rejection is rethrown, so it surfaces exactly as before. Real connection errors reach the pump through reader.read() as they always did. Both dist copies carry the handler, so both are patched. 1.18.33, the latest release, still has the unobserved cancel, so no upgrade fixes it (same defect: anomalyco/opencode#44912, getpaseo/paseo#2027). Repro: the real OpencodeHarness against an isolated opencode, restarted by a config change. Before: an unhandled AbortError at the restart, then one new subscription. After: none; the process survives, with one subscription to the new server. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
provider: unhandled rejection when SSE chunk-timeout cancels the fetch reader (suite red under Bun 1.4)
There was an error while loading. Please reload this page.