Repository navigation
fix(util): retry broken-pipe transport failures - #56307
Merged
Merged
Conversation
Contributor
Author
|
Hi @kitlangton, could you please review this PR whenever you have some time. Thanks! |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Contributor
There was a problem hiding this comment.
This looks good. I ran the reproduction script from #56305: on the base, a nested EPIPE transport error stops after one attempt, and with this change it's retried and succeeds on the second attempt. ECONNRESET behaves the same as before. The retry tests pass (the three new cases fail on the base), and typecheck passes for packages/util.
The only places that use the default retry check are HTTP calls in packages/app, so the new epipe match won't make other kinds of errors retry by accident.
Public API: unchanged.
Related: #54160
rekram1-node
enabled auto-merge (squash)
October 17, 2026 05:31
rekram1-node
disabled auto-merge
October 17, 2026 05:31
This was referenced Oct 20, 2026
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.
Issue for this PR
Closes #56305
Type of change
What does this PR do?
Recognize
EPIPEas a transient transport failure in the shared retry classifier. Broken-pipe errors now use the existing bounded retry budget, including when the code is nested beneath the client's transport error.How did you verify your code works?
From
packages/util, using Bun 1.4.3:bun run test src/retry.test.ts --rerun-each 10: 80 passed. All three new cases fail before the fix; they cover message/code detection, nested causes, recovery, and the attempt limit.OpenCode.make()client fails after one request before the fix and succeeds on the second afterward. Its fetch option injects the broken-pipe error; no live server failure is assumed.bun typecheck: passed.git diff --check: passed.Repository-wide verification on the shared baseline passed lint with existing warnings, then stopped at an uninstalled Console workspace dependency (
@tsconfig/node22).Screenshots / recordings
Not applicable; no rendered UI changes.
Checklist
Added by the opencode bot (AI-generated).
Related: #54160