Skip to content

feat(partner_if): add advertised-tool checker and update dataset pin - #5314

Merged
adil-a merged 46 commits into
mainfrom
adhara/instruction-following-benchmark-pi
Nov 23, 2026
Merged

adil-a merged 46 commits into
mainfrom
adhara/instruction-following-benchmark-pi

Conversation

@ADharaUTEXAS123007

@ADharaUTEXAS123007 ADharaUTEXAS123007 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds the advertised-tool checker, stock-agent recorded-context ordering and experimental Prime child evaluation to PartnerIF.

Revision 19340b047f41fb50025da5e9d8e80796ef958756. AGA component checks passed, and the automated follow-up returned SHIP after confirming the three prior findings were fixed. This extends the existing PartnerIF integration. Automated follow-up

Changes

  • Require exactly one fresh advertised-function call with schema-valid object arguments. Preflight the registry even for an empty answer. Invalid registries and validator recursion make the affected checks unscorable. Keep independent IF items scored when the registry affects completion alone. Supported recursive schemas and valid local references retain their behavior.
  • Replace ngc_recorded_context with stock gymnasium_agent and legacy_agent; remove its replay protocol, receipts, route and scripts. PartnerIF owns /reset, /step, /close, simulation, Explore and semantic verification. The dispatcher normalizes terminal reports. Ordinary text grading retains its stateless/checkpoint behavior.
  • Keep pif_029 at six parent turns/eight total policy calls including Explore, temperature 0.7, top-p 0.95, 8,192 tokens/call and no policy retry. Stop at the first decisive result; mask inconclusive/infrastructure failures. Bound simulator paths, files and output; record coverage gaps.
  • Release simulator state on checkpoint retirement. Preserve empty search streams and empty sed selections. Treat ambiguous quoted or escaped shell punctuation as a coverage gap, classify deeply nested tool arguments as invalid, and roll back virtual writes when a shell command is outside recorded coverage. Support both probe output spellings and reject compound probes before saving files.
  • Reuse PrimeAgent and PrimeSession.install/stage; upload only Gym's generated nemo provider. Use base resources session-state hooks with LentSandboxes. Preserve null outer deadlines and three concurrent repeats.
  • Lock the shared installer with npm ci --install-strategy=shallow --ignore-scripts and registry integrities. Constrain Python runtime/build versions, checksum uv and fingerprint the recipe before cache reuse. Preserve npm/corepack and SDK paths. Python artifacts are not individually hash-locked.
  • Include cache-write tokens in Prime's prompt total and recover corroborated report deliveries after supervisor interruption. Document the SDK child's second pairing and clean-install evidence.
  • Preserve OpenCode's boolean snapshot support and document it. Install Node 22 in all three GitHub server-test jobs. Remove stale VALIDATION.md.

Compared with main, nemo_gym/ and existing environment server implementations are unchanged. Root and Prime uv.lock files match main; Prime's boto3/botocore remain 1.43.124. Public fixtures are synthetic; private rows, credentials and raw captures stay outside Git.

Dataset and measurement contract

Published and pinned PartnerIF 2.1.8 contains 28 tasks, 89 IF items and four completion items; three repeats produce 84 rollouts. The historical 25-task reference score does not apply.

Only pif_029's harness metadata changes from immutable 2.1.7; the other 27 raw rows and all assets are preserved. Both artifacts were downloaded and verified before repinning:

  • partner_if.jsonl: b3ca9f1d103c20b92ec6ed6ce5842d2a5dbf6c57639b0ecc550f2e635c3438b0 (SHA256).
  • partner_if_replay_assets.json: 6aeb50eee500bc6d3a6ffe9d0ff29ad497f44f8044eb2eb0bd154b4adb53b3fd (SHA256).

Gym preparation and strict task-data validation passed for all 28 downloaded rows.

Validation

Live smoke rollouts

Ran Astra smoke rollouts on Linux/ARM64 Slurm compute nodes. Each result lists the revision tested.

Pairing Revision Reward Evidence
Prime SDK child + OpenThoughts-TBLite build-system-task-ordering e85828ce 1.0 The original verifier exited 0. Prime completed five assistant turns with four tool executions and two parent deliveries. Its supervisor confirmed cleanup, and zero containers remained. Gym reported healthy run coverage and marked rollout-quality telemetry unobserved.
Prime SDK child + PartnerIF pif_027 2b6a25a0 1.0 Unmasked. Gym reported one healthy rollout and zero quality findings. Prompt and completion counts matched for all 12 captured policy responses. Prime completed 11 tool executions and delivered one parent report. The supervisor confirmed cleanup, and the job exited 0 with zero containers remaining.
Stock Gymnasium agent + PartnerIF pif_029 e85828ce 1.0 Unmasked. Used the published 2.1.8 row through the dispatcher and legacy relay. Gym reported one healthy rollout and zero faulted model responses.

The second pairing used Gym's existing Harbor Environment Server and the pinned upstream task. The runner installed the verifier's pinned uv 0.9.5 from PyPI after its installer URL returned HTTP 403. It preserved the instructions, verifier files and task limits. Prime's runtime probe confirmed SDK and AI 0.7.0 and the agent-message Python import.

On 19340b047, AGA job 2103393 used Astra as policy and judge. pif_027 and pif_028 each earned 1.0 and were unmasked. The pif_029 rollout was masked because its Explore worker searched a source directory containing files whose contents were absent from the pinned snapshot. The same command reproduced that coverage gap against the checksum-verified snapshot. The job exited 0 and confirmed zero remaining containers. In a three-repeat follow-up on the same revision (AGA job 2103463), every pif_029 rollout earned 1.0 unmasked and reached the decisive ordering verdict. Gym reported three healthy rollouts, and the job confirmed zero remaining containers. On fd95665ff, all three cases scored 1.0 in AGA job 2102306.

Matched reward profile

Compared 607cc64c and e6d135ca with Astra as policy and judge on the same 25 tasks, three repeats per task and 75 scored rollouts per revision. Full IF pass moved from 82.67% to 84.00% and partial IF credit from 92.72% to 92.80%. The five simulated-tool tasks used OpenSandbox on both revisions. There were zero exclusions in the matched comparison. Separately, all nine rollouts on the three added tasks scored 1.0. Profiling commit

Component and runtime checks

Check Result
AGA Linux component tests on 19340b047 768 PartnerIF tests and 168 Prime tests passed in job 2103392.
Local preparation, runtime contracts and dispatcher tests on 19340b047 92 passed.
Prior PartnerIF component and public example data 671 passed. Data validated.
Prime component on 2b6a25a0 154 passed, nine platform-dependent skips. Node child tests and the cache-write regression test ran.
OpenCode component on 19340b047 1,044 passed and nine requiring the OpenCode executable skipped in AGA job 2103416. Two intermittent macOS failures passed on targeted retry.
Benchmark preparation, dispatch, public APIs, session and pairing contracts 1,323 passed.
pre-commit run --all-files Passed. The private guardword catalog was unavailable, so that scan skipped.
Fern docs check Zero errors, one warning.
Prior Linux session, release and runtime-lock regressions at cb6cfc3 62 passed, zero skips on CPython 3.13.14.

Two fresh Linux/ARM64 installs at cb6cfc3 used the shared installer and one immutable image. They produced matching inventories of 390 npm package manifests, 58 Python distributions and three hashed task wheels. Both passed the SDK, AI, agent-message and kernel probes, and both confirmed cleanup. npm ls reported ELSPROBLEMS for three known Prime tarball aliases. The comparison covers repeatability on that pinned image.

The rollouts are single-task smoke evidence. The Prime SDK child remains experimental and evaluation-only. IPython is its sole exposed tool. Training, full trajectory conformance and Terminal-Bench support remain outside the validated scope.

Trusted CI

Nemo_CICD_Test, the core tests and combined coverage, and the server suite passed on 19340b047. The separate non-blocking Environment Server compliance check reported the dispatcher and Prime advisories and set the overall workflow conclusion to failure. Trusted CI result · Advisory check

Remaining merge requirements

  • Obtain required reviewer and code-owner approvals, including @nvidia-nemo/automation for .github/ workflow and secrets-baseline changes.

Authored commits carry DCO sign-off.

@copy-pr-bot

copy-pr-bot Bot commented Oct 29, 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.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers feature New capabilities, enhancements, or enablement work labels Oct 29, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the needs-review PR is ready for code review and waiting on a reviewer label Oct 29, 2026
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 30, 2026
@ADharaUTEXAS123007
ADharaUTEXAS123007 requested review from lafrancef and yaoyu-33 and removed request for yaoyu-33 November 3, 2026 14:45
@github-actions github-actions Bot added sla:review-overdue Review response is over the one-business-day SLA and removed sla:triage-overdue Review assignment is over the one-business-day SLA labels Nov 3, 2026
@ADharaUTEXAS123007
ADharaUTEXAS123007 removed the request for review from lafrancef November 5, 2026 15:27
@github-actions github-actions Bot added sla:triage-overdue Review assignment is over the one-business-day SLA and removed sla:review-overdue Review response is over the one-business-day SLA labels Nov 5, 2026
ADharaUTEXAS123007 and others added 3 commits November 6, 2026 05:40
Preserve Prime's sandbox dependency in the managed project and regenerate its lockfile. Update the Prime adapters to the public agent/sandbox imports and ResourcesSessionFences API.

Validation: 561 partner_if tests plus example data validation; 67 Prime agent tests; 844 preparation/public API checks; the combined component, routing, and migration suite passed 776 tests. Prime lock verification and pre-commit --all-files passed. The private guardword catalog was unavailable. No new model rollout was needed for these packaging/API compatibility changes.
Signed-off-by: Arnab Dhara <[email protected]>
Pin the validated dataset and runtime assets, route the recorded-context task through agent sessions, and stop at a decisive ordering prefix. Keep private inputs external and use synthetic public fixtures. Retain Prime child observations and permit an explicit OpenCode snapshot setting.

Signed-off-by: Arnab Dhara <[email protected]>
@ADharaUTEXAS123007
ADharaUTEXAS123007 requested a review from a team as a code owner November 8, 2026 03:34
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the community-request Issue reported or requested by someone from the community label Nov 19, 2026
@adil-a

adil-a commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

/review reset=True

@adil-a

adil-a commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

/ok to test 2b6a25a

@nemo-automation-bot nemo-automation-bot Bot removed the community-request Issue reported or requested by someone from the community label Nov 19, 2026

@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.

HOLD — one BLOCKER and three RISK findings.

The inline findings cover an advertised-registry validation bypass, recorded-context state left behind by checkpoint retirement, and valid empty pipeline searches being masked.

RISK — Provide reward-profiling evidence for the changed evaluation contract. The PR reports successful single-task smoke rollouts, but no before/after reward profile for the fixed benchmark. This change adds a deterministic checker and changes the cohort and harness settings described in the measurement contract. Smoke reward 1.0 establishes a working pairing, not whether scores shifted unintentionally. Could you record a matched-model, matched-judge comparison on the unchanged task cohort, with aggregate reward, partial IF credit, rollout counts and exclusions, and profile the added tasks separately? Keep the historical 25-task reference distinct from the expanded cohort. Acceptance is a retained profiling result with those numbers and an explanation of observed changes; do not update the historical reference merely to make the comparison pass. The pinned review rubric requires this evidence for verifier or reward changes to a fixed evaluation benchmark.

I checked the current source and regression cases for the earlier findings. Registry-reference preflight, separate parent/Explore ownership, Prime error-capture retention, inventory-aware search coverage and startup rg checks address the earlier concrete examples. The PR now describes real Prime pairing evidence, so I am not repeating the earlier missing-smoke request.

I reviewed the changed areas and traced their affected grading, stock-agent, dispatcher, sandbox and checkpoint contracts. This was static, read-only review. I did not execute tests, verify CI results or independently verify the reported rollouts and private registry releases. I assessed the compressed fixtures through their declared identities, loaders and tests, not their decompressed contents.

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

Comment thread resources_servers/partner_if/checks.py Resolved
@github-actions github-actions Bot removed the sla:review-overdue Review response is over the one-business-day SLA label Nov 19, 2026
Validate advertised tool schemas for empty responses, release recorded-context state on checkpoint retirement, and preserve empty search input.

AGA job 2098260 passed 738 PartnerIF tests. With Astra as policy and judge, 75 rollouts per revision on the same 25 tasks gave 82.67% to 84.00% full IF pass and 92.72% to 92.80% partial IF credit, with zero exclusions after rerunning the five simulated-tool tasks through OpenSandbox on both revisions. All nine rollouts on the three added tasks scored 1.0.

