Skip to content

test(conformance): check terminal errors reported to environments - #4782

Merged
giuliolovisotto merged 2 commits into
mainfrom
glovisotto/conformance-terminal-errors
Oct 20, 2026
Merged

giuliolovisotto merged 2 commits into
mainfrom
glovisotto/conformance-terminal-errors

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Check that the Environment Server receives a structured failed agent response retaining the terminal provider error. Previously model.terminal_error only checked that the scripted provider returned HTTP 400, and separate checks imposed an unmasked, verified zero grade. Verification and masking are environment policy, so the terminal-error scenario no longer prescribes either.

A test-only observer records response status/error at the Environment Server boundary before verification. Other artifact, ownership, token and health checks remain; successful/retry/verifier scenarios retain their grading checks. Behavioral locations consistently use witness.json.

Tracking: FEA-395.

Split for review

This PR now contains only conformance changes. The adapter fixes are separate sibling PRs based on this branch:

Merge this contract first, then retarget the harness PRs to main. The contract alone exposes existing producer gaps; it is not expected to make current-main harnesses pass by itself. No scenario is demoted or disabled to hide those gaps.

Validation and rollouts

  • Fresh focused tests on this split branch: 332 passed, 2 skipped (python -m pytest scripts/harness_conformance/tests tests/unit_tests/harness_capabilities -q -o addopts='' -o log_cli=false --import-mode=importlib).
  • All-file pre-commit passes; all commits signed off.
  • The prior combined revision 118f1de37 passed all 28 scenarios (7/7 per harness) locally on Linux and in GitHub CI run 39400867183. Downloaded artifacts were checked individually. All five split branches recombine to exactly the tested implementation plus the witness location-label correction.
  • Real-model smoke evidence and per-harness validation remain documented in the sibling PRs and /Users/glovisotto/repos/notes/conformance-terminal-reporting-20261020/.

Compatibility and benchmark impact

The terminal-error scenario now certifies reporting to the caller, not a specific grading/masking policy. Production Environment Server and benchmark policies are unchanged by this PR. Changes to producer behavior are isolated in the sibling PRs.

@giuliolovisotto giuliolovisotto changed the title fix(conformance): report agent-session model errors to environments test(conformance): check terminal errors reported to environments Oct 20, 2026
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/conformance-terminal-errors branch from 118f1de to 81b7361 Compare October 20, 2026 09:56
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 20, 2026 09:56
@github-actions

Copy link
Copy Markdown
Contributor

@lafrancef lafrancef left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: "terminal error" to me sounds like an error raised from the terminal. Do we define this term anywhere? Maybe "non-retriable error" is a more evocative naming.

@giuliolovisotto
giuliolovisotto added this pull request to the merge queue Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39414488624

@yaoyu-33 yaoyu-33 added complexity:medium Single-domain change with interacting parts or a moderate review surface ci CI, automation, test queue, or workflow infrastructure work labels Oct 20, 2026
@yaoyu-33 yaoyu-33 removed the bug Something isn't working label Oct 20, 2026
Merged via the queue into main with commit 9b2b30d Oct 20, 2026
54 of 59 checks passed
@giuliolovisotto
giuliolovisotto deleted the glovisotto/conformance-terminal-errors branch October 20, 2026 11:41
@yaoyu-33

Copy link
Copy Markdown
Contributor

Re @lafrancef's naming question: "terminal" here follows the repo's existing sense of "final, no further recovery" (cli-commands.mdx#L858), and the scenario is a persistent 400 the harness cannot recover from. I'd keep the model.terminal_error id since #4739-#4742 and the recorded evidence refer to it, but a one-line definition next to the model_error row in scripts/harness_conformance/README.md would help.

Optional notes on the contract:

  • model_error needs the agent-session path (the legacy path never records agent_responses; no registered harness uses it), exactly one failed response, the same 4xx on every attempt, the provider message verbatim in error.message, and a collected rollout record. The README could state this.
  • Two _terminal_error_reported branches are untested: two responses, and mixed attempt statuses.
  • Merge order: harness_conformance runs all four probes for any shared-file change, so model_error should fail for each harness until its fix lands. If that check is required, this should merge last or together with fix(pi): report session errors and retain ownership #4739-fix(hermes): retain session evidence and report provider errors #4742.

Generated by Claude Code

This branch was previously deployed

1 inactive deployment
public — 81b73610 Deployed Oct 20, 2026 by copy-pr-bot[bot] via release / finalize / notify #5941
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior ci CI, automation, test queue, or workflow infrastructure work complexity:medium Single-domain change with interacting parts or a moderate review surface needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants