Repository navigation
fix(apns): cancel redirect relay response body before returning - #109728
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 2:54 AM ET / 06:54 UTC. Summary PR surface: Source +1, Tests +14. Total +15 across 2 files. Reproducibility: no. there is not yet a high-confidence live reproduction. Source inspection and the mocked-fetch test establish the unread redirect-body path, but they do not exercise a real HTTP connection. 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 cleanup in the APNs relay request owner, retain the focused regression test, and add redacted terminal proof from a real local relay returning redirects repeatedly without accumulating open resources. Do we have a high-confidence way to reproduce the issue? No, there is not yet a high-confidence live reproduction. Source inspection and the mocked-fetch test establish the unread redirect-body path, but they do not exercise a real HTTP connection. Is this the best way to solve the issue? Yes, this is the narrowest maintainable fix: the APNs relay owner should release the redirect response before its existing early return, rather than introducing a broader fetch wrapper or changing redirect policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0097363c69af. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1, Tests +14. Total +15 across 2 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
|
Co-authored-by: 毛宇豪0668001457 <[email protected]>
|
Merged via squash.
|
…claw#109728) * fix(apns): cancel redirect relay response body before returning * test: fold APNS redirect body cleanup proof Co-authored-by: 毛宇豪0668001457 <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]>
…claw#109728) * fix(apns): cancel redirect relay response body before returning * test: fold APNS redirect body cleanup proof Co-authored-by: 毛宇豪0668001457 <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
sendApnsRelayRequestreturns early when the relay responds with a 3xx redirect (relay redirects are not followed — grants and signatures are scoped to the configured relay origin). The response body was left unconsumed, keeping the underlying connection open until GC.Why This Change Was Made
Follows the same pattern as #109519 (Google Chat), #109508 (docs), #109525 (ClawRouter), and #109701 (MS Teams file consent) — cancel the response body before returning on non-OK paths.
User Impact
No user-facing change. Prevents a minor resource leak when the APNs relay returns an unexpected redirect response.
Evidence
New test ("cancels a redirect relay response body before returning"):
Responsewith status 307 is returned by the fetch stubresponse.body.cancel()is verified to be called exactly once before returning