fetch: reject already-used Request stream bodies before connecting - #36499
Merged
Jarred-Sumner merged 3 commits intoJul 31, 2026
Merged
Claude / Claude Code Review
completed
Jul 31, 2026 in 18m 14s
Code review found 1 potential issue
Found 3 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | test/js/web/fetch/body-mixin-errors.test.ts:225-232 |
Locked-stream test's connections assertion lacks synchronization probe |
Annotations
Check warning on line 232 in test/js/web/fetch/body-mixin-errors.test.ts
claude / Claude Code Review
Locked-stream test's connections assertion lacks synchronization probe
The `expect(connections).toBe(0)` assertion here has no synchronization barrier, while the sibling test just above explicitly issues a probe fetch (with a comment explaining why) before checking the connection count. On a regressed build that connects before rejecting, the server's `'connection'` callback (a macrotask) can lag the fetch rejection, so `connections` may still read 0 and this assertion can't reliably fail. Consider mirroring the probe pattern (or a bounded poll) so the "before any
Loading