@@ -12,6 +12,7 @@ Commits:
1212- ` 334f7c2 fix: gate websocket transport by explicit opt-in `
1313- ` e27f44c fix: harden responses websocket protocol `
1414- ` 2e4733d fix: preserve websocket turn cancellation hooks `
15+ - ` df8c047 fix: abort websocket turns before upstream headers `
1516
1617Modified:
1718
@@ -37,9 +38,10 @@ Modified:
3738- Terminal enforcement: the WS pump stops at the first terminal, cancels the reader, and reports EOF
3839 before terminal as standalone ` type:error ` .
3940- Header/error fidelity: non-2xx responses use standalone ` type:error ` with HTTP status and safe
40- headers; inbound WS data stores only forwarded allowlist headers.
41+ headers, including Codex rate-limit header families; inbound WS data stores only forwarded
42+ allowlist headers.
4143- Cancellation: socket close still cancels upstream, and same-socket replacement turns cancel the
42- previous in-flight reader and suppress stale frames.
44+ previous in-flight reader/fetch before upstream headers arrive and suppress stale frames.
4345- Framing/backpressure: CRLF, multiline data, split chunks, unterminated final event, dropped send,
4446 ` -1 ` backpressure, and bounded sniff replay are covered by tests.
4547- Advertisement: absent ` websockets ` is now false; only explicit ` websockets: true ` advertises
@@ -50,9 +52,11 @@ Modified:
5052- ` bun test tests/codex-inject.test.ts tests/codex-catalog.test.ts `
5153 - 16 pass, 0 fail, 104 assertions.
5254- ` bun test tests/ws-endpoint.test.ts `
53- - 18 pass, 0 fail, 37 assertions.
55+ - 19 pass, 0 fail, 39 assertions.
56+ - ` bun test tests/passthrough-abort.test.ts `
57+ - 4 pass, 0 fail, 8 assertions.
5458- ` bun test tests `
55- - 77 pass, 0 fail, 255 assertions.
59+ - 81 pass, 0 fail, 264 assertions.
5660- ` bun x tsc --noEmit `
5761 - passed with exit 0.
5862
@@ -97,3 +101,21 @@ therefore implements the server-side safe behavior available to opencodex: socke
97101and same-socket replacement-turn cancellation. A human-visible TUI Ctrl-C transcript remains useful
98102release evidence if automation can drive it reliably, but it is no longer the only proof of stale
99103frame isolation.
104+
105+ ## Independent Review Follow-up
106+
107+ The first read-only Phase 132 release review failed on two remaining release-blocking points:
108+
109+ - Cancellation was installed only after an upstream ` Response ` existed. Fix: a turn-level
110+ ` AbortController ` is now installed immediately on ` response.create ` , plumbed into
111+ ` handleResponses ` , and linked to both passthrough and bridged upstream fetches.
112+ - The safe WebSocket error header allowlist did not retain Codex rate-limit headers. Fix:
113+ ` safeResponseHeaders() ` now preserves the ` x-codex-<limit>-primary/secondary-* ` and
114+ ` x-codex-<limit>-limit-name ` families parsed by Codex RS.
115+
116+ Regression coverage:
117+
118+ - ` tests/passthrough-abort.test.ts ` asserts that a turn-level abort signal aborts the upstream
119+ controller before response headers arrive.
120+ - ` tests/ws-endpoint.test.ts ` asserts stale successful response bodies are cancelled before pumping
121+ and Codex rate-limit headers survive WebSocket error sanitization.
0 commit comments