Repository navigation
feat(harbor): separate verification in its own sandbox (M10) - #3744
Conversation
af92f5c to
c7f7484
Compare
c7f7484 to
115f904
Compare
115f904 to
fc7ea8f
Compare
fc7ea8f to
ad84e8f
Compare
ad84e8f to
8e64e72
Compare
yuhezhang-ai
left a comment
There was a problem hiding this comment.
Please address the failure-handling, fallback-environment, and artifact-collection cases below, and reconcile the two differences from the current RFC. The lifecycle-test suggestion is non-blocking.
8e64e72 to
5a2ef47
Compare
5a2ef47 to
92bb899
Compare
92bb899 to
b8b559d
Compare
b8b559d to
6958650
Compare
fd4d4f3 to
a775952
Compare
|
/ok to test a775952 |
a775952 to
f67300c
Compare
|
/ok to test f67300c |
|
/ok to test 634e758 |
|
/ok to test 42c71a6 |
|
/ok to test 85d5bd9 |
|
Status at the new head 85d5bd9. Every thread from both reviews is answered inline, the opt-in one you resolved on 14 Oct, so pointers only. Artifact collection is best effort the way Harbor's is, with the three rechecked cases closed (device nodes and FIFOs refused in both link modes, an over-long name not collected, a collect hook timeout warned and skipped) while a lost sandbox or a full disk still masks. Shared mode runs collect hooks, restored directories replace what the verifier image shipped, probe failures propagate, exclusions reach tar unanchored exactly as Harbor passes them, a single file artifact keeps its mode bits and the verifier now receives the archive the sandbox packed rather than the host copy, each artifact stages under its own root, the transfer user prepares file artifacts, and the verifier lifetime is episode sized. Three answers are placements rather than fixes here: the verifier working directory and variables come with the rewrite in #4566, /logs/artifacts is created at seed from #3754, and the operator setup premise went away with #3807, which removed sandbox_setup_commands. Two are kept by design with the rule written in the README: baked tests in an explicit verifier image are not overwritten, and the support table was rewritten alongside. The lifecycle assertion in the tests now checks the stop at verifier creation. |
yuhezhang-ai
left a comment
There was a problem hiding this comment.
Rechecked 85d5bd987 against its immediate stack parent and inspected the included changes through M20. The earlier fixes are accounted for, including those implemented later in the stack. The current Harbor and transfer suites pass: 145 tests. Two new findings below remain: a reproduced incorrect-score case that should be fixed before approval, and three regression methods that pytest never collects. The grading reproduction uses real shell/tar operations with isolated local sandbox stand-ins; it is not a live-provider/model rollout.
|
/ok to test ff55ac4 |
|
/ok to test 6e3ee5d |
|
/ok to test 19ad5e3 |
|
Both findings are fixed at head 19ad5e3. An artifact whose declared path is /tests, inside or over it, or at or inside /logs/verifier is collected on the host as a diagnostic but is never restored into the verifier sandbox, which closes the reproduced incorrect-score case, and the three regression methods are collected as methods of TestSeparateVerification in environment_servers/harbor/tests/test_app.py. Both threads carry the detail and are resolved. |
|
/ok to test fea0619 |
|
/ok to test 2c9f191 |
M10 of the Harbor tasks RFC. A task whose verifier declares `environment_mode = "separate"` or a `[verifier.environment]` is verified the way Harbor does it: the main-container `[[verifier.collect]]` hooks run, `/logs/artifacts` and every `artifacts` entry are copied out of the agent's sandbox, that sandbox is stopped (and leaves the server's ownership table, so the episode's final cleanup has nothing left to stop), a fresh sandbox starts from the verifier's prebuilt image with the verifier's resources, the artifacts and `tests/` are restored into it, and `test.sh` runs there with `[verifier.env]` and `[verifier].user`. The result says which mode ran (`verifier_mode`). Sidecar (Compose) hooks and artifacts are skipped with a warning until Compose groups land. A verifier that must be built from `tests/Dockerfile` is refused at seed as a terminal failure until image builds land. Dockerfile ENV recorded by the loader now reaches the agent's sandbox, merged under `[environment.env]`; a separate verifier still uses its own `[verifier.environment].env`. Squashed from the previous branch and re-applied onto the environment server. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
|
/ok to test a794211 |
ffrujeri
left a comment
There was a problem hiding this comment.
Approving a7942110. The linked-parent restore is fixed: upload_archive now resolves the physical destination with a read-only probe (walking up to the nearest existing ancestor) before _prepare_restore_target runs, so a refusal touches nothing. test_keep_out_is_judged_before_the_target_is_prepared_so_a_refusal_touches_nothing covers a linked parent, trailing slashes, a file target and a missing subdirectory under the link. It also asserts that only the probe ran and that /tests stays byte-identical. The BusyBox-safe names collection (positional parameters after --, and an empty archive without tar when nothing is present) also looks right.
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39682964871 |
What does this PR do?
M10 of the Harbor tasks RFC: separate verification, the mode every Terminal Bench 4 task uses. Stacked on the M9 PR (#3743).
harborresources server. When a task's verifier declaresenvironment_mode = "separate"or a[verifier.environment], verification follows Harbor: the main-container[[verifier.collect]]hooks run in the agent's sandbox,/logs/artifactsand everyartifactsentry are copied to the host, the agent's sandbox is stopped, a fresh sandbox starts from the verifier's prebuilt image with the verifier's resources, the artifacts andtests/are restored into it, andtest.shruns there with[verifier.env]and[verifier].user. A task in separate mode without a[verifier.environment]image verifies in a fresh sandbox from the task image. The verifier sandbox is stopped afterwards./close_sessiondoes not stop the agent sandbox twice. The response carriesverifier_mode.tests/Dockerfileis refused at seed with a 422.sandbox_io.download_pathandupload_pathmove a single file or a directory between the host and a sandbox, creating parent folders. Running transfers as root moved to the M11 PR (feat(miniswe): episode sessions on the resources server sandbox (M11) #3745).Review fixes (2026-10-04)
ENVnow reaches the agent sandbox. The loader recordsENVlines from a base-image-only Dockerfile onHarborTask.env, merged under[environment.env], but the server built the agent'sSandboxSpecfrom[environment.env]alone. The agent sandbox now usestask.env. A separate verifier still uses its own[verifier.environment].env.Validation
pytest resources_servers/harbor/tests responses_api_agents/harbor_oracle_agent/tests tests/unit_tests/test_harbor_tasks.py: pass.TestSeparateVerification(six tests) covers the main-container collect hook with the sidecar hook skipped, a directory and a file artifact pulled to the host, the agent sandbox stopped beforetest.sh, tests and artifacts restored into the verifier sandbox, the verifier exec's env, user and budget, no second stop at close, the spec built from[verifier.environment], the fallback to the task image, the 422 for a verifier that must be built, masking plus both sandboxes stopped when the verifier sandbox fails, and DockerfileENVin the agent's spec.pre-commit run --files <changed files>clean.Rollouts
Reference solutions of the 52 Terminal Bench 4 CPU tasks through
gym dataset validateon OpenSandbox Cell-3, all in separate mode. Numbers in the M12 PR of this stack (#3746). Those runs predate the rebase below.Rebased onto main
Rebased onto
main128eab4 (2026-10-04).Compatibility and benchmark impact
Shared-mode tasks (hello-world, Terminal Bench 2.1) are unchanged apart from
verifier_mode: sharedin the response and DockerfileENVnow applied to the agent sandbox.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).🤖 Generated with Claude Code