diff --git a/tests/agent/test_codex_responses_adapter.py b/tests/agent/test_codex_responses_adapter.py index 4a14cadf4a3d..cbf2f0e58b61 100644 --- a/tests/agent/test_codex_responses_adapter.py +++ b/tests/agent/test_codex_responses_adapter.py @@ -493,14 +493,21 @@ def test_normalize_codex_response_salvage_strips_closing_tag(): def test_normalize_codex_response_salvage_is_xai_scoped(): - """Non-xAI issuers keep the reasoning-only → incomplete classification; - the Codex backend replays encrypted reasoning, so its continuation - genuinely progresses and must not be short-circuited.""" + """Non-xAI special-cased issuers (Codex backend) keep the reasoning-only → + incomplete classification; the Codex backend replays encrypted reasoning, + so its continuation genuinely progresses and must not be short-circuited. + + Pins ``issuer_kind="codex_backend"`` explicitly: with no issuer at all, + the unrecognized-backend rule (#64434) trusts ``status="completed"`` and + returns ``stop`` — that path is covered by the #64434 regression tests. + """ response = _xai_reasoning_only_response( "Thinking.\nThe answer." ) - assistant_message, finish_reason = _normalize_codex_response(response) + assistant_message, finish_reason = _normalize_codex_response( + response, issuer_kind="codex_backend" + ) assert finish_reason == "incomplete" assert assistant_message.content == ""