Skip to content

test(codex): pin codex_backend issuer in xai-scoped salvage test - #64844

Merged
teknium1 merged 1 commit into
mainfrom
fix/codex-xai-scoped-test-issuer
Jul 15, 2026
Merged

test(codex): pin codex_backend issuer in xai-scoped salvage test#64844
teknium1 merged 1 commit into
mainfrom
fix/codex-xai-scoped-test-issuer

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Fixes a test broken on current main by two same-day merges crossing: test_normalize_codex_response_salvage_is_xai_scoped fails on every PR's CI (slice 8/8), including branches that don't touch codex code.

Root cause: #64764 (issue #64434) changed _normalize_codex_response so an unrecognized issuer with status="completed" and reasoning-only output now trusts the provider and returns stop. #64768 (merged 44 seconds later) added this test calling with no issuer_kind and expecting incomplete. Each PR was green against its own base; combined on main, the test asserts pre-#64434 behavior.

Fix: pin issuer_kind="codex_backend" in the test — its docstring says it guards the non-xAI special-cased backends (Codex replays encrypted reasoning, so continuation genuinely progresses), and that's exactly the path the pin exercises. Same pattern as the sibling test_normalize_codex_response_treats_summary_only_reasoning_as_incomplete, which was already pinned for #64434. One test-line change, zero production code.

Validation

Before After
tests/agent/test_codex_responses_adapter.py on origin/main 25 pass / 1 fail 26 pass / 0 fail

Reproduced on a pristine origin/main worktree (569b912) before fixing — the failure is pre-existing and unrelated to any open PR's changes.

Infographic

CI flake fix infographic

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).
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint codex provider/xai xAI (Grok) P2 Medium — degraded but workaround exists labels Jul 15, 2026
@teknium1
teknium1 merged commit 8fa8aab into main Jul 15, 2026
31 checks passed
@teknium1
teknium1 deleted the fix/codex-xai-scoped-test-issuer branch July 15, 2026 11:27
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…sResearch#64844)

test_normalize_codex_response_salvage_is_xai_scoped broke on main when
two same-day merges crossed: NousResearch#64764 (NousResearch#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 NousResearch#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 NousResearch#64434).
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…sResearch#64844)

test_normalize_codex_response_salvage_is_xai_scoped broke on main when
two same-day merges crossed: NousResearch#64764 (NousResearch#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 NousResearch#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 NousResearch#64434).
qxxaa added a commit to qxxaa/hermes-agent that referenced this pull request Aug 14, 2026
… regression

Rebase onto current main absorbs the issuer_kind="codex_backend"
pinning in test_normalize_codex_response_salvage_is_xai_scoped
(8fa8aab, NousResearch#64844), fixing CI.

Add config-to-wire regression test per sweeper review: exercises
agent.text_verbosity -> chat_completion_helpers -> normalized Codex
request payload, covering both the injection and empty-default paths.

Addresses feedback from NousResearch#59844 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists provider/xai xAI (Grok) type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants