Repository navigation
Conversation
|
/ok to test 93c5387 |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — LGTM — no reliability concerns.
Reviewed both changed files, including batch construction and observation pairing, the regression tests, and affected response serialization and training-metadata paths. No actionable BLOCKER, RISK, or NOTE findings.
Static review only: tests and model rollouts were not executed. Harbor’s upstream trajectory producer is an external dependency absent from the mounted trees.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
|
/ok to test 94e45ea |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — LGTM — no reliability concerns.
Follow-up to the prior clean review: compared the previous pairing logic with the current converter, inspected both changed files and the retained regression assertions, and traced affected response serialization and training-metadata paths. Shared-observation batching and ordinary positional pairing remain intact. No actionable findings were established.
Static review only: tests and model rollouts were not executed. Harbor’s pinned trajectory producer is external and absent from the mounted trees, so its emitted fields could not be independently confirmed. Two completed child report payloads were unavailable; their producer and downstream-integration topics were independently inspected by the parent.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
|
/ok to test 1600e4c |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — LGTM — no concerns found.
Follow-up to the prior clean review: compared the previous batching logic with the current converter, inspected both changed files and the replacement and retained regression assertions, and traced affected response serialization and metadata paths. Shared-observation steps retain individual calls with matching outputs; zero-result steps and complete positional pairing remain unchanged. No actionable findings were established.
Static review only: tests and model rollouts were not executed. Harbor’s pinned trajectory producer is external to the mounted trees, so its emitted field guarantees could not be independently verified.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
|
/ok to test fd67629 |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — LGTM — no concerns found.
Follow-up to the latest clean review: compared the previous pairing logic with the current converter, inspected both changed files and the updated and retained regression assertions, and traced affected response serialization, training metadata, and verifier-consumer paths. Shared-observation steps retain matching call/output IDs and place the screen on the last call; single-call, zero-result, and complete positional-pairing paths remain unchanged. No qualifying introduced regressions were established.
Static review only: tests and model rollouts were not executed. Harbor’s pinned trajectory producer is external to the mounted trees, so its emitted-field guarantees could not be independently verified. All three delegated inspections completed; two report payloads were unavailable, and their converter and producer/test topics were independently inspected by the parent.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
Signed-off-by: Christian Munley <[email protected]>
The pinned Harbor Terminus-2 never sets source_call_id, so the branch was dead, and in a mixed result list it could pair two outputs with one call. Signed-off-by: Christian Munley <[email protected]>
Terminus captures one terminal screen per step. Instead of batching the step's calls into one synthetic call, keep each call and pad the missing outputs with empty strings, so every function_call has a matching function_call_output like the other harnesses. Signed-off-by: Christian Munley <[email protected]>
The terminal screen is captured after all of a step's calls run, so it belongs on the last call. The earlier calls get the empty output. Signed-off-by: Christian Munley <[email protected]>
fd67629 to
a724f0c
Compare
|
/ok to test a724f0c |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — LGTM — no concerns found.
This follows the latest clean bot review, which had no unresolved findings. I inspected both changed files, including the converter’s pairing logic and the new and retained regression assertions. For calls with explicit IDs and one shared observation, the current code emits matching outputs, leaves earlier outputs empty, and places the screen on the last call. Zero-result, single-call, and complete positional-pairing paths remain unchanged. I also traced affected response serialization, training capture, and verifier consumers; no qualifying regression was established.
The previously reviewed tree at fd676291b898c2b3d671bed4931a2c4563fbbe3d is unavailable, so I couldn't independently establish the inter-review delta. Harbor’s pinned trajectory producer is external to the mounted trees, so its field and screen-timing guarantees remain unverified. Static review only; I didn't execute tests or rollouts.
All three delegated inspections completed. Two report payloads were unavailable; I independently inspected their converter and producer/test topics.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
Review fixes for the Terminus 2 agent-session adapter: - A rollout stop during seed, or one that ends the runner before it saves a result, is reported as an empty wall_time run with ng_rollout_stop instead of failing the activation (which was retried). - The run's budget starts once the run has a concurrency slot, so a provider transport timeout after a long queue stays a failure. - Terminus's own tmux commands run from / when a task command removes or moves the workdir, instead of ending the run as a harness error. - Request instructions join Terminus's instruction; tools, tool_choice and parallel_tool_calls stay out of its model calls; a field the converter cannot represent is refused with 422 before the activation starts. - An owned sandbox carries the provider's default metadata and session labels, gets its workdir created at setup, and its default TTL reserves both setup steps. - A runner result that does not validate becomes an observation_capture_failed gap instead of failing the activation or close. - Setup refuses an image without bash. - Add configs/profiles/benchmark.yaml, like the other session harnesses, and register it with the shared profile tests. - README: capability level Evaluation until #3520 lands, supported pairings, request-field rules, terminal lifetime, scoped absolute IP, limits, and the relation to terminus_2_sandboxed_agent. - Tests: the real SandboxSession lifecycle over an in-memory sandbox (stops, close during a run, activation after close), /run refusals, runner max_turns, moved workdir, background process and imports without nemo_gym, and a regression test for each fix. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…ions (NVIDIA-NeMo#5650) * feat(terminus-2): run Terminus 2 in task sandboxes through agent sessions terminus_2_agent now serves agent sessions. At seed it borrows the task sandbox the Resources Server lends, or starts one from sandbox_provider, installs a private Python runtime with the pinned Harbor through SandboxPythonRuntime (reused when it passes its import check), stages the runner and checks that tmux runs. Each activation runs Terminus 2 inside the sandbox under SandboxSession's process supervisor, and close returns the invocation, its model calls, the command batches with their terminal output, summarizations and the sandbox outcome. The host path, /v1/responses without a session and /run, keeps working for AnyTerminal. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(terminus-2): grade early rollout stops and harden agent sessions Review fixes for the Terminus 2 agent-session adapter: - A rollout stop during seed, or one that ends the runner before it saves a result, is reported as an empty wall_time run with ng_rollout_stop instead of failing the activation (which was retried). - The run's budget starts once the run has a concurrency slot, so a provider transport timeout after a long queue stays a failure. - Terminus's own tmux commands run from / when a task command removes or moves the workdir, instead of ending the run as a harness error. - Request instructions join Terminus's instruction; tools, tool_choice and parallel_tool_calls stay out of its model calls; a field the converter cannot represent is refused with 422 before the activation starts. - An owned sandbox carries the provider's default metadata and session labels, gets its workdir created at setup, and its default TTL reserves both setup steps. - A runner result that does not validate becomes an observation_capture_failed gap instead of failing the activation or close. - Setup refuses an image without bash. - Add configs/profiles/benchmark.yaml, like the other session harnesses, and register it with the shared profile tests. - README: capability level Evaluation until NVIDIA-NeMo#3520 lands, supported pairings, request-field rules, terminal lifetime, scoped absolute IP, limits, and the relation to terminus_2_sandboxed_agent. - Tests: the real SandboxSession lifecycle over an in-memory sandbox (stops, close during a run, activation after close), /run refusals, runner max_turns, moved workdir, background process and imports without nemo_gym, and a regression test for each fix. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(terminus-2): bound the run timeouts and ignore a late SIGTERM - timeout, model_timeout_sec and command_timeout_sec must be positive and finite: the run timeout sets the supervisor's deadline and an owned sandbox's TTL. - After the runner removes its SIGTERM handler, it ignores the signal, so a stop that arrives once Terminus has returned no longer kills the runner before it writes its result. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(terminus-2): keep interrupted token usage unknown Signed-off-by: yaoyu-33 <[email protected]> * fix(terminus): preserve setup failures and usage uncertainty Signed-off-by: yaoyu-33 <[email protected]> * fix(terminus): reject unsupported response token budgets Signed-off-by: yaoyu-33 <[email protected]> * fix(terminus_2_agent): retry only transient model errors NemoGymLLM.call retried every error, 4xx included, and Harbor's _query_llm wraps each turn in its own @Retry(stop_after_attempt(3)) on any exception, so one turn could send up to nine model requests. NemoGymLLM.call now retries only HTTP 408, 425, 429 and 5xx, timeouts and dropped connections: at most 3 attempts with at most 15 s between them (30 s of backoff per call). StandaloneTerminus2 uses Harbor's undecorated _query_llm, so NemoGymLLM.call is the only retry layer and a 400, 401, 403, 404, 413 or 422 fails on the first request. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(terminus-2): grade task SIGTERMs, early deadlines and usage honestly - A SIGTERM without the supervisor's deadline receipt (a task's `pkill python3`) ends the run as `terminated`, not as a `wall_time` timeout. - A deadline that ends the runner before it saves anything is an empty `wall_time` run, as a rollout stop already was, instead of an activation error. - The runner saves its result while it still handles SIGTERM, so a late signal cannot end it unsaved. - A reply Harbor cannot parse no longer clears a pending completion claim, matching Harbor's own handshake. - Usage is unknown when the result carries no usage count, and on the host path when any call lacked usage; reasoning tokens are never a measured zero. - `reasoning_effort` and `max_thinking_tokens` are refused at startup: Harbor applies them only to its own client. - Update the HLE profile test and README for main's grant-free judge Environment Servers. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(terminus-2): keep host max_output_tokens as a per-call cap Only agent sessions refuse request max_output_tokens: a session's request covers the whole episode, which Terminus cannot bound across model calls. The host /v1/responses and /run paths again send it as each model call's max_tokens, as on main, so anyterminal_terminus_2 rows that carry max_output_tokens keep working. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(terminus-2): close after a moved workdir and refuse a no-bash image first Session lifecycle commands (stop, expiry probe, session-file removal) only address files under an absolute session directory, so they now run from "/" instead of the task workdir. A task that moves or deletes its workdir (Docker then refuses `exec -w`) no longer turns a finished run into a cleanup failure or leaves an active run's stop unconfirmed. Relative session directories still resolve against the workdir; the harness launch keeps the workdir. Terminus 2 now probes for bash, script and tmux before the runtime installer, which itself runs bash, so an image without bash gets a final 422 instead of an installer RuntimeError. A probe with a provider error is not a missing tool. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * style(terminus-2): wrap legacy entrypoint guidance Signed-off-by: yaoyu-33 <[email protected]> * style(terminus-2): apply formatter to entrypoints Signed-off-by: yaoyu-33 <[email protected]> --------- Signed-off-by: yaoyu-33 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
What does this PR do?
Fixes how
terminus_2_agentturns a trajectory step with parallel tool calls into Responses items.When the model issues several commands in one step, the terminal runs them as one batch and returns a single combined observation.
trajectory_to_responsesemitted onefunction_callper command but only onefunction_call_output, paired with the first call, so the other calls had no output.Each call is now kept. The terminal screen is captured after all of a step's calls run, so it pairs with the step's last call, and the earlier calls get an empty
function_call_output. Everyfunction_callthen has a matching output, as in the other harness agents (Claude Code, Codex, OpenCode). Steps with no observation are unchanged.Validation
trajectory_to_responseschecked on 2 calls / 1 result, 1 / 1, 2 / 0 and 2 / 2. Only the first case changes.test_shared_terminal_observation_pairs_every_calladded. ruff check and format clean.Rollouts
10 seeded SWE-bench Verified rows,
anyswerunning terminus_2, a self-hosted DeepSeek V4.1 Flash policy. The two arms differ only interminus_2_agent/output.py(currentmainvs this branch):function_callitemsThree raw rollouts with 3- and 4-command steps read in order: N
bash_commandcalls, then an empty output for each earlier call id, then the screen output for the last call id, one to one. No multi-call step ended withmark_task_complete(0 of 241).Compatibility and benchmark impact
Only steps with several calls and one shared observation change: they gain empty outputs for the calls before the last. No config change. Rewards do not change, since grading reads the task's repo state. Training token capture happens on the model server and does not render
response.output.