fix(deduplicate): do not deduplicate requests with a body #6240
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 218 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.322
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6240"
general
weight: 0.35
mcollina
This relates to...
N/A
Rationale
The
deduplicateinterceptor builds its key from the origin, method, path and headers, but not the request body. undici allows a body onGET, and search APIs such as Elasticsearch's_searchrely on it, so two concurrent requests to the same URL with different bodies were merged. Only the first body reached the server, and the second caller got the first caller's response:In a service that shares one dispatcher across users, one user can receive another user's results. A body can be a stream and can't be compared cheaply, so requests that carry a body now skip deduplication and are sent as usual.
Changes
Features
N/A
Bug Fixes
interceptors.deduplicate()no longer merges requests that carry a bodyInterceptors.mdtest/interceptors/deduplicate.js. It fails onmain(1 origin hit instead of 2) and passes with the fixBreaking Changes and Deprecations
N/A
Status
[cert]: https://github.com/nodejs/undici/blob/main/CONTRIBUTING.md#developers-certificate-of-origin