fix(ai): harden Codex streaming transport - #1015
Conversation
|
@snimu This is ready for review. It hardens Codex SSE framing across split/mixed line endings and terminal EOF events, and makes WebSocket pre-abort, cache, send, fallback, and cleanup behavior deterministic. Independent review is clean. All required CI checks pass at |
|
Thank you for the report and proposed work. This root cause is now covered by maintainer-owned stacked PR #1164, authored independently from We did not inspect or reuse this PR's diff, branch, commits, implementation code, or tests; its public description/comments were used only as a bug report. To keep one review surface, this PR is superseded by #1164 and is being closed. The complete review stack is #1158–#1165. It is being left unmerged for human review after CI and review-bot findings are cleared. |
Summary
AbortErrorpathVerification
npm run checkCompatibility
Fixes #941
Note
Fix Codex SSE framing and WebSocket cancellation in streaming transport
CodexSSEDecoderto handle mixed/split line endings (LF, CRLF, CR) and dispatch terminal SSE events without a trailing blank line, fixing dropped final events.AbortError.throwIfAborted,isAbortError, andcreateAbortErrorhelpers;sleepnow cleans up its abort listener to prevent leaks.stopReasonto'aborted'with error message'Request was aborted'instead of silently masking the abort.Macroscope summarized 6eb7f43.