fix(fetch): close the connection when a null body status response has content #6218
All Vouch review confidence checks passed
Residual risk 0.09 = Change Risk (0.32) × (1 − Review Confidence (0.71)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 97 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.56 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.274
Real PR Conversation Timeline
3 items
Approved
Approved these changes.
Codecov Report
:x: Patch coverage is
90.00000% with 2 lines in your changes missing coverage. Please review.:white_check_mark: Project coverage is 91.68%. Comparing base (
046bb4c) to head (14749c5).:warning: Report is 52 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| lib/web/fetch/index.js | 90.00% | 2 Missing :warning: |
<details><summary>Additional details and impacted files</summary>
@@ Coverage Diff @@
## main #6218 +/- ##
==========================================
+ Coverage 91.61% 91.68% +0.06%
==========================================
Files 113 113
Lines 44044 44481 +437
==========================================
+ Hits 40351 40781 +430
- Misses 3693 3700 +7
</details>
:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.
<details><summary> :rocket: New features to boost your workflow: </summary>
</details>
ronag
mcollina
A 205 (Reset Content) response must not carry content, but HTTP/1.1 framing still allows one (RFC 9112 §6.3 only makes HEAD, 1xx, 204 and 304 responses end at the headers), so llhttp correctly parses a body when the server sends
Transfer-Encoding: chunkedor a non-zeroContent-Length. Fetch exposes these responses with a null body and silently drained the content, so a server that never finished the body kept the connection busy untilbodyTimeout, and the caller had no body stream to cancel.When content arrives on a null-body-status response, fetch now aborts the dispatch, which closes the connection, and ignores the resulting error because the response has already been delivered without a body. A 205 without content keeps reusing the connection.