mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-20 15:33:54 +00:00
test(codex): pin codex_backend issuer in xai-scoped salvage test (#64844)
test_normalize_codex_response_salvage_is_xai_scoped broke on main when two same-day merges crossed: #64764 (#64434 — trust response.status for reasoning-only turns on UNRECOGNIZED Responses backends) changed what a bare _normalize_codex_response(response) call returns for status='completed' reasoning-only output (now 'stop'), while #64768 added this test calling with no issuer_kind and expecting 'incomplete'. The test's intent is that the xAI reasoning-channel salvage does not leak into other special-cased backends — pin issuer_kind='codex_backend' so it exercises exactly that (same pattern as test_normalize_codex_response_treats_summary_only_reasoning_as_incomplete, which was already pinned for #64434).
This commit is contained in:
parent
1b059d1ae7
commit
8fa8aabbbb
1 changed files with 11 additions and 4 deletions
|
|
@ -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.\n<response>The answer.</response>"
|
||||
)
|
||||
|
||||
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 == ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue