From 4b32a2c95a55727ce262f11f2fc3901a60874a73 Mon Sep 17 00:00:00 2001 From: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Date: Tue, 28 Jul 2026 17:01:36 -0300 Subject: [PATCH] test(codex): align the Responses HTTP e2e to the #8507 input-item contract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fifth and last base-red of the v3.8.49 pre-flight. #8507 (#8083) deliberately sets `status: "completed"` on Responses input items so strict upstream validators accept them; codex-chat-reasoning-http-e2e still asserted the pre-#8507 shape, so it failed against intended behavior. Expectation updated with the reason inline — the assertion is not relaxed, it now pins the current contract. The test was never reached in the first pre-flight sweep (the run was interrupted during the integration phase, and this file sorts after the one that failed). --- tests/integration/codex-chat-reasoning-http-e2e.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/codex-chat-reasoning-http-e2e.test.ts b/tests/integration/codex-chat-reasoning-http-e2e.test.ts index b7172b2bb1..44363fd8fc 100644 --- a/tests/integration/codex-chat-reasoning-http-e2e.test.ts +++ b/tests/integration/codex-chat-reasoning-http-e2e.test.ts @@ -271,11 +271,14 @@ test("chat completions streams Codex Responses reasoning through real route HTTP assert.equal(recorded[0].url, CODEX_RESPONSES_URL); assert.equal(recorded[0].method, "POST"); assert.deepEqual(recorded[0].body.reasoning, { effort: "high", summary: "auto" }); + // `status: "completed"` on input items is required by strict upstream Responses + // validators — added deliberately by #8507 (#8083); it is part of the contract now. assert.deepEqual(recorded[0].body.input, [ { type: "message", role: "user", content: [{ type: "input_text", text: "What is the answer?" }], + status: "completed", }, ]);