Skip to content

feat(nooa): wire sandbox execution into agent sessions - #3849

Merged
init-nikhil merged 31 commits into
mainfrom
init-nikhil/nooa-sandbox-sessions
Oct 28, 2026
Merged

init-nikhil merged 31 commits into
mainfrom
init-nikhil/nooa-sandbox-sessions

Conversation

@init-nikhil

@init-nikhil init-nikhil commented Oct 1, 2026 •

Copy link
Copy Markdown
Member
  • construct one sandbox runner during session seeding and reuse it through close
  • build runtime archives off the event loop and use the public model-endpoint helper
  • preserve evidence during bounded close and distinguish close races from caller cancellation

Tests and validation

Head 63e6886bd11d269cf273e76b41d863fd5cf508f5; actual main base f36e126547866601bee9c0671c9b59484ef83723. The existing stack tracks this work; no separate issue is needed.

Retained exact-head Linux evidence passed 250 focused tests and normal-completion, SIGKILL and active-close session/worker/collector cases. The normal run made two real model calls and earned synthetic fixture reward 1. The original verifier assertion failure remains recorded; a separate offline correction inspected the same rollout without repeating inference. This live execution used base 21a63e49; it is historical evidence, not a new live run on current main.

The isolated current-main merge preview has tree e7b986e17c10b14ea43619fff6483aa7b03786d6. Its 1,545 focused tests passed: 1,139 model/converter/streaming cases, 304 capture/fingerprint cases and 102 NOOA boundary cases. A two-turn scripted replay through the current converter and Gym adapter preserved function IDs, arguments, response envelopes, cookies and capture order. These were recorded model responses, not new inference. All 7,749 tracked preview files remained unchanged.

The runtime archive was rebuilt because ten shared inputs changed; its fingerprint differs from the historical head-only runtime. Fresh production installation in an isolated Linux arm64 container passed, seven installed-module hashes matched the preview, and the next preparation reused the same runtime generation without reinstalling. This installation used a verified cached copy of the pinned Python archive. Uncached download remains blocked: the inherited shared aiohttp downloader rejected GitHub's oversized CSP header. The original failure is retained; no shared-source repair was made. Both owned containers were removed and their absence verified. This does not establish x86_64, musl, remote egress, TB4 or SLURM behavior.

The 21,420-second worker ceiling is below the 21,600-second episode deadline; it reserves no setup or verification time. The episode also covers setup, close and verification; final cleanup has its own budget. This includes the approved asynchronous checkpoint writer left unpublished when #3850 merged. Projection/copy remains synchronous, and abrupt termination can lose the latest queued snapshot. Historical local Linux transport evidence does not prove cloud provisioning.

pre-commit run --all-files passed at this unchanged head. The official Codex review against current main completed with no actionable findings, using a disclosed per-invocation GPT-6 Astra selection after the configured model was rejected; saved configuration was unchanged. The review inspected code and tests but ran no tests itself. Independent current-base E2E applicability is BLOCKED on uncached production Python download. It verified the current and historical artifact hashes, source trees, replay, installed modules and native dependency; it did not repeat tests or inference. The historical live cases, current-main tests, scripted replay and cached-runtime installation retain their individual passing results. No introduced NOOA defect was established, but the inherited shared-downloader prerequisite remains unsatisfied. No final verification-success or readiness claim is made.

CI snapshot (2026-10-24 05:47 UTC) on this head: failing: Harness conformance (non-blocking) / kilocode conformance probes; Harness conformance (non-blocking) / Publish check; Harness conformance (non-blocking). Current checks. The all-green readiness gate remains unmet; no final verification-success post or new review request is implied.

@init-nikhil init-nikhil added area:agent Agent harnesses and Responses API agent behavior area:sandbox Sandbox providers, isolation, and sandbox runtime contracts labels Oct 1, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 1, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@init-nikhil
init-nikhil added this pull request to stack #3852 October 1, 2026 06:39
@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-sandbox-sessions branch from a3e7106 to 41ad22c Compare October 8, 2026 02:23
@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-sandbox-sessions branch 2 times, most recently from 79406b4 to c6d5441 Compare October 9, 2026 21:58
@init-nikhil
init-nikhil removed this pull request from stack #3852 October 9, 2026 21:59
@init-nikhil
init-nikhil added this pull request to stack #4355 October 9, 2026 22:00
@init-nikhil
init-nikhil removed this pull request from stack #4355 October 10, 2026 05:25
@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-sandbox-sessions branch from c6d5441 to fafe2e7 Compare October 10, 2026 05:25
@init-nikhil
init-nikhil added this pull request to stack #4367 October 10, 2026 05:25
@init-nikhil init-nikhil changed the title feat(nooa): [wip] wire sandbox execution into native sessions feat(nooa): wire sandbox execution into native sessions Oct 10, 2026
@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-sandbox-sessions branch from fafe2e7 to b108975 Compare October 10, 2026 05:29
@init-nikhil
init-nikhil marked this pull request as ready for review October 12, 2026 04:34
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 12, 2026 04:34
@yaoyu-33 yaoyu-33 added the complexity:low Localized change in one scope with a small, straightforward review surface label Oct 12, 2026
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>

# Conflicts:
#	responses_api_agents/nooa_agent/tests/test_config.py

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

Thanks for the follow-up. All six earlier comments are addressed: the runtime archive is now built in a thread (with a test that the loop stays live), the model URL uses the public helper, the timeout defaults are in nooa_agent.yaml and pinned to the Python defaults, the README covers the prerequisites and the embedded-mode change, the seed wiring and failed-connect cleanup are tested, and the new 409 for a close-interrupted caller looks right. I ran the nooa suite locally on this head (412 passed, 8 skipped: the Linux-only installer tests).

One small comment below on the "180 s headroom" wording. Smaller notes that don't need action here: prepare_nooa_runtime still does some synchronous work on a cold install (gunzipping the freshly built archive, hashing the Python tarball), which is minor next to what you moved off the loop, and the sandbox-runner constructor still defaults timeout=21600 while the config default is 21420.

yaoyu-33
yaoyu-33 previously approved these changes Oct 23, 2026

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

Approving. The inline comment on the "180 s headroom" wording is non-blocking.

Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

@init-nikhil init-nikhil left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CODEX SELF REVIEW

Reviewed head 63e6886bd11d269cf273e76b41d863fd5cf508f5 against actual base 8041d191061d5c49d291b793ad8962f2090c41f4 using a fresh official codex exec review process.

No actionable regressions were identified in the diff and surrounding lifecycle code. Test validation was blocked because the available environment resolves editable imports to a different checkout.

This is a source-review result, not an approving review or a substitute for the separate validation and CI gates.

@init-nikhil init-nikhil left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CODEX SELF REVIEW

Reviewed head 63e6886bd11d269cf273e76b41d863fd5cf508f5 against actual base f36e126547866601bee9c0671c9b59484ef83723 using a fresh official codex exec review process with gpt-6-astra. This invocation selected the model advertised by the refreshed account catalog after the configured model was rejected; saved Codex configuration was unchanged.

No actionable regressions were identified in the sandbox-session integration, bounded cleanup, or background checkpoint changes. This assessment is based on code and test inspection; tests and model smoke rollouts were not executed.

This is a source-review result, not an approving review or a substitute for the separate validation and CI gates.

yaoyu-33
yaoyu-33 previously approved these changes Oct 27, 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/40612821419

Signed-off-by: Nikhil Deshmudre <nikhil.deshmudre@gmail.com>
@init-nikhil

Copy link
Copy Markdown
Member Author

Merge-queue compatibility fix in a174558e4afa264f5e3bfb31b16133e50fd370e4:

Current main renamed the supervisor entrypoint from process_supervisor.py to process_supervisor in #4805. The mocked executor in the cleanup-retry test still matched the old filename, so its launch event never fired. The test now imports and matches the existing SUPERVISOR_FILE constant. Production code, cleanup assertions, and timeouts are unchanged.

Validation: reproduced the original TimeoutError on exact failed queue commit 59c18f6898164ff27e331bb78c473146a69202b8; all 16 tests in test_sandbox_sessions.py pass with this patch on both that queue snapshot and the PR's existing base. Ruff, format, full isolated pre-commit, and diff checks passed. The private guardwords catalog check was unavailable and skipped. No model rerun was needed for this test-only change. New GitHub CI is pending.

@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/40625821519

This branch was previously deployed

1 inactive deployment
public — a174558e Deployed Oct 28, 2026 by copy-pr-bot[bot] via release / finalize / notify #7726
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior complexity:low Localized change in one scope with a small, straightforward review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants