Repository navigation
fix: detach the OIDC compat's normal-path body releases - #2393
Merged
Merged
Conversation
Neither the non-OK probe's release nor the substituted original's is awaited any more, so a body cancel that never settles can no longer stall discovery or keep the caller's abort from reaching it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
There was a problem hiding this comment.
🟢 Approval recommended
The implementation satisfies issue #2389’s acceptance criteria with focused regression coverage.
Pull request overview
Prevents stalled response-body cancellation from blocking OIDC discovery and caller aborts.
Changes:
- Detaches normal-path body releases.
- Adds regression tests for stalled cancellation and abort handling.
File summaries
| File | Description |
|---|---|
core/auth/oidcDiscoveryCompat.ts |
Makes body release non-blocking. |
clients/web/src/test/core/auth/oidcDiscoveryCompat.test.ts |
Covers stalled cancellation paths. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
…etached-body-release Signed-off-by: cliffhall <cliff@futurescale.com>
3 tasks
3 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.
Closes #2389
withRfc8414OidcCompatstill awaitedreleaseBody()at two normal-path sites — a non-OK probe, and the original response a substitution discards.ReadableStream.cancel()may never settle, so either could hang discovery with the caller's abort unable to end it (the recheck sat after the await).Change
releaseBodyDetached, as every exceptional exit already did. The post-release abort recheck on the non-OK path is kept.releaseBodyDetached's comment now covers the normal path too.Tests
Two new cases in
oidcDiscoveryCompat.test.ts, using a body whosecancel()never settles:Checked both against the old code: both time out there, and pass on the fix. The existing connection-release tests are unchanged and still pass.
npm run local:gateis green.🤖 Generated with Claude Code