Signed-off-by: Arnab Dhara <[email protected]>
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the community-request Issue reported or requested by someone from the community label Nov 20, 2026
@ADharaUTEXAS123007

Copy link
Copy Markdown
Contributor Author

/review reset=true

@nemo-automation-bot nemo-automation-bot Bot removed the community-request Issue reported or requested by someone from the community label Nov 20, 2026
@ADharaUTEXAS123007

Copy link
Copy Markdown
Contributor Author

/ok to test e6d135c

@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.

HOLD — one BLOCKER and three RISK findings.

The findings cover completion-only registry failures masking independent IF results, Prime delivery evidence lost on supervisor termination, and two frozen-filesystem defects.

I verified the earlier concrete fixes: completed-empty responses now preflight advertised schemas, checkpoint retirement releases recorded-context state, and empty pipeline input stays searchable. The latest commit reports the requested matched profiling comparison: 75 rollouts per revision on the unchanged 25-task cohort, full IF pass changing from 82.67% to 84.00%, partial IF credit from 92.72% to 92.80%, and zero exclusions. It separately reports nine added-task rollouts scoring 1.0, so I am not repeating the missing-profile finding.

I completed the full changed-file review and traced the affected grading, dispatcher, stock-agent and sandbox contracts. This was static, read-only inspection. I did not execute tests, verify CI or independently authenticate the reported rollouts, profiling artifacts or private registry release. I assessed compressed fixtures through their declared identities, loaders and tests, not their decompressed contents.

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

Comment thread resources_servers/partner_if/app.py Outdated
receipt = unanswered(contract, missing.failure_kind, str(missing))
receipt = grade_without_evidence(contract, missing.failure_kind, str(missing), passed=False)
except InvalidAdvertisedToolRegistry as invalid:
receipt = grade_without_evidence(contract, UNSCORABLE, str(invalid), passed=None)

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.

BLOCKER — Keep completion-only registry failures from masking independent IF.

Failure: Use a tool_call_response contract with an IF text_contains_v1 rubric requiring "X" in answer, plus a completion-only single_advertised_tool_call_v1 rubric with no IF dependency. Advertise a function with parameters: {"$ref":"https://example.invalid/missing.json"}, then submit a completed output: []. The empty-answer preflight checks every contract item, and this handler marks all checks unavailable. The result is masked with grading_result.reward=null, although the independent IF result is a known failure and should score 0 unmasked. Nonempty prose with the same registry takes the normal evaluator path and does not mask IF. This changes score inclusion for mixed IF/completion contracts.

Correction: Could you assign the invalid-registry verdict only to checks that use that registry? The new helper assigns one verdict to every check. Keep empty-answer failures for independent checks, mark registry-dependent checks unavailable, and let aggregation determine whether they gate IF. Completion alone must not change IF availability. The placement needs coordinated per-check handling, so I am not suggesting an unverified replacement.

Preservation: An invalid registry used by an IF rubric or its prerequisite must still mask an empty response. A valid registry must still make an empty response an unmasked zero-call failure. Keep ordinary text, cutoff/provider distinctions, supported recursive/local schemas and literal $ref instance data unchanged. Retain the existing independent-completion assertions.

Acceptance — proposed, not executed: Extend the empty-response /verify test with this two-rubric setup. Expect reward 0, mask_sample=false, evaluation_completed=true, IF raw_passed=false, and completion raw_passed=null. Make the advertised-tool check an IF rubric, or an IF prerequisite, and expect masking with null grading reward. Restore a valid registry and expect an unmasked zero-call failure.

} finally {
try { await session?.disposeAsync(); ai.cleanupSessionResources(); }
catch(error) {termination='error';log('errors.jsonl',{cleanup:String(error)});}
const capture={version:1,termination,assistantTurns:turns,events,deliveries};

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.

RISK — Retain delivery captures before supervisor termination.

Failure: Let the child deliver a corroborated parent report, then block in its next model request until the 900-second safety timeout or an operator rollout stop. Both copies of capture.json are written only after promptAndWait and disposal finish. The supervisor terminates the process with TERM and then KILL, and this shim has no termination handler that completes the capture. Event and delivery JSONL records already exist, but collection requires capture.json, so it raises before exporting them or returning a partial response. Close then removes the session directory. The delivered report cannot reach the verifier's delivery-before-later-failure rule.

Correction: Could you persist a valid capture incrementally, or reconstruct one from actual event and receiving-controller logs after confirmed termination? Coordinate collect(), the termination marker and response classification so timeout/stop returns retained partial evidence without claiming completion. A signal handler alone cannot cover KILL. The implementation needs verification; the invariant is that a confirmed send's proof must become collectable before a later model request returns.

Preservation: Keep missing or malformed evidence fail-closed, SDK-error captures classified as failed, completion and turn limits distinct, and the last allowed turn's tools intact. Drafts and sends without matching successful IPython receipts must not count as delivery.

Acceptance — proposed, not executed: Extend the SDK double to emit a successful IPython send with its matching controller receipt, then block. Run it through the shared supervisor with a short timeout and separately request rollout expiry. Expect retained captures/observations, a non-completed response, and successful grading of the prior delivery. Without delivery, expect an unscorable result rather than a scored absence. Retain the SDK exception/disposal cases and last-turn tool assertions.

return "Fixture unavailable for requested probe; no external request made.", "fixture_gap"
label = "sibling" if uri == self.bundle["sibling"]["input_uri"] else "primary"
value = self.bundle[label]
if "--output" in options:

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.

RISK — Materialize the accepted --output=PATH probe result.

Failure: In the synthetic world, dispatch python /agent/probe.py --uri=example://sibling --output=/workspace/logs/probe.json. The URI parser and identity validator accept equals-style options, but this branch writes a file only for --output PATH. It reports a successful probe without creating its requested output. A parent response containing this Bash call followed by Read of that output therefore gets a coverage gap and is masked; the separate-argument spelling supplies the file and can be graded.

Correction: Could you normalize both output spellings before the existing path checks and deferred virtual write? Replace the output-extraction block at this location with:

output = next((v.partition("=")[2] for v in options if v.startswith("--output=")), None)
if "--output" in options:
    output = options[options.index("--output") + 1]
if output is not None:
    output = self.path(output)
    if not PurePosixPath(output).is_relative_to(self.runtime.workspace_prefix):
        raise CoverageGap("Probe output escapes the modeled workspace")
    writes[output] = json.dumps(value, indent=2)

I traced this suggestion through dispatch and identity validation but did not execute it; verify it before adopting it. Every accepted output spelling must create the same virtual bytes before returning success.

Preservation: Keep no-output probes, both URI spellings and separate output arguments working. Traversal, neighboring-workspace paths and unsupported compound commands must still produce gaps without partial writes. Duplicate or unsupported options must still fail identity validation.

Acceptance — proposed, not executed: Extend the probe tests with both output spellings. Expect kind="sibling_probe", output bytes parsing to world.bundle["sibling"], and identical probe_identity results. Through /step, put the probe and a Read of its output in one response with a scripted passing judge; both spellings must yield an unmasked completed result. Retain the no-output identity and rejected-write assertions.

raise CoverageGap("Virtual file exceeds the recorded-context ceiling")
return len(content.encode())

def __setitem__(self, path: str, content: str) -> None:

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.

RISK — Reject virtual file/directory collisions before accepting writes.

Failure: The simulator accepts both Write('/workspace/logs/node', 'first') and Write('/workspace/logs/node/child.txt', 'needle') as successful writes. This helper checks syntax and byte limits but permits one file to be another file's directory. A subsequent rg needle /workspace/logs materializes both keys. In either iteration order, creating a file over a directory, or a directory over a file, raises OSError. Neither dispatch nor the step boundary catches it. Model-selected operations therefore cause /step 500 instead of a typed coverage result, affecting parent and Explore searches.

Correction: Could you enforce the invariant in shared VirtualFiles, before any mutation? Both single writes and bulk updates must reject files that are ancestors or descendants of another file. Replace these two methods with the following source-reviewed suggestion, then verify it before adoption:

def __setitem__(self, path: str, content: str) -> None:
    self.update({path: content})

def update(self, values: Mapping[str, str]) -> None:
    sizes = {path: self._size(path, content) for path, content in values.items()}
    total = self._bytes + sum(size - len(self.get(path, "").encode()) for path, size in sizes.items())
    if total > MAX_VIRTUAL_BYTES:
        raise CoverageGap("Virtual workspace exceeds the recorded-context ceiling")
    paths = {PurePosixPath(path) for path in [*self, *values]}
    if any(parent in paths for path in paths for parent in path.parents):
        raise CoverageGap("Virtual files cannot also act as directories")
    super().update(values)
    self._bytes = total

I traced this through initialization, Write/Edit, probe output and Bash redirection; I did not execute it.

Preservation: Keep same-file overwrites, nested files beneath inferred directories and independent siblings valid. Keep bulk updates atomic and retain path, file-size and workspace-size restrictions. Fixing only Write would leave the other writers exposed.

Acceptance — proposed, not executed: Extend the workspace tests with both collision orders. Expect fixture_gap, unchanged mapping and byte count, and a successful search of the still-valid file. A parent response containing both writes and a search must return a typed masked terminal reply, not raise OSError. Also verify same-file overwrite and two sibling files under a new directory succeed, while retaining the answer-byte and oversized-write assertions.

Keep independent IF grading available when a completion-only tool registry is invalid. Normalize recorded probe options, reject virtual file and directory collisions before writes, and recover already delivered Prime reports from the SDK journals after confirmed supervisor interruption.

AGA job 2102039 passed 752 PartnerIF and 168 Prime tests, including four real Linux supervisor interruption cases. AGA job 2101999 scored 1.0 on each of pif_027, pif_028, and pif_029, with three healthy rollouts and zero containers remaining.

Signed-off-by: Arnab Dhara <[email protected]>
@ADharaUTEXAS123007

Copy link
Copy Markdown
Contributor Author

/review reset=true

@ADharaUTEXAS123007

Copy link
Copy Markdown
Contributor Author

/review 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 WITH CARE: three RISK findings in the recorded-context tool path.

The simulator can reinterpret quoted punctuation as shell operators, let deeply nested arguments escape the typed failure boundary, and invent a blank line for an empty sed selection. The inline comments include repair boundaries and proposed acceptance checks.

I verified the four findings from the latest review against the current source. Completion-only registry failures now leave independent IF checks scored. Prime reconstructs interrupted captures after confirmed supervisor termination. Probe output spellings share one parser, and virtual writes reject file/directory collisions before mutation.

I completed the changed-file inspection and traced the affected grading, stock-agent, dispatcher and sandbox contracts. This was static, read-only review. I did not execute tests or verify CI. The PR supplies matched reward-profile and final-head smoke evidence; I did not independently authenticate those runs or the private registry release. I assessed compressed fixtures through their declared identities, loaders and test expectations, not their decompressed contents.

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



def shell_tokens(command: str) -> list[str]:
lexer = shlex.shlex(command, posix=True, punctuation_chars=";&|<>")

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.

RISK: Keep quoted shell punctuation distinct from command operators.

Failure: With the synthetic world, dispatch Bash command echo ';' cat /repo/a.py. Tokenization removes the quotes, producing ['echo', ';', 'cat', '/repo/a.py']. The control-flow parser interprets that as two commands and returns captured source bytes. The requested command should only echo ; cat /repo/a.py. Similarly, echo '>' /workspace/logs/new.txt becomes a virtual redirection instead of literal echo output. Parent calls can mutate state, and parent or Explore calls can receive evidence that their commands did not request.

Correction: Could you preserve quotation information and interpret only unquoted punctuation as shell grammar? A typed CoverageGap before mutation is also safe for unsupported ambiguous syntax. Coordinate shell_tokens with its readonly, compound-probe and probe-identity consumers. Changing posix alone is not a verified correction because quoted URI/path values must still decode correctly. The invariant is that quoted data cannot become a separator, pipeline or redirect.

Preservation: Keep real unquoted control operators working, ordinary quoted arguments intact, and compound probes rejected without writes. Retain the short-circuit cases and redirect rollback assertions.

Acceptance, proposed and not executed: Add both commands above beside the simulator tests. Expect literal echo output, or a typed coverage gap with unchanged files and byte count. Neither may return a.py contents or create new.txt. Retain successful unquoted redirection followed by cat, conditional short circuiting, and both probe-output spellings.

):
raise ValueError("The parent response contains unsupported or incomplete output")
tool_outputs, gap = await self._execute_tools(episode, action)
except (ValueError, TypeError, KeyError) as error:

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.

RISK: Classify parser-depth failures instead of raising from /step.

Failure: After reset, submit a completed Bash function call whose arguments string is '[' * 2000 + ']' * 2000. The string fits the argument-byte ceiling and remains representable as a function-call argument string. Visible-event decoding can raise RecursionError, which this boundary does not catch. The same exception escapes direct simulator dispatch. Model-selected invalid arguments therefore produce an exception instead of a typed masked terminal result.

Correction: Could you include RecursionError in both deliberate invalid-input boundaries? At this handler, use:

except (ValueError, TypeError, KeyError, RecursionError) as error:

In Fixtures.dispatch, change its second exception tuple to:

except (KeyError, TypeError, ValueError, IndexError, RecursionError):

I traced these suggestions through response parsing and terminal-report construction but did not execute them. Verify them before adoption. Parser-depth failures must be classified without crashing or dispatching the operation again.

Preservation: Keep valid flat Bash/Read arguments working, ordinary malformed JSON and non-object arguments classified as invalid, and unsupported operations reported as gaps. Do not relax the argument-byte ceiling.

Acceptance, proposed and not executed: Extend the malformed-call cases with this nested string. Expect invalid_call, unchanged files and no exception. Through /step, expect a masked terminal response with evaluation_completed=false and no judge call. Repeating its step ID must return the identical cached result. Retain the existing valid-probe and malformed-JSON assertions.

match = re.fullmatch(r"(\d+),(\d+)p", args[1])
if match and args[2] in self.files:
start, end = map(int, match.groups())
return "\n".join(self.files[args[2]].splitlines()[start - 1 : end]) + "\n", "", 0

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.

RISK: Return zero bytes for an empty sed selection.

Failure: With captured /repo/empty.txt: '', sed -n '1,2p' /repo/empty.txt returns a newline because this branch appends one unconditionally. A range beyond EOF does the same. Consequently, sed -n '1,2p' /repo/empty.txt | rg '^$' searches an invented blank line and reports a match instead of no matches. Parent and Explore calls can therefore receive false frozen evidence.

Correction: Could you avoid appending a newline when no lines were selected? Replace this return with:

selected = self.files[args[2]].splitlines()[start - 1 : end]
return "\n".join(selected) + ("\n" if selected else ""), "", 0

This source-reviewed suggestion keeps the existing nonempty-range behavior and lets the pipeline pass an empty stream. I did not execute it; verify it before adoption. An empty selected range must contribute zero bytes, not a blank line.

Preservation: A selected real blank line must still return "\n". Ordinary nonempty ranges must keep their contents. Keep the earlier distinction between an empty pipeline stream and absent search input.

Acceptance, proposed and not executed: Add empty-file and beyond-EOF cases beside the frozen pipeline tests. Both sed selections must return ('', '', 0); piping either into rg '^$' must return no output and exit 1. Selecting an actual blank line must match with exit 0. Retain the nonempty-line and empty-cat pipeline assertions.

@ADharaUTEXAS123007

Copy link
Copy Markdown
Contributor Author

/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: the three prior findings are fixed. I found no eligible introduced regressions in this follow-up.

I verified the fixes against the previous reviewed tree:

  • The shell lexer rejects the reported quoted-punctuation commands before interpretation or writes. The regression cases cover parent and Explore calls without changing virtual files.
  • Visible-event decoding and simulator dispatch now handle parser-depth failures. The step regression asserts a cached masked terminal response without judging.
  • The sed branch returns zero bytes for an empty selection. Its regression cases distinguish empty selections from real blank lines and check downstream search status.

I traced the affected probe, Explore, terminal-report and dispatcher paths. This was a static follow-up to review 5993628634, not a fresh whole-PR review; new findings were subject to the existing impact filter. I did not execute tests or verify CI or the reported AGA results. The PR description still lists final-head trusted CI and required approvals as merge requirements.

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

@ADharaUTEXAS123007

Copy link
Copy Markdown
Contributor Author

/ok to test 19340b0

@adil-a adil-a 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.

LGTM, thanks a lot for iterating with me on this!

@adil-a
adil-a enabled auto-merge November 23, 2026 17:25
@adil-a
adil-a added this pull request to the merge queue Nov 23, 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/45228414963

Merged via the queue into main with commit 439ff84 Nov 23, 2026
72 of 74 checks passed
@adil-a
adil-a deleted the adhara/instruction-following-benchmark-pi branch November 23, 2026 17:47
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 feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer risk:high Autobot PR risk: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants