Repository navigation
feat(conformance): run Stirrup through the harness conformance checks - #4687
Merged
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
marta-sd
force-pushed
the
martas/stirrup-harness-conformance
branch
from
October 20, 2026 07:15
23ed1f6 to
53cf250
Compare
marta-sd
marked this pull request as ready for review
October 20, 2026 07:16
Contributor
Author
|
/ok to test 53cf250 |
lafrancef
previously approved these changes
Oct 20, 2026
| return [v for v in value if isinstance(v, dict)] if isinstance(value, list) else [] | ||
|
|
||
|
|
||
| def _as_text(value: object) -> object: |
Contributor
There was a problem hiding this comment.
Maybe check whether this already exists as a util somewhere
Contributor
Author
There was a problem hiding this comment.
I found private _message_content_to_text:
Gym/nemo_gym/responses_converter.py
Line 83 in c2f1e3e
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
A harness may send a tool result as Chat Completions text parts while the trajectory records it as a string, since Gym's Responses-typed record cannot hold Chat parts verbatim. Compare the text; the exact request is kept in the model-call capture. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
…ling it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
marta-sd
force-pushed
the
martas/stirrup-harness-conformance
branch
from
October 20, 2026 12:54
53cf250 to
b837a7f
Compare
Contributor
|
🌿 Preview your docs: https://nvidia-preview-pr-4687-130027c29fe4.docs.buildwithfern.com/nemo/gym |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
lafrancef
approved these changes
Oct 20, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39455595752 |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Runs Stirrup through the harness conformance checks, and fixes what that exposed. #4178 has merged, so this is based on
main.rollouts.jsonlis empty and the scenario expects a terminal model error, the runner inspectsrollouts_failures.jsonland reportsdelivery="failure_record". For a harness that raises instead of reporting a failed response, themodel_errorrun then shows two failing checks (model.terminal_errorand the usage health check) where it showed 31, almost all "required input is unavailable". I measured this with the Stirrup agent as it was before the last fix below.finishtool call. The probe calls an advertisedfinishorsubmittool when its required arguments are strings or arrays,tool_checksleaves that call out of the shell-tool witness, and the verifier accepts the answer in the call.tools.witness_outputcompared a list to a string. The exact request stays in the model-call capture.stirrupjoinsregistry.HARNESSES.ci.install_runtimepasses--override overrides.txtwhen the adapter has one, asnemo_gym/cli/setup_command.pydoes, and returns after the requirements install because Stirrup installs its runtime in the task sandbox. The launch test imports an adapter module only whenHARNESSnames it, since a CI job installs only its own adapter's dependencies.model_errorfailed seven checks. For 400, 413 and 422 the runner now ends the episode with the turns completed so far, and the agent returnsstatus: failed, anerrorthat contains the provider's message, andmetadata.stop_reason: model_error, as the pi agent does. Other model server errors still fail the episode. An episode whose only request was rejected reports zero usage; a request killed in flight keeps unknown usage.install_runtimetest moves out of the unit job. Intests/unit_testsit imported each harness's setup module, which put about 230 statements (156 unexecuted there) into the measured set and took the unit job to 94.76% against its 95% gate. It now lives inscripts/harness_conformance/tests, next to the other conformance tooling tests, which the gate omits. This changes which modules the unit job imports. It adds no coverage: the setup modules have their own tests in the per-agent suites.No separate issue: this follows the harness swappability work (#4489, #4562, #4178, #4782).
Validation
Run against the final diff:
pytest scripts/harness_conformance/tests tests/unit_tests/harness_capabilities tests/unit_tests/test_harness_conformance_ci.py tests/unit_tests/test_harness_conformance_checks.py tests/unit_tests/test_cli_setup_command.py: 494 passed, 2 skipped.responses_api_agents/stirrup_agent/requirements.txtwith itsoverrides.txt, andHARNESS=stirrup(the CI validate step):pytest scripts/harness_conformance/tests tests/unit_tests/harness_capabilities responses_api_agents/stirrup_agent/tests: 509 passed, 2 skipped.python scripts/run_harness_conformance.py --harness stirrupin that venv: 7 of 7 scenarios fulfilled, andmodel_errordelivers a rollout.ruff checkandruff format --checkon the changed paths pass, and the pre-commit hooks ran on each commit.Not run:
pre-commit run --all-files, and GitHub Actions on this head. The previous head passed the Stirrup probe job but failed the unit job's coverage gate for the reason in the last item above. The pi, codex and opencode probe jobs fail the same way onmain.Rollouts
N/A for model rollouts. The conformance probes use a scripted model server. A rejected request in a real GDPVal episode was not run end to end.
resources_servers/gdpval/app.pyspecial-cases onlystop_reason == "wall_time", so amodel_errorresponse is judged on whatever deliverables exist.Compatibility and benchmark impact
model_errorbehavior.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).🤖 Generated with Claude Code