Skip to content

fix(critpt): remove grader-specific request and response byte caps - #5899

Merged
Kipok merged 4 commits into
NVIDIA-NeMo:mainfrom
Kipok:codex/critpt-response-transport
Nov 17, 2026
Merged

Kipok merged 4 commits into
NVIDIA-NeMo:mainfrom
Kipok:codex/critpt-response-transport

Conversation

@Kipok

@Kipok Kipok commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

CritPt rejects valid saved responses or prompt history above 1 MiB before extracting the final executable answer, and rejects whole HTTP requests above 10 MiB. Separate reasoning and multi-turn history can exceed those bounds while the final Python source remains small.

Remove the grader-specific prompt/response and whole-request byte caps, following Gym's standard HTTP request handling. Retain task, executable-source, result, JSON node/depth/type and response-shape validation; malformed requests still return category-only errors without logging their contents. Source extraction, saved response metadata and terminal truncation scoring remain unchanged. Transport protection belongs to the common server/deployment policy rather than this benchmark.

Previously rejected long responses can now reach normal grading, so coverage and scores may change. Follow-up to #4629; a separate issue is unnecessary for this focused validation bug. No external code or private benchmark data is included.

Validation on the final change:

  • CritPt tests excluding the local end-to-end file: 1,833 passed, 1 skipped.
  • Existing real local-provider end-to-end test: 1 passed outside the restricted sandbox.
  • New HTTP regression coverage: reasoning and prompt history above 1 MiB; requests above 10 MiB on both /verify and /seed_session; saved-response replay; unchanged executable-source limits, truncation scoring and JSON structural/type checks.
  • The long-reasoning regression fails against unchanged upstream code.
  • All-file pre-commit passed; its guardwords hook reports that the private catalog is unavailable.
  • Reviewed final diff; both commits include DCO sign-off.

Representative model-to-agent-to-verifier qualification (2026-11-13): three fresh SimpleAgent runs using openai/openai/gpt-5.6-luna, medium reasoning, 4,096 output-token cap, on the shipped integer-step, rational-half and reciprocal-tolerance example contracts. Each generated answer was replayed through the full baseline verifier/runtime at main d50f0763ff03f3b7efd1e1e476d507001588ccf9, using the same sandbox image and execution settings: 3/3 passed on baseline and head, all three rewards identical, no head masking. A supplementary 1,133,129-byte request adds synthetic history to a saved fresh answer: head grades it successfully with unchanged reward; baseline rejects it with HTTP 422. This history is synthetic, not a naturally long generation. All 22 sandboxes from the successful qualification were deleted; earlier harness-development attempts were also cleaned up. This is bounded example-contract evidence, not private/full-benchmark score parity.

Current-main integration: the previously failing sandbox supervision and KiloCode supervision cases are outside this PR's changed files; all 18 cases passed locally on the refreshed head. Hosted CI remains independent.

Suggested labels: bug, area:environment, needs-review. CI classification: server-only. A maintainer may need to authorize CI for the current full head SHA; no /ok to test comment was posted.

Current-main refresh (2026-11-16): includes main fc109f3f845e4f25526b20e01cc785a02e84f5ad. Validated head 37a9731e6bf768003e40af15952c961af4cbfb72: 2831 passed, 1 skipped, 4 warnings. All-file pre-commit, whitespace and DCO checks passed. Three independent local review passes: SHIP using the protected-main rubric; this is not hosted approval. The shared OpenSandbox provider/cleanup/lifecycle/compose/checkpoint suite also passes (501 tests). Prior live model evidence remains bounded to its documented revision and scope; no fresh current-head live run is claimed. Hosted CI and maintainer review for this head remain independent.

@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 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.

@Kipok Kipok changed the title fix(critpt): bound full requests instead of reasoning envelopes fix(critpt): remove grader-specific request and response byte caps Nov 10, 2026
@Kipok
Kipok marked this pull request as ready for review November 10, 2026 00:35
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Nov 11, 2026
@adil-a

adil-a commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

/ok to test a4d247f

@adil-a

adil-a commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

/review

@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 11, 2026 07:18

@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

I found no implementation defect in the changed validation paths. The required real-model smoke evidence is missing.

RISK — Record a representative model-to-verifier smoke run

Removing the envelope rejection in request validation lets previously rejected long responses reach grading. This changes environment behavior and can change scored coverage. AGENTS.md requires representative real smoke rollouts with a model and inspection of agent and verifier behavior.

The PR explicitly reports no new model generation. The long-envelope regressions exercise HTTP handling with a fake grader. The local-provider test executes the grader, but directly supplies reference and wrong source without a model or response adapter. Neither establishes the required model-to-verifier smoke result on this head.

Could you run the standard model→agent→verifier flow on representative tasks, inspect the trajectories, and record the head SHA, model/config, task count, rewards/categories, masking and cleanup outcomes in the PR? This needs validation evidence, not a code rewrite. Exercise a real long response or history crossing the former 1 MiB envelope bound where available; otherwise identify that remaining coverage limit explicitly.

Acceptance: provide the smoke result and inspection showing that grades match the generated answers and infrastructure failures remain distinct from model failures. Retain the concrete assertions in the long-reasoning regression: a correct small final source passes despite long reasoning/history; replay preserves the saved envelope; max_output_tokens truncation scores zero without grading; and source above its configured limit returns candidate_source_limit without grading.

I reviewed all four changed files and their directly affected contracts. This was a static, read-only review; I didn't execute tests or independently confirm the reported test results.

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 Nov 11, 2026
@Kipok

Kipok commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Added the requested real model → SimpleAgent → verifier smoke and matched full baseline replay. All three shipped example contracts pass on both revisions, with no masked head results. A supplementary 1,133,129-byte synthetic-history request grades on head and is rejected with 422 on baseline. All 22 qualification sandboxes were deleted. The description preserves the bounded-example scope; no full/private-benchmark parity is claimed. Current component suite: 2,816 passed, 1 skipped. The two previously failing CI test groups are outside this diff; all 18 supervision cases passed locally on refreshed main.

Validated current head: 5f317ce90b250f203f67cfa9f8ce6d0769d2d1fb. Local review does not replace hosted CI or maintainer approval.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added bug Something isn't working area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers needs-review PR is ready for code review and waiting on a reviewer labels Nov 16, 2026
@Kipok

Kipok commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 37a9731

@Kipok

Kipok commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/review mode=strict reset=true

@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

LGTM — no concerns found.

I reviewed all four changed files and traced the affected request validation, task/wire limits and scoring paths. The envelope validators keep response-shape validation, while task, executable-source and result limits stay separate. The new regressions cover long envelopes, replay, truncation and source limits.

The recorded model→SimpleAgent→verifier qualification addresses the earlier missing-smoke-evidence finding. The author reports 3/3 example contracts passing on baseline and head with identical rewards, no head masking and sandbox cleanup. That evidence covers the documented earlier revision. The supplementary long history is synthetic, not a naturally long generation or evidence of full-benchmark parity.

This was a static, read-only review. I did not execute tests or independently confirm the reported test, live-run or CI results.

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

@Kipok
Kipok enabled auto-merge November 17, 2026 00:20
@Kipok
Kipok 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/43987480299

Merged via the queue into NVIDIA-NeMo:main with commit 8a0b467 Nov 17, 2026
69 checks passed
@Kipok
Kipok deleted the codex/critpt-response-transport branch November 17, 2026 00:39
osoblanco added a commit to osoblanco/Gym that referenced this pull request Nov 17, 2026
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]>
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 bug Something isn't working 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.

4 participants