Skip to content

feat(critpt_custom_grader): add agentic recipe, semantic validators and opt-in Stirrup overflow recovery - #5226

Merged
Kipok merged 17 commits into
NVIDIA-NeMo:mainfrom
osoblanco:critpt-agentic-grader
Nov 18, 2026
Merged

Kipok merged 17 commits into
NVIDIA-NeMo:mainfrom
osoblanco:critpt-agentic-grader

Conversation

@osoblanco

@osoblanco osoblanco commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Extends critpt_custom_grader (#4629) with two opt-in features, adds one opt-in option to the Stirrup agent, and fixes how the grader reads failure_report (item 4). Apart from that fix, grading with the default configuration (answer_source: output_text, no agentic_execution, no semantic_validators) behaves as on main.

1. Agentic recipe (configs/critpt_custom_grader_agentic.yaml). It composes the grader with the Stirrup agent:

  • /code_exec runs the model's commands in a per-episode Linux sandbox whose provider configuration must deny network egress. The server refuses to start on a configuration that does not establish that, and the sandbox provider enforces it. Files persist for the episode, and the sandbox receives no task data.
  • The sandbox belongs to the episode's resources session and uses ResourcesSessionLocks and ResourcesSessionFences. A server with agentic_execution runs with one worker.
  • Stirrup's built-in code_exec is off. Its orchestration sandbox keeps network access, because it must reach the model and Gym.
  • The model submits with finish(reason, derivation, answer). With answer_source: finish_tool the grader grades only the acknowledged finish.answer, in the grader's isolated reference, candidate and comparison sandboxes.
  • A completed episode without an answer, an exhausted turn budget, a response that stops at max_output_tokens or on a content filter without an accepted finish, and Stirrup's compaction_failed outcome score zero. Provider failures, wall-clock stops, cancellations and rejected model requests stay unscorable. Malformed, duplicate or contradictory finish evidence is submission_invalid: unscorable and terminal.

The recipe provides the execution and submission mechanisms that Artificial Analysis's published CritPt v2 methodology describes: Stirrup, an offline Linux Python 3.13 environment with NumPy, SciPy, SymPy and Matplotlib, up to 50 turns, a structured finish tool and five repeats. The operator supplies the images and the model settings. The README separates the published requirements from this recipe's own package pins and limits. This PR does not claim equivalence with Artificial Analysis's generation or grading and calls no external grading API.

2. Semantic answer validators. A task with several valid answers can select an operator-registered validator. It receives decoded values, the original inputs and bounded JSON configuration, and runs in the protected comparator sandbox under resource limits and per-case deadlines. The same predicate checks the reference outputs before any candidate runs. After a successful reference preflight, a candidate the validator rejects scores zero, unless the validator fails or times out on another case of the same task, which leaves the row unscorable. An invalid reference, a validator exception, a non-Boolean return and a timeout stay unscorable, also with score_comparator_uncertain_as_incorrect set. The examples are synthetic; the mechanism supplies no benchmark's acceptance policy.

3. Stirrup: context_overflow_recovery (default false). With it on, an HTTP 400 or 413 rejection whose error object carries the code context_length_exceeded lets Stirrup drop the latest completed turn and send the request again. When Stirrup can drop no further turn (it keeps the task, everything up to the latest compaction summary and at least one completed turn after it), the episode ends with the model server's own status and message. The CritPt recipe turns the option on and documents the two vllm_model settings it relies on, propagate_context_overflow_errors and refit_output_budget_to_prompt. The recipe cannot set them, because the model server is the operator's; with vllm_model defaults the rejection never reaches the agent and nothing is recovered.

4. Fix: a verify request that carries failure_report. Since #5128, the single_agent_turn environment servers and the agents that verify through verify_agent_response add failure_report to every /verify request they send. The grader reads every field it does not own as task data and its task schema forbids unknown keys, so on main it answers task_invalid for every rollout verified that way, its default recipe (through single_agent_turn_legacy) included. The grader now treats failure_report as a framework field. The new test test_failure_report_of_the_verify_request_is_not_task_data fails on main and passes here.

Two supporting Stirrup edits are not behind the option and change nothing while it is off: a failed compaction reports the history as it was before any overflow drop, and the runner's Observer keeps a reference to each tool message it records, so a dropped message's identity is never reused.

Tests and docs: new grader suites test_agentic_recipe.py, test_agentic_tools.py, test_submission.py, test_semantic_execution.py, test_semantic_end_to_end_local.py and test_semantic_runner_remote.py, with additions to the grader's and the Stirrup agent's suites and to the core task-data test. The grader README gains "Agentic code execution" and "Semantic answer validators"; the Stirrup README gains "Context overflow recovery".

No separate issue: this continues #4629.

Changes since the previous head (bb4549a7), after merging main

All of them are in d5f2839c19a42e0ce7be184fdcbfd7567ed8d629, the merge of main into bb4549a7, and in no earlier commit. The head, b7cb8c5a6c82d7194201005019d4304f980891d6, then merges main at 951ee9ec without conflicts and changes none of the PR's lines. Please review the PR's diff against main; the list below is what this PR changed since bb4549a7. That commit's diff against bb4549a7, limited to the PR's files, also contains main's own changes to those files, for example #5416 and #4790 in the grader's app.py. Three earlier branch commits (24494ebc0, 302caa1a1, 8005d6665) add code that this merge removes or reworks.

  • Footprint: 36 files against main, down from 40. configs/critpt_custom_grader.yaml, nemo_gym/data/__init__.py, Stirrup's tests/test_sessions.py and vllm_model's app.py and README.md are identical to main again, and vllm_model's tests/test_context_budget.py, which the previous head added, is removed. tests/test_semantic_end_to_end_local.py is new and grades a synthetic semantic-validator task through the local provider, and tests/test_runner_remote.py now differs from main (see below).
  • vLLM model server: no longer touched. The PR's fit_completion_to_context is dropped; main's refit_output_budget_to_prompt (feat(vllm_model): opt-in refit of the output budget to the prompt #5864) covers what the recipe needs.
  • Compaction failure: main's handling (fix(stirrup_agent): grade unusable compaction summaries as the model's output #5822) is used; the PR's own mechanism and its diagnostics keys are removed. In finish_tool mode the grader scores a failed response that the agent classified agent_invalid_output, which is how Stirrup reports compaction_failed, zero as candidate_no_answer, and a resumed run does not generate it again. The previous head left that outcome unscored.
  • max_turns stop reason: main's (fix(stirrup): report a run that exhausts its turns as stop_reason max_turns #5937).
  • Context-overflow recovery: now opt-in. The runner reports the provider's rejection instead of a normalized status. The rejection is recognized only by the code of the OpenAI error object; the detail-envelope branch is removed.
  • Execution sandboxes: ported from the removed ResourcesSessionFence to main's ResourcesSessionLocks and ResourcesSessionFences (refactor(sessions): one name per session lifecycle concept before release #5083). The server keeps its own seed and close for these sessions and passes check_resources_session_contract with keeps_state=True. Several workers (feat(server): run every server that can with several workers #4790) are refused when agentic_execution is set.
  • /code_exec errors: a lost or expired resources session answers 404 with Gym's lost-session body (detail.failure_kind is session_lost or session_expired) instead of {"detail": "session_unavailable"}.
  • Execution limits: agentic_execution.max_command_bytes is capped at 64 KiB (was 1 MiB). A command whose shell-quoted form exceeds 127 KiB gets a repairable invalid_argument result. The E2B offline check also refuses create.network and create.custom_extension_params. A session whose sandbox has already stopped gives back its max_sessions slot.
  • Semantic validators, cost only when used: the two extra comparator uploads and the larger job-file limit apply only to a task that selects a validator. The validator part of the reference-cache key and the higher minimum execution.job_timeout_s apply only to a server that configures semantic_validators. A validator failure or timeout stays unscorable with score_comparator_uncertain_as_incorrect (fix(critpt): allow terminal zero scores for comparator uncertainty #5416) set.
  • Response size in finish_tool mode: agentic_max_response_bytes is unchanged; its lower bound is MAX_RESPONSE_BYTES, and in that mode the request limit is 2 * MAX_TASK_BYTES + 2 * agentic_max_response_bytes in place of MAX_REQUEST_BYTES. The PR's streaming rewrite of _read_json is replaced by main's whole-body read with the mode's limit. fix(critpt): remove grader-specific request and response byte caps #5899, which is open, removes MAX_RESPONSE_BYTES, MAX_REQUEST_BYTES and the 413 request_limit path; if it lands first I will drop the option, its line in the recipe YAML and the /finish and /code_exec body limits that depend on them.
  • Remote runner tests: tests/test_runner_remote.py built ExecutionPolicy with four arguments the policy does not have (snapshot, os_user, owner_id, journal_dir) and expected a 2 GiB address-space limit without setting it. Those lines are unchanged from main, so nine of its tests fail there too when the suite runs. This PR removes the four arguments and sets memory_limit_mib=2048 in that one test, so the job-size boundary tests now exercise the runner code this PR changes.
  • failure_report in verify requests: the fix described in item 4, found by the first real-model run of the recipe on an earlier merge of main (see the end of Rollouts).
  • Core library: no change under nemo_gym/.

Validation

On the tree of b7cb8c5a6c82d7194201005019d4304f980891d6, which merges main at 951ee9ec835dde26c32302dcb86bcf0ed445bf4d, unpacked from a source archive on Linux (aarch64), with the repository's CI scripts and the commands of its workflows:

  • ./scripts/ci/lint.sh: passed with no file modified. The guardwords hook had no catalog available and skipped, so guardwords are left to the repository's own check.
  • uv run --no-project --python 3.13.14 python scripts/component_locks.py: all 303 projects passed.
  • detect-secrets-hook --baseline .github/workflows/config/.secrets.baseline on the PR's files: passed against main's baseline at 951ee9ec.
  • ./scripts/ci/core_unit_tests.sh <0..3> 4: 22,384 passed, 116 skipped. Sandbox tests (pytest --cov=. --cov-report= --cov-fail-under=0 --durations=10 -m sandbox): 1,557 passed, 7 skipped. None of the skips is in a test this PR adds or changes. scripts/ci/combine_core_coverage.py: 95.08 % (gate 95 %).
  • gym env test +entrypoint=resources_servers/critpt_custom_grader +should_validate_data=true: 2,047 passed, 2 skipped. The two skips are two whole modules, tests/test_runner_remote.py and tests/test_semantic_runner_remote.py, which run only with NG_CRITPT_RUNNER_REMOTE=1 inside a disposable non-root sandbox.
  • Those two modules, on the tree of d5f2839c (this head leaves the grader's files unchanged), each in a disposable container built from runtime/Dockerfile with no network, a non-root user, no capabilities and a read-only root, with NG_CRITPT_RUNNER_REMOTE=1 set only inside the container: tests/test_runner_remote.py 157 passed, tests/test_semantic_runner_remote.py 16 passed.
  • The same grader suite on main at b02f8d09 (main's grader is unchanged since) with only the new failure_report test added: both cases of that test fail (task_invalid instead of passed), 1,828 other tests pass and 1 is skipped.
  • gym env test +entrypoint=responses_api_agents/stirrup_agent +should_validate_data=true: 214 passed.
  • gym env test +entrypoint=responses_api_models/vllm_model +should_validate_data=true: 1,197 passed.
  • gym env test +entrypoint=resources_servers/gdpval +should_validate_data=true and gym env test +entrypoint=resources_servers/aa_briefcase_lite +should_validate_data=true, the two other components whose tests read the Stirrup agent's files: 969 passed, 2 skipped; and 97 passed.
  • Stirrup harness conformance, in the CI order (scripts.harness_conformance.ci install, the conformance and adapter tests, scripts/run_harness_conformance.py --harness stirrup): 690 tests passed, 14 skipped; all nine probe scenarios fulfilled, with no difference from main run side by side on the same machine.

Not run locally: the eight-shard server suite (./scripts/ci/server_tests.sh), which CI runs for this diff because it also touches scripts/ and tests/. It needs CI's shared test data and system packages.

Rollouts

One real-model run on the tree of d5f2839c, the merge before this head (this head adds only main's newer commits; the PR's own changes are identical): the shipped synthetic example through the shipped agentic recipe, with the README's command (gym eval run --no-serve --agent critpt_custom_grader_stirrup_agent --input resources_servers/critpt_custom_grader/data/agentic_example.jsonl --prompt-config resources_servers/critpt_custom_grader/prompts/agentic.yaml --num-repeats 5 --output …) plus overrides for the head-server address, observability and model-call capture, one attempt per rollout.

  • Model: Qwen/Qwen3.8-27B, served by vLLM 0.28.0 (vllm/vllm-openai:v0.28.0) with data parallelism 4, a 262,144-token context, MTP speculative decoding, the qwen3_coder tool parser and the qwen3 reasoning parser. Thinking on, temperature 1.0, top-p 0.95.
  • Model server: vllm_model with propagate_context_overflow_errors: true and refit_output_budget_to_prompt: true, as the recipe's README asks. The agent asked for the whole window (min_completion_tokens = max_completion_tokens_cap = context_window_tokens = 262,144).
  • Sandboxes: Gym's docker provider, through a rootless Podman command wrapper, in place of the recipe's OpenSandbox provider. The execution and grading sandboxes had no network: a probe in each image, run with --network none, saw only the loopback interface, could not open an outbound connection, and ran as uid 1000. The orchestration sandbox used host networking, so it could reach the model and Gym as the recipe requires. The execution image provided Python 3.13.14 with NumPy 2.5.1, SciPy 1.18.0, SymPy 1.14.0 and Matplotlib 3.11.0.

Result: all 5 rollouts were scored and unmasked, each with reward 1.0 (passed). Every episode ended with one accepted and acknowledged finish, after one code_exec call in which the model tested its function, including integers above 64 bits; all 5 commands exited 0. vLLM refused the first request of each of the 10 model calls with HTTP 400, because 262,144 output tokens plus the prompt exceed the window; vllm_model refitted the budget to 260,751–261,222 tokens and resent it, and all 10 calls were answered with HTTP 200. There were no failure rows, and cleanup resolved with no container left.

Not exercised: compaction and context-overflow recovery, since each episode took two model calls. The Stirrup tests above cover both.

The first run of this recipe, on an earlier merge of main into this branch without the fix, found the failure_report problem (item 4): the grader refused all five episodes as task_invalid.

Compatibility and benchmark impact

  • Default configuration (answer_source: output_text, no agentic_execution, no semantic_validators): apart from the failure_report fix (item 4), which grades rollouts that main answers task_invalid, grading results, request limits, timeouts and error bodies are unchanged, and configs/critpt_custom_grader.yaml is identical to main. Two more things change for every deployment:
    • The reference-cache key changes, because it covers runner.py and task_data.py, which this PR edits. A cache persisted with reference_cache_dir by an earlier build is recomputed once; grading results do not change. The shipped config does not persist the cache.
    • The grader's package now also installs stirrup==0.1.12 and Pillow==12.3.0 (with a pillow override recorded in scripts/component-lock-policy.json). Both are already used by responses_api_agents/stirrup_agent, and they are imported only when /code_exec runs.
  • Benchmark results: no shipped benchmark configuration changes, but the default recipe now grades the rollouts that main refuses as task_invalid (item 4). Only the new recipe sets answer_source: finish_tool or context_overflow_recovery. The recipe is verified: false and ships a one-row synthetic example, not a benchmark release or a baseline.
  • finish_tool mode: the grader takes the last fenced block of finish.answer whose info string is empty or python, else the whole answer. The recipe's dataset sets num_repeats: 5: the result is the mean of five independently scored attempts per task; there is no best-of-five credit. Infrastructure failures stay unscorable and must be reported as incomplete coverage. A rejected model request is response_incomplete and not terminal, so resuming the run generates that attempt again.
  • With semantic validators registered: the validator registry is part of the reference-cache key, so registering, changing or removing any validator invalidates the cached preflight of every task. Startup refuses an explicit execution.job_timeout_s below a higher minimum: with the shipped limits it rises from 9595 s to 9725 s, so the default config's 9700 s has to be raised before validators are added to it (the agentic recipe sets 9800 s). The comparison of a task that selects a validator sets RLIMIT_FSIZE to 161,546,240 bytes instead of 156,303,360. A validator owns its acceptance rule and numerical tolerances.
  • Stirrup agent: context_overflow_recovery defaults to false; existing configurations are unaffected. With it on, a dropped turn is absent from the output items, but its model call, token usage and tool executions stay in the reported evidence, and whatever its commands changed in the sandbox stays changed. A dropped turn no longer counts against agent_max_turns, so only the agent's wall-clock limit (sandbox_runner_timeout_seconds, or a task row's shorter timeout) bounds repeated recovery.
  • vLLM model server: none.
New configuration keys, categories and prerequisites
  • New configuration keys (all optional): grader answer_source (output_text), agentic_execution (unset; requires answer_source: finish_tool), agentic_max_response_bytes (32 MiB, 1 MiB to 128 MiB, read only in finish_tool mode) and semantic_validators (empty; at most 64 validators, 256 KiB of source each); task field semantic_validator: {id, config} (config at most 16 KiB, value expectations only); under agentic_execution: sandbox_provider and sandbox_spec.image (required), command_timeout_s (300), provider_timeout_margin_s (60), max_command_bytes (65536, also its maximum), max_output_bytes (1 MiB), max_sessions (16), create_timeout_s (600), close_timeout_s (60); Stirrup context_overflow_recovery (false).
  • New categories and statuses (none in the default configuration): /verify in finish_tool mode adds candidate_no_answer (scored zero) and submission_invalid (unscorable, terminal), and its request_limit threshold becomes 8 MiB plus twice agentic_max_response_bytes (72 MiB by default). task_invalid also covers a semantic_validator identifier the server has not registered. /seed_session with agentic_execution answers 422 session_identity_required, 409 session_conflict, 503 execution_unavailable and 503 server_not_ready. /finish answers 422 invalid_finish. /code_exec answers 422 invalid_code_exec, 404 with Gym's lost-session body and 503 execution_unavailable.
  • Agentic recipe prerequisites: no image is shipped. The operator builds and publishes the grading image (runtime/Dockerfile), the execution image (runtime/agentic/Dockerfile) and an orchestration image, and sets CRITPT_CUSTOM_GRADER_IMAGE, CRITPT_AGENTIC_EXECUTION_IMAGE and CRITPT_AGENTIC_ORCHESTRATION_IMAGE. The execution sandbox starts only on a provider whose configuration establishes no egress: OpenSandbox with a deny-all network policy (the shipped recipe), Docker with network: none, or E2B with internet access off. Every other provider is refused at startup.

Proposed labels: feature, area:environment, and needs-review.

CI note: the commits are not cryptographically signed, so the mirrored CI needs a maintainer to comment /ok to test b7cb8c5a6c82d7194201005019d4304f980891d6 with the full 40-character SHA.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Documentation added or updated, or N/A with justification.
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format checks pass).
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Oct 28, 2026
@osoblanco
osoblanco marked this pull request as ready for review October 28, 2026 21:41
@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers blocked Work cannot move forward until an external dependency is cleared feature New capabilities, enhancements, or enablement work labels Oct 28, 2026
@osoblanco osoblanco changed the title feat(critpt): add offline agentic execution and finish submissions feat(critpt): add agentic execution and semantic validation Oct 29, 2026
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 29, 2026
osoblanco and others added 2 commits October 31, 2026 00:51
Integrate the fix and error regression coverage from NVIDIA-NeMo#5383:
31b36e3 and
b4dd15e.

Apply the scored-zero outcome to output_text responses and preserve the
agentic finish-tool precedence for infrastructure and invalid evidence.
Add regressions for finish-tool handling and malformed request metadata.

Co-authored-by: Igor Gitman <[email protected]>
Signed-off-by: Igor Gitman <[email protected]>
Signed-off-by: Erik Arakelyan <[email protected]>
@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test 7fe223a

@cmunley1

Copy link
Copy Markdown
Contributor

/review

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP WITH CARE — one RISK: mixed-language fences can cause a valid acknowledged Python submission to be extracted incorrectly and scored zero.

Completed the broad review across all 27 changed files and their affected grading, session, provider, and trajectory contracts. The PR supplies representative real-smoke evidence. This review was static; no tests or rollouts were executed.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 30, 2026
@osoblanco
osoblanco marked this pull request as draft November 1, 2026 13:14
@osoblanco
osoblanco marked this pull request as ready for review November 2, 2026 13:16
@svcnvidia-nemo-ci svcnvidia-nemo-ci added waiting-on-maintainers Waiting on maintainers to respond and removed waiting-on-maintainers Waiting on maintainers to respond labels Nov 9, 2026
Merge main at 330c461 into the agentic CritPt branch. Where main has
since added its own handling for something this branch also changed,
the merge keeps main's version:

- responses_api_models/vllm_model is identical to main. The exact
  completion fitting is dropped; main's refit_output_budget_to_prompt
  (NVIDIA-NeMo#5864) covers what the agentic recipe needs.
- Stirrup compaction failure uses main's handling (NVIDIA-NeMo#5822) and its
  max_turns stop reason (NVIDIA-NeMo#5937). In finish_tool mode the grader scores
  an agent_invalid_output response zero as candidate_no_answer.
- Context-overflow recovery becomes the opt-in Stirrup option
  context_overflow_recovery (default false). The runner reports the
  model server's own rejection.
- The grader's execution sessions use ResourcesSessionLocks and
  ResourcesSessionFences (NVIDIA-NeMo#5083); agentic_execution refuses several
  workers (NVIDIA-NeMo#4790).
- A semantic validator failure or timeout stays unscorable with
  score_comparator_uncertain_as_incorrect (NVIDIA-NeMo#5416).
- nemo_gym/ is unchanged.

Two fixes found while validating the merge:

- Since NVIDIA-NeMo#5128 the single_agent_turn environment servers and the agents
  that verify through verify_agent_response send failure_report with
  every /verify request. The grader read it as an unknown task field
  and answered task_invalid for every such rollout; it is now a
  framework field.
- tests/test_runner_remote.py built ExecutionPolicy with four arguments
  the policy does not have and expected a 2 GiB address-space limit it
  never set, so nine of its tests failed; both are corrected.

Also included: fixes from a review of the merged diff (session glossary
wording, main's lost-session body on /code_exec, tighter execution
limits, a stopped session releasing its capacity slot, route tests, and
a local end-to-end grade of a semantic-validator task).

Signed-off-by: Erik Arakelyan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@osoblanco osoblanco changed the title feat(critpt): add agentic execution and semantic validation feat(critpt_custom_grader): add agentic recipe, semantic validators and opt-in Stirrup overflow recovery Nov 15, 2026
A clean merge. Main's NVIDIA-NeMo#6140 (the Stirrup client's per-image token
estimate) changes four files this branch also changes, in other lines;
neither side's changes are altered. It also brings main's repaired
secrets baseline (NVIDIA-NeMo#6083).

Signed-off-by: Erik Arakelyan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@osoblanco

Copy link
Copy Markdown
Contributor Author

I merged main into this branch; the new head is b7cb8c5a6c82d7194201005019d4304f980891d6. Where main had added its own handling for something this PR also changed, the merge takes main's version: the vLLM model server is identical to main, Stirrup's compaction-failure handling and max_turns stop reason are main's, and context-overflow recovery is now an opt-in Stirrup option that is off by default. The description is rewritten for this head and lists what changed since bb4549a7.

This head also fixes a problem on main. Since #5128, the single_agent_turn environment servers and the agents that verify through verify_agent_response send failure_report with every /verify request, which the CritPt grader reads as an unknown task field. On main it therefore answers task_invalid for every rollout verified that way, its default recipe included. The new test test_failure_report_of_the_verify_request_is_not_task_data fails on main and passes here. If you would rather land that fix on its own first, I can open it as a separate small PR: one framework key, its test and a README sentence.

Could a maintainer please, in this order:

  1. comment /ok to test b7cb8c5a6c82d7194201005019d4304f980891d6 so CI runs on this head, and then
  2. comment /review reset=True for a fresh automated review of the new head.

Two questions:

@svcnvidia-nemo-ci svcnvidia-nemo-ci added waiting-on-maintainers Waiting on maintainers to respond and removed waiting-on-maintainers Waiting on maintainers to respond labels Nov 15, 2026
osoblanco and others added 3 commits November 18, 2026 02:32
Main's NVIDIA-NeMo#5899 removes the grader's request and response byte caps. It
conflicts with this branch in the grader's app.py, README.md and
tests/test_app.py; its task_data.py change merges cleanly. The merge
takes main's cap-free request handling, also for /finish and
/code_exec, and drops agentic_max_response_bytes, which set those caps
in finish_tool mode: the config field, its line in the agentic recipe
and the three tests that exercised it. The command, output, source and
semantic-validator limits stay.

Main's NVIDIA-NeMo#5691 (the Stirrup agent's app.py) and NVIDIA-NeMo#5720 and NVIDIA-NeMo#5780
(scripts/component-lock-policy.json) change files this branch also
changes, in other lines; neither side's changes are altered.

Signed-off-by: Erik Arakelyan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's NVIDIA-NeMo#5997 makes output_dir a required keyword-only argument of
TrainDataProcessor._collate_samples_single_type. The agentic recipe
test calls it directly, so it now passes tmp_path / "prepared", as
main's own tests do.

Signed-off-by: Erik Arakelyan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's NVIDIA-NeMo#6165 adds a resources_servers/ether0 entry to
scripts/component-lock-policy.json next to this branch's
resources_servers/critpt_custom_grader entry. Both entries are kept, in
sorted order. Main's NVIDIA-NeMo#5597 changes no file this branch changes.

Signed-off-by: Erik Arakelyan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Kipok

Kipok commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

/ok to test a969829

@Kipok

Kipok commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

/review

@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 17, 2026 23:19

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP — the prior finding is fixed, and I found no new regression eligible under the follow-up policy.

The reported mixed-language-fence example now selects only the final Python source. The extractor consumes complete blocks before filtering their languages. The regression tests cover unsupported blocks around accepted answers and retain raw-answer fallback and empty-answer behavior.

I compared the subsequent changes with reviewed head 7fe223a755c173e530eac5d6f97d3ed088a8cd0c across grader scoring, execution-session isolation and Stirrup recovery, then traced their affected contracts and tests. No unresolved prior finding or proven introduced high- or critical-impact regression remains in that scope. This was a follow-up review using the historical moderate-impact threshold, not a fresh whole-PR review.

This review was static. I did not execute tests, build images or run rollouts. Dependency inspection covered declared dependencies and lock-policy metadata, not every transitive lockfile artifact.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@yaoyu-33
yaoyu-33 added this pull request to the merge queue Nov 17, 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/44202337859

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 18, 2026
@Kipok
Kipok added this pull request to the merge queue Nov 18, 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/44206460880

@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-maintainers Waiting on maintainers to respond label Nov 18, 2026
Merged via the queue into NVIDIA-NeMo:main with commit ba9eefc Nov 18, 2026
81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers blocked Work cannot move forward until an external dependency is cleared community-request Issue reported or requested by someone from the community feature New capabilities, enhancements, or enablement work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants