Skip to content

feat(sandbox): add CoreWeave sandbox provider - #4764

Open
anson627 wants to merge 14 commits into
NVIDIA-NeMo:mainfrom
anson627:anson627/coreweave-harbor
Open

anson627 wants to merge 14 commits into
NVIDIA-NeMo:mainfrom
anson627:anson627/coreweave-harbor

Conversation

@anson627

@anson627 anson627 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Add a CoreWeave provider for Gym sandboxes: exec, file transfer, reconnect, HTTPS endpoints, network policy, volumes, and snapshots. No separate issue is needed for this requested provider integration. Shared session cleanup moved to #5088.

Verification:

  • November 20 rebase: root lock retains both SDK entries and the removed main component stays removed. Two component locks received metadata-only updates. All 327 lock checks, 189 regression tests, 24 subtests and pre-commit passed; 1 Harbor-dependent test skipped.
  • November 18 rebase: refreshed 11 new component locks (metadata only; no package version changes). All 326 lock checks, 189 provider/failure/docs tests and 24 subtests passed; 1 Harbor-dependent test skipped. All-file pre-commit passed.
  • Latest main rebase: removed the duplicate CoreWeave page heading; all 30 docs tests and 24 subtests passed. Fern and pre-commit passed. Five new component locks received metadata-only updates. The unrelated OpenClaw supervision test requires Linux CI.
  • November 16 rebase: refreshed 11 new component locks with metadata-only changes. CI-style server checks passed: collab_intel_agent 20 tests; video_caption 169 tests plus data validation.
  • Managed Harbor config forwards --extra cwsandbox to its installer only; server-venv and locked-environment tests: 159 passed.
  • pytest tests/unit_tests/test_cwsandbox_provider.py tests/unit_tests/sandbox/test_sandbox_failures.py tests/unit_tests/test_public_api_facades.py -q -o addopts='': 1,144 passed, 1 skipped (Harbor SDK integration unavailable).
  • Provider tests: 85 passed, 1 skipped on each SDK 1.19.1, 1.21.0, 1.27.0, and 1.28.0. Structured CWSANDBOX_COMMAND_TIMEOUT translates to SandboxCommandTimeoutError on each version. Generic RPC deadlines stay distinct.
  • Simulated SDK-unavailable run: 63 passed, 23 skipped. Both sandbox CI workflows now install cwsandbox so real-SDK tests run there.
  • scripts/component_locks.py: all 327 projects passed. pre-commit run --all-files passed; private guardwords catalog unavailable. Sandbox CI extras resolved with uv sync --locked --dry-run. Fern check: 0 errors, 1 warning.
  • Live CoreWeave create/exec/file verification/cleanup passed on November 12. November 13 deadline probe returned a generic SDK timeout; its unknown command outcome was preserved and cleanup passed. The latest model-backed smoke was blocked by an inference credential returning 401.
  • Earlier Harbor + Terminus-2 fix-git rollout: reward 1.0, both verifier tests passed. Earlier live reconnect, endpoints, mounts, network policy, and snapshot checks also passed.

Compatibility:

  • SDK request/reconnect timeouts raise typed provider_io_timeout events. Confirmed command deadlines return exit 124 with error_type="timeout" and record the typed event.
  • CoreWeave is opt-in at both root and Harbor. harbor_agent_cwsandbox.yaml requests it through component_extras, so ng_run installs the SDK in the managed Harbor environment. Default Harbor installs exclude the SDK. The shared Harbor lock still selects protobuf 6.33.6 because uv resolves all extras together; the optional extra does not restore the previous protobuf version.
  • Other component lock changes only add Gym's optional-extra metadata. Main already retains cryptography; no OSWorld exclusion change is required.
  • Requires prebuilt single-container images. Disk quotas are not enforced. Snapshots and registered volumes require deployment support.

@copy-pr-bot

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

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Oct 19, 2026
@anson627
anson627 force-pushed the anson627/coreweave-harbor branch from 64ae601 to 2f456ee Compare October 19, 2026 21:09
@anson627
anson627 marked this pull request as ready for review October 19, 2026 21:10
@anson627
anson627 requested a review from a team as a code owner October 19, 2026 21:10
@yaoyu-33 yaoyu-33 added area:sandbox Sandbox providers, isolation, and sandbox runtime contracts complexity:medium Single-domain change with interacting parts or a moderate review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Oct 19, 2026

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

it may also be good to expose some additional features like reconnection, endpoints, network policy control, mounts and volumes, snapshot. The opensandbox provider might have reference implementations

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-customer Waiting on the original author to respond label Oct 20, 2026
@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test 2f456ee

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

@yaoyu-33 yaoyu-33 removed the needs-review PR is ready for code review and waiting on a reviewer label Oct 20, 2026
@anson627 anson627 changed the title feat(sandbox): add CoreWeave provider for Harbor feat(sandbox): add CoreWeave sandbox provider Oct 20, 2026
@anson627

Copy link
Copy Markdown
Contributor Author

it may also be good to expose some additional features like reconnection, endpoints, network policy control, mounts and volumes, snapshot. The opensandbox provider might have reference implementations

Added reconnect, endpoints, network policies, mounts, and snapshots

Verified on harbor-dev: 89 tests passed, model rollout reward 1.0, live feature checks passed

@svcnvidia-nemo-ci svcnvidia-nemo-ci added needs-review PR is ready for code review and waiting on a reviewer and removed waiting-on-customer Waiting on the original author to respond labels Oct 20, 2026
@anson627

Copy link
Copy Markdown
Contributor Author

@cmunley1 could you please help to take another look? Thanks in advance!

@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test 4f443bf

@cmunley1

Copy link
Copy Markdown
Contributor

/review

@hemildesai

Copy link
Copy Markdown
Contributor

Thanks for the lock refresh. The lock checks pass now. One CI failure is from this PR, and the fix is a one-liner:

  • tests/unit_tests/test_fern_docs_links.py::test_latest_pages_do_not_repeat_the_title_as_a_heading fails on infrastructure/sandbox/cwsandbox.mdx. A docs rule added on main in the meantime (docs: drop body headings that repeat the page title #5908) disallows a body heading that repeats the frontmatter title. Removing line 7 (# CoreWeave Sandbox Provider) and the blank line after it should fix both Core tests (shard 1) and the docs check job.

The other required failure, openclaw_agent's test_exec_only_supervision_leaves_task_children_for_sandbox_owner in Server suite shard 7, is in code this PR doesn't touch. It looks flaky; it should clear when CI re-runs on your next push. I'll approve once CI is green on that head.

@anson627
anson627 force-pushed the anson627/coreweave-harbor branch from 43482fd to 96d477d Compare November 16, 2026 20:19
@anson627

Copy link
Copy Markdown
Contributor Author

@hemildesai Rebased onto main and removed the duplicate heading. Docs tests, Fern, all 315 lock checks, and pre-commit pass.

New head for CI: 96d477d8f1099a8586f26c5a667ab35b0ebdd3cf.

@hemildesai

Copy link
Copy Markdown
Contributor

/ok to test 96d477d

hemildesai
hemildesai previously approved these changes Nov 17, 2026

@hemildesai hemildesai 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 at 96d477d. Everything from my earlier reviews is addressed: the CI install and guards for cwsandbox, the confirmed command deadline returning error_type="timeout", the supported-range message, Harbor's opt-in extra wired through component_extras, the refreshed locks, and the duplicate docs heading.

Required CI is green. A re-run cleared an unrelated flaky codex_agent timing test. The remaining failures are the non-blocking Environment Server compliance check and the advisory lock-freshness check. Thanks for working through all of this!

@anson627
anson627 force-pushed the anson627/coreweave-harbor branch from 96d477d to 513c74e Compare November 18, 2026 21:05
@svcnvidia-nemo-ci svcnvidia-nemo-ci added risk:high Autobot PR risk: high waiting-on-maintainers Waiting on maintainers to respond labels Nov 18, 2026
@hemildesai

Copy link
Copy Markdown
Contributor

/ok to test 513c74e

hemildesai
hemildesai previously approved these changes Nov 19, 2026

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

Re-approving at 513c74e after the rebase dismissed my approval. The non-lock changes are identical to the version I approved, and the new commit only refreshes uv.lock metadata. Required CI is green (a re-run cleared an unrelated flaky pi_agent timing test); the only failure is the non-blocking Environment Server compliance check.

Keep command PATH overrides from hiding the wrapper interpreter. Add execution-backed shell regressions and retain quoting, cwd, timeout, output and user-switch contracts.

Verified on harbor-dev with a real CoreWeave sandbox as root, worker and UID 1000: builtins, restricted PATH, user identity and literal environment values passed.

Signed-off-by: Anson Qian <[email protected]>
Use the SDK public awaitable instead of running synchronous readiness waiting in a non-cancellable worker thread. Centralize and guard client-only cleanup with an actionable SDK compatibility error when the private hook is missing or not callable, preserving the owner sandbox.

Validation: 72 provider/resolver tests passed, 1 skipped with cwsandbox 1.21.0; 64 provider tests passed, 1 skipped against the declared minimum 1.19.1. Real SDK event-loop cancellation, timeout-before-deletion ordering, and unavailable cleanup-hook regressions passed. All-file pre-commit passed; private guardwords catalog unavailable. Live rerun was unavailable because harbor-dev was not found in the current Coder account.
Signed-off-by: Anson Qian <[email protected]>
Keep SDK request and reconnect timeouts distinct from confirmed command deadlines. Translate provider failures into sandbox events with explicit causes and preserve cancellation and existing typed events. Detach the original SDK client after successful deletion, including already-terminal sandboxes.

Verification: 1000 focused provider, shared failure-report and import-policy tests passed, 1 skipped. All-file pre-commit passed; private guardwords catalog unavailable. Provider regressions also passed against SDK 1.19.1 and 1.21.0. Live SDK 1.28.0 CoreWeave creation, exec, binary file round-trip and cleanup passed. Model-backed smoke could not complete: the previously configured W&B inference credential returned 401. harbor-dev Coder hostname no longer resolves.
Signed-off-by: Anson Qian <[email protected]>
Rebase onto current main and refresh the Gym metadata embedded in 280 dependent component locks. Only the cwsandbox optional requirement and provided-extra declaration change; no package versions or resolver policies change.

Validation: scripts/component_locks.py passed for all 289 managed projects (UV_SYSTEM_CERTS=true for local TLS trust). Provider, shared failure-report and import-policy regressions: 1116 passed, 1 skipped. All-file pre-commit passed; private guardwords catalog unavailable. Model rollout N/A for these lock metadata changes.
Signed-off-by: Anson Qian <[email protected]>
Install cwsandbox in sandbox CI and guard SDK-only tests. Return a timeout result and observe the typed event only for confirmed command deadlines; preserve unknown remote outcomes for generic SDK timeouts. Use the supported SDK range in cleanup diagnostics and make Harbor SDK installation opt-in.

Validation: 1118 focused tests passed, 1 skipped. Provider tests passed with SDKs 1.19.1, 1.21.0, 1.27.0, and 1.28.0; simulated SDK absence passed 63 tests with 23 skipped. All 289 component locks, all-file pre-commit, CI-extra install dry-run, and Fern check passed (Fern: 1 existing warning). Live deadline probe returned a generic SDK timeout; provider_io_timeout preserved the unknown command outcome and cleanup succeeded. The optional Harbor extra excludes cwsandbox from default installs, but uv resolves all extras together and still selects protobuf 6.33.6 in the shared lock.
Signed-off-by: Anson Qian <[email protected]>
Retain main catalog entries and update the nine newly added managed components with the optional CoreWeave extra metadata. No package versions change. Validation after rebase: 1135 focused tests passed, 1 skipped; all 298 component locks and all-file pre-commit passed.

Signed-off-by: Anson Qian <[email protected]>
Request cwsandbox through component_extras so ng_run installs the optional SDK into the managed Harbor environment. Document config-based selection instead of a manual project sync.

Validation: loaded the actual config and verified setup_env_command forwards --extra cwsandbox only for Harbor. Managed server and locked-environment tests: 159 passed. All-file pre-commit and Fern check passed (Fern: 1 warning; private guardwords catalog unavailable).
Signed-off-by: Anson Qian <[email protected]>
Rebase onto current main and refresh the six components identified in review plus five newer components. Changes only add the optional CoreWeave requirement and extra to Gym metadata; package versions and resolver policies are unchanged.

Validation: all 309 managed lock checks passed. CI-style ng_test runs with should_validate_data=true passed for collab_intel_agent (20 tests) and video_caption (169 tests plus data validation). Provider, shared failure-report and public-facade regressions: 1144 passed, 1 skipped. All-file pre-commit passed; private guardwords catalog unavailable. Model rollout N/A for lock metadata updates.
Signed-off-by: Anson Qian <[email protected]>
Remove the body heading that duplicates the Fern frontmatter title, as requested in review. Refresh the optional-extra metadata in five newly added component locks without package version changes.

Validation: test_fern_docs_links.py passed 30 tests and 24 subtests; Fern check passed with 0 errors and 1 warning; all 315 managed lock checks and all-file pre-commit passed. Private guardwords catalog unavailable. The unrelated OpenClaw process-supervision test requires Linux and must rerun in CI.
Signed-off-by: Anson Qian <[email protected]>
Refresh the optional CoreWeave extra metadata in 11 components added to main. Package versions and resolver policies are unchanged.

Validation: all 326 managed lock checks passed; CoreWeave provider, shared sandbox failure, and docs regressions passed 189 tests and 24 subtests, with 1 Harbor-dependent test skipped. All-file pre-commit passed; private guardwords catalog unavailable. Model rollout N/A for metadata-only lock updates.
Signed-off-by: Anson Qian <[email protected]>
Resolve the root lock conflict by retaining both cwevals and cwsandbox, and preserve main deletion of the obsolete compaction component. Refresh only the optional-extra metadata in two newly added component locks; package versions are unchanged.

Validation: all 327 managed lock checks passed; provider, sandbox failure-report and docs regressions passed 189 tests and 24 subtests, with 1 Harbor-dependent test skipped. All-file pre-commit passed; private guardwords catalog unavailable. Model rollout N/A for lock metadata changes.
Signed-off-by: Anson Qian <[email protected]>
@anson627

Copy link
Copy Markdown
Contributor Author

@hemildesai Could we merge this PR soon? Keeping it up to date has required repeated conflict resolution.

@hemildesai

Copy link
Copy Markdown
Contributor

/ok to test e8cc58a

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

Re-approving on e8cc58a: CI is green, and the only failures are the non-blocking compliance and conformance checks. LGTM.

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

Re-approving e8cc58a after reviewing the delta from my previously approved 70f58ff. The CoreWeave implementation, provider tests and Harbor configuration are unchanged. Checked the updated shared sandbox lifecycle/timeout paths and the subsequent review discussion; no new blocker found within the sandbox failure-evidence, timeout/cancellation and lifecycle-ownership scope.

Fresh validation at this head: 159 passed, 1 skipped across the CoreWeave provider and sandbox failure suites with cwsandbox 1.27.0; the skip requires Harbor. Diff whitespace check passed. No live CoreWeave/model rollout or CI monitoring was performed.

@anson627

anson627 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Hi @hemildesai @giuliolovisotto, could you help merge this PR when the required checks pass? Both reviews are approved, and keeping it current has required repeated rebases and lock refreshes. Thanks!

This branch was previously deployed

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

Labels

area:sandbox Sandbox providers, isolation, and sandbox runtime contracts community-request Issue reported or requested by someone from the community complexity:medium Single-domain change with interacting parts or a moderate review surface 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.

7 participants