Repository navigation
fix(network): guarded redirects survive cleanup rejection - #111156
Conversation
a48900e to
00094f6
Compare
11afd63 to
dc7ef73
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 11:46 PM ET / July 19, 2026, 03:46 UTC. Summary PR surface: Source 0, Tests +51. Total +51 across 3 files. Reproducibility: yes. A two-hop Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the one-line best-effort cleanup observer, then add a redacted production-entry proof that a native rejecting redirect-body cancellation still returns the final response without an unhandled rejection. Do we have a high-confidence way to reproduce the issue? Yes. A two-hop Is this the best way to solve the issue? Yes. Catching only the detached cleanup promise is the narrowest maintainable fix because redirect validation and the final fetch result remain authoritative, and the related merged fixes use the same best-effort-cleanup principle. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b57660d02491. Label changesLabel justifications:
Evidence reviewedPR surface: Source 0, Tests +51. Total +51 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
dc7ef73 to
0abe75b
Compare
|
Merged via squash.
|
…11156) * fix(network): preserve redirects when cleanup fails * test(network): bound redirect response assertion * test(network): honor stream cancellation contract
…11156) * fix(network): preserve redirects when cleanup fails * test(network): bound redirect response assertion * test(network): honor stream cancellation contract
What Problem This Solves
Fixes an issue where guarded fetch redirects could fail after receiving a valid redirect response when best-effort response-body cleanup rejected.
Why This Change Was Made
Redirect processing now observes and ignores only the asynchronous rejection from cancelling the superseded response body. Redirect validation, redirect limits, and all fetch failures retain their existing behavior. A native
ReadableStreamregression covers the two-hop redirect and verifies the process-level rejection listener is always removed. The adjacent web_fetch SSRF fixture now honors the promise-returning stream cancellation contract.User Impact
Users can complete SSRF-guarded redirects even when the discarded redirect response cannot be cleanly cancelled.
Evidence
node scripts/run-vitest.mjs src/infra/net/fetch-guard.ssrf.test.ts— 99 tests passed.node scripts/run-vitest.mjs src/agents/tools/web-fetch.ssrf.test.ts— 11 tests passed.node scripts/check-changed.mjs -- src/infra/net/fetch-guard.ts src/infra/net/fetch-guard.ssrf.test.ts src/agents/tools/web-fetch.ssrf.test.ts— passed on Blacksmith Testbox: https://github.com/openclaw/openclaw/actions/runs/29672117608Response.text()was resolved by reading the controlled fixture through its native reader and releasing the lock.AI-assisted maintainer follow-up from the cancellation-rejection audit for #111105, #111106, and #111056.