Repository navigation
feat(vibench): make the agent-session config the default and keep the relay as vibench_legacy_agent.yaml - #5819
Conversation
Move ViBench off the legacy_agent /run relay onto the single_agent_turn_legacy Environment Server and opencode_agent. The resources server now starts the build sandbox at seed (PRD at /app/prd.txt, assets under /app/assets), lends it to the agent, and at verify tars /app, downloads it, stops the sandbox and grades the copy with ViBench's scripts as before. Close stops a sandbox verify did not, removes the copy and fences late seeds. A verify without a live session is a masked session_lost sample. A provider failure while harvesting is masked with its failure kind and keeps the sandbox, so a resent verify can harvest again; a missing app directory or a fatal tar error is a build failure, and files that changed while tar read them are not. The agent loads opencode_agent's command deny-list but not opencode_agent.yaml, whose tools map would cancel the denials under OpenCode 1.17.11; web, subagent and skill tools are denied through permission. The Docker overlay scopes use_absolute_ip to model servers. Remove responses_api_agents/vibench_agent, whose only user was ViBench, and move its Docker provider overlay to resources_servers/vibench. Read ViBench 1.0 from vibench-public's v1/ layout (v1/prds, v1/.venv), keeping the old layout working, and regenerate example.jsonl from tag v2.0.7 (prompts unchanged, paths gain the v1/ prefix). Set the OpenCode output budget to 32,768 tokens with a 229,376-token context window: the previous whole-window budget is refused by vLLM. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
Restore responses_api_agents/vibench_agent and its mentions as on main, so the legacy_agent relay keeps working beside the agent-session path, which stays the documented default. The resources server serves both: a legacy seed gets the PRD text and asset directories and starts no sandbox, and a verify that names artifact_path grades the tarball from artifact_dir as before. The legacy recipe moves to configs/vibench_agent.yaml. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
vibench-public moved ViBench 1.0 under v1/ when ViBench 2.0 landed: the apps are in v1/prds/ and the 1.0 project (venv, .env) in v1/, while _harness/ stays at the root. prepare.py looked for prds/ at the root and stopped on a current checkout. prepare.py now finds the apps in v1/prds/, or prds/ for a checkout from before 2.0, and looks for ViBench's interpreter in v1/.venv, then .venv. Row paths stay relative to the checkout root, so the resources server and vibench_agent are unchanged. example.jsonl is regenerated from tag v2.0.7 (only the paths change), example_rollouts.jsonl gets the same path update, and the README setup follows the new layout. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
configs/vibench.yaml is main's legacy relay recipe again, unchanged, so existing runs keep their harness and budgets; the session path moves to configs/vibench_sessions.yaml. vibench_agent's README is back to main's. The default switches, and vibench_agent goes, only after both paths are graded on the same tasks. verify now holds the session's lock while it harvests and copies the tarball into its own work dir, then grades outside the lock. Before, two verifies could tar into the same remote file and download over the same copy, and a close could remove that copy mid-unpack, which graded as a build failure. New tests cover a close during verify and two verifies at once. example_rollouts.jsonl keeps vibench_agent's artifact_path. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
Bring in the v1/ layout fix, now its own PR, so this PR's diff shows only the session work. This branch already carried the same changes; the README keeps this branch's text, which covers the same layout notes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
The resources server looked for ViBench's interpreter only in the checkout root's .venv, while the v1 setup puts it in v1/.venv, so the server fell back to Gym's own Python. It now checks v1/.venv first, then .venv, as prepare.py does. The README names the full assets path in Anti-cheat and lists, under P0 limitations, that grading has not been re-run on v2.0.7. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
_harvest_app stopped the sandbox once the app was out, and a failed stop raised through verify as a 500, so a rollout whose tarball was already harvested lost its grade. The failure is now logged and the sandbox stays on the session for close to stop, which raises if that stop fails too, so the caller can retry. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
…default Signed-off-by: yaoyu-33 <[email protected]> # Conflicts: # resources_servers/vibench/README.md # resources_servers/vibench/app.py
… relay as vibench_legacy_agent.yaml configs/vibench.yaml now holds the session recipe (opencode_agent through single_agent_turn_legacy, with the build sandbox the resources server owns), which was configs/vibench_sessions.yaml. The vibench_agent relay recipe moves to configs/vibench_legacy_agent.yaml with a deprecation note. Every citation is repointed: both READMEs, the server docstring, the config tests and the root README table. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test a6de05c |
main now requires code outside nemo_gym to import exported names from each package's public API; this test reached into nemo_gym.sandbox.providers.local. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 53dad36 |
… switch - configs/vibench.yaml: the agent comment cited configs/vibench.yaml (itself) for vibench_agent's settings; it now cites configs/vibench_legacy_agent.yaml, and "the previous recipe" / "as before" name the legacy recipe. - configs/vibench.yaml and the README explained skipping opencode_agent.yaml by its `tools` map. The main merge brought #5387, which removed that map and made the deny-list deny the web and skill tools, so that reason no longer holds; the comment now says what the recipe loads and adds (`task: deny`). - The old Docker command paired configs/vibench.yaml with vibench_agent's docker.yaml. That overlay still validates with the new default but hands the borrowed sandbox a loopback model URL. The default config, the legacy config, that overlay and the README now say which overlay goes with which config. - README Validation: say the default session path has not been graded end to end yet. - vibench_agent README: deprecation banner naming configs/vibench.yaml. - opencode_sandboxed_agent's deprecation warning and README listed vibench_agent among setups with no session path; they now point it at configs/vibench.yaml (the test still finds "vibench_agent"). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 0efcff6 |
…m the public API - configs/vibench.yaml and the README said the session recipe keeps "no subagents" from the legacy recipe, but the legacy recipe allows webfetch, websearch, task and skill. Both now list the four denials as a difference from the legacy path. - vibench_agent's README said only OpenSandbox implements serialize()/connect(); Docker, Apptainer and E2B do too, and the session path relies on that. The vibench README lists the same providers. - Export PROVIDER_REQUEST_FAILED from nemo_gym.core and sandbox_failure from nemo_gym.sandbox, so the vibench server and its tests import them from the public API. sandbox.failures was already loaded by the package's eager imports, so the lazy-load test lists it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 9f616b9 |
main now has #5701 as one squashed commit, so its files conflicted with the branch's own copy of #5701's history. Each conflict is resolved to the branch's change applied on top of #5701's final head; the result equals that head merged with this branch, plus main's later commits. configs/vibench_sessions.yaml, which main adds and this branch renamed to configs/vibench.yaml, stays removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
…the public API This branch exports both names, so test_public_api_facades.py rejects the submodule imports that main has since added in pi_sandboxed_agent and opencode_sandboxed_agent. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
|
/ok to test a2403c9 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42898285441 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE — one validation RISK.
The config migration, retained relay recipe, and public export/import changes are consistent in the inspected source. The new default still needs a representative model rollout that reaches real grading, as detailed inline.
I reviewed all 17 changed paths and their directly affected routing, sandbox, and public API contracts. This was a static review; I couldn't execute tests or rollouts.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| scale is not saturated. `data/example_rollouts.jsonl` holds this run, with its task paths | ||
| updated to the `v1/` layout. | ||
|
|
||
| The default session path (`configs/vibench.yaml`) has been run through seed, build and harvest |
There was a problem hiding this comment.
RISK — Could you attach one representative model rollout through grading before making this path the default? The default recipe now routes ordinary ViBench runs through agent sessions, but this paragraph and the PR description stop the real-run evidence at harvest. The graded 16/16 plans exercised the legacy relay. This leaves the default's complete agent → harvest → fresh-compose grading path unvalidated, rather than demonstrating a runtime defect. The required smoke-rollout rule requires inspecting both agent and verifier behavior for behavior-changing environment work.
Correction: Run the documented default commands on a prepared Docker/docker-compose host. Record the model, provider, ViBench revision, rollout artifact, reward, plan counts, and cleanup result in the validation evidence. No verifier rewrite or full reward-profile sweep is needed for this request.
Proposed acceptance: For one representative task such as notes, inspect a model-generated runnable app and confirm that all three plans reach real grader scorecards, the rollout isn't masked by an infrastructure failure, and the episode releases its build sandbox. A legitimate low score is acceptable; matching the legacy score isn't required.
Preserve: Keep verified: false, the existing table labeled as legacy evidence, and the documented budget/tool differences. Retain the config-test assertions that the default denies all four web/subagent/skill tools while retaining the command deny-list, and that the legacy agent and resources server share artifact_dir.
Main 5365700. One conflict, in the README environment table: main's #5819 renamed the second Vibench row to vibench_legacy_agent.yaml. Kept main's rows and this PR's Visual Coding Opencode row; scripts/update_env_list.py gives the same table. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Yi-Fu Wu <[email protected]>
#5701 is merged, and
mainis merged back in, so the diff againstmainis only this PR's change: the config switch, the docs that follow it, two new public exports, and the imports that move to them.What changed and why
#5701 adds the agent-session path for ViBench 1.0 (
opencode_agentonsingle_agent_turn_legacy, with a build sandbox the resources server owns) as an opt-inconfigs/vibench_sessions.yaml, and keepsconfigs/vibench.yamlonvibench_agentbehind thelegacy_agentrelay. This PR makes the session path the default, following the naming #5762 uses for the SWE OpenCode configs: the session config takes the plain name, and the relay config is renamed*_legacy_agent.yamland kept, with a deprecation note.resources_servers/vibench/configs/vibench_sessions.yaml→configs/vibench.yaml(only the header comment changed).configs/vibench.yaml(thevibench_agentrelay) →configs/vibench_legacy_agent.yaml, with a deprecation note pointing tovibench.yaml.resources_servers/vibench/README.md(config list, commands, legacy section), the server docstring,responses_api_agents/vibench_agent/README.md,tests/test_configs.py(the default-config test is now the legacy-config test), and the root README table (regenerated by the hook).mainmerge,test_public_api_facades.pyrejectsresources_servers/vibench/tests/test_sessions.pyimportingLocalProviderfromnemo_gym.sandbox.providers.local.provider; it now imports it fromnemo_gym.sandbox.configs/vibench.yamlcited itself forvibench_agent's settings and now citesconfigs/vibench_legacy_agent.yaml; the explanation for not loadingopencode_agent.yaml(itstoolsmap) no longer held after themainmerge brought fix: read OpenCode's tool placeholder in token capture and enforce opencode_agent permissions #5387, which removed that map, so the comment and README now say what the recipe loads and adds; both configs,responses_api_agents/vibench_agent/configs/docker.yamland the README say which Docker overlay goes with which config; the README Validation section says the default has not been graded yet;vibench_agent's README gets a deprecation banner; andopencode_sandboxed_agent's deprecation warning and README no longer listvibench_agentamong setups with no session path, pointing it atconfigs/vibench.yamlinstead.configs/vibench.yamland the README said the session recipe keeps "no subagents" from the legacy recipe, but the legacy recipe allowswebfetch,websearch,taskandskill; both now list the four denials as a difference.vibench_agent's README said only OpenSandbox implementsserialize()/connect(); Docker, Apptainer and E2B do too, and the vibench README now names the same providers.nemo_gym.corenow exportsPROVIDER_REQUEST_FAILEDandnemo_gym.sandboxexportssandbox_failure, so the vibench server and its tests import both from the public API instead of submodules (sandbox.failureswas already loaded by the package's eager imports, sotest_public_api_facades.pylists it).main: feat(vibench): run OpenCode through agent sessions #5701's branch conflicted withmainafter fix(vibench): read ViBench 1.0 from v1/ in vibench-public 2.0 #5778 was squash-merged. Inapp.pyI kept feat(vibench): run OpenCode through agent sessions #5701's_resolve_artifact, which no longer usesmain's_artifact_rootproperty (that property only served the old_resolve_artifact). In the README I kept feat(vibench): run OpenCode through agent sessions #5701's text, plusmain's "This environment covers ViBench 1.0." sentence.main(c4923b6):mainhas feat(vibench): run OpenCode through agent sessions #5701 as one squashed commit, so the files this branch shares with feat(vibench): run OpenCode through agent sessions #5701 conflicted. Each is resolved to this branch's change on top of feat(vibench): run OpenCode through agent sessions #5701's final head, so the merged tree equals feat(vibench): run OpenCode through agent sessions #5701's head merged with this branch plusmain's later commits.configs/vibench_sessions.yaml, which the squash adds back, stays removed. The merge also brings feat(vibench): run OpenCode through agent sessions #5701's last test fix: since feat(sandbox): instrument file transfers #4934,AsyncSandbox.start()delivers the PRD throughupload(), so the two setup-failure tests fail only the asset uploads.sandbox_failureandPROVIDER_REQUEST_FAILEDexported,test_public_api_facades.pyrejects the submodule imports thatmainhas since added inpi_sandboxed_agent(app and tests) andopencode_sandboxed_agent; they now import fromnemo_gym.sandboxandnemo_gym.core.vibench_agentitself is not removed; the legacy config keeps it runnable until the migration retires it.Issue
No public issue. This is the part of the ViBench migration that #5701 left for later ("making the session path the default").
Compatibility and benchmark-result impact
gym env start --config resources_servers/vibench/configs/vibench.yamlnow runsopencode_agentwith a resources-owned build sandbox, notvibench_agent. Runs that need the relay useconfigs/vibench_legacy_agent.yaml. feat(vibench): run OpenCode through agent sessions #5701's migration table lists the key moves (vibench_opencode_agent.responses_api_agents.vibench_agent.*→...opencode_agent.*or the resources server'ssandbox_config).Switch the overlay too. With Docker,
configs/vibench.yamltakesresources_servers/vibench/configs/docker.yaml; the old pairing withresponses_api_agents/vibench_agent/configs/docker.yamlstill validates, but the borrowed sandbox then gets a loopback model URL and OpenCode cannot reach the model. With OpenSandbox, use++use_absolute_ip=trueinstead ofvibench_agent'ssandbox_model_base_url.Old overrides:
++vibench_opencode_agent.responses_api_agents.vibench_agent.*now fails at startup as an almost-server error (vibench_agent -> entrypoint: Field required), andartifact_dir/VIBENCH_ARTIFACT_DIRare ignored by the default config.The default sets
allowed_agents: [opencode_agent], so pairing another harness with it now needs--allow-unsupported-pairing; the legacy config sets none.Benchmark results: the README's graded numbers (16/16 plans, mean 0.785) come from the legacy relay path. The default session path has not been graded end to end, so do not compare its scores with that table.
The two paths differ in output budget (32,768 per call / 229,376 context vs. the whole 262,144 window), command deny-list, and tools: the default denies
webfetch,websearch,task(subagents) andskill, which the legacy recipe allows. Scores across the switch are not one measurement. feat(vibench): run OpenCode through agent sessions #5701's description has the details.Library API:
nemo_gym.core.PROVIDER_REQUEST_FAILEDandnemo_gym.sandbox.sandbox_failureare new public exports. This is additive; the submodule paths still work.Validation
At a2403c9, on Linux:
resources_servers/vibench/tests110 passed, 3 skipped (jinja2rendering);tests/unit_tests/test_public_api.py,test_public_api_facades.pyandtest_import_linter_coverage.py974 passed;opencode_sandboxed_agent169 passed, 2 skipped;pi_sandboxed_agent62 passed.gym env validate --strict(withopenai_model.yaml) valid forvibench.yaml,vibench.yaml+resources_servers/vibench/configs/docker.yaml,vibench_legacy_agent.yaml, andvibench_legacy_agent.yaml+responses_api_agents/vibench_agent/configs/docker.yaml.pre-commit run --from-ref origin/main --to-ref HEAD: passed.At 9f616b9:
tests/unit_tests/test_public_api.py,test_public_api_facades.pyandresources_servers/vibench/testson macOS: 1054 passed, and the same 8test_sessions.pyharvest tests fail as at feat(vibench): run OpenCode through agent sessions #5701's head (local providertar).opencode_sandboxed_agenttests andtest_import_linter_coverage.pypass.gym env validate --strict(withopenai_model.yaml) valid forvibench.yaml,vibench.yaml+resources_servers/vibench/configs/docker.yaml, andvibench_legacy_agent.yaml.pre-commit runon the changed files: passed.pytest resources_servers/vibench/testson Linux at a6de05c: 109 passed, 3 skipped (jinja2rendering). The one failure in that run was a test that needsresponses_api_agents/opencode_agent/configs/permissions/default.yaml, which the trimmed copy I ran from did not include. On macOS,tests/test_configs.pyandtests/test_app.pypass in full (54). The same 8test_sessions.pyharvest tests fail on macOS both at feat(vibench): run OpenCode through agent sessions #5701's head and here, from the local provider'staron macOS, and they pass on Linux.gym env validateonconfigs/vibench.yamlandconfigs/vibench_legacy_agent.yaml: valid.At 0efcff6:
gym env validate --strict(withopenai_model.yaml) valid forvibench.yaml,vibench.yaml+resources_servers/vibench/configs/docker.yaml,vibench_legacy_agent.yaml, andvibench_legacy_agent.yaml+responses_api_agents/vibench_agent/configs/docker.yaml. On macOSresources_servers/vibench/tests: 105 passed, and the same 8test_sessions.pyharvest tests fail as at feat(vibench): run OpenCode through agent sessions #5701's head (local providertar).opencode_sandboxed_agentdeprecation-warning tests: 2 passed.pre-commit runon the changed files: passed.pre-commit runon the changed files: passed after the hook regenerated the root README table.Rollouts
N/A for this PR's own change: it renames config files and moves no settings. The session recipe's real run (seed, build and harvest on OpenSandbox with a Nemotron model) is in #5701; grading needs a Docker Compose host and has not been run on the session path. A pairing run of the new default with grading is still pending. It needs a Docker host with
docker-compose, a ViBenchv2.0.7checkout (v1/synced,.envwith grader keys), and theapp-bench-baseimage:🤖 Generated with Claude Code