fix: document stream cleanup fallback intent#97701
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 3:09 AM ET / 07:09 UTC. Summary PR surface: Source +12. Total +12 across 4 files. Reproducibility: yes. Current main has the exact unannotated catch sites from the linked source-repro issue, and the relevant tests show the cleanup and MiniMax fallback paths are real. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land the comment-only annotations with existing focused validation so the linked issue closes without changing cleanup or MiniMax fallback semantics. Do we have a high-confidence way to reproduce the issue? Yes. Current main has the exact unannotated catch sites from the linked source-repro issue, and the relevant tests show the cleanup and MiniMax fallback paths are real. Is this the best way to solve the issue? Yes. Commenting the intentional best-effort and fallback catches is the narrowest maintainable fix because the linked issue allowed comments and current tests make MiniMax fallback behavior intentional. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5327340a09ed. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +12. Total +12 across 4 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
|
Closes #97691
What Problem This Solves
Fixes an issue where operators troubleshooting web response reads, proxy SSE streams, or MiniMax VLM host selection would find empty
catch {}blocks with no indication whether cleanup and URL parse errors were intentionally ignored.Why This Change Was Made
The catch sites now document the existing best-effort cleanup and fallback contracts in place, including the sibling provider error-body reader cleanup path that shares the same
releaseLock()invariant. This preserves current stream handling and MiniMax malformed-host fallback behavior; it does not add logging, change provider routing, or turn cleanup failures into user-visible errors.User Impact
Operators and maintainers can now tell why these errors are swallowed when reading the hot paths, while users keep the same runtime behavior for bounded web reads, proxy streams, provider error snippets, and MiniMax VLM endpoint fallback.
AI-assisted.
Evidence
Source precheck on current
upstream/mainshowed the reported empty catches still present insrc/agents/tools/web-shared.ts,src/agents/runtime/proxy.ts, andsrc/agents/minimax-vlm.ts; the siblingsrc/agents/provider-http-errors.tscleanup catch used the same best-effortreleaseLock()pattern. Existing MiniMax tests already cover malformed CN host fallback, so this patch keeps that behavior unchanged.Focused tests:
Formatting and patch checks:
Build/CLI and live model proof:
Review: