Skip to content

feat(mcp_atlas): add MCP-Atlas with per-rollout agent-environment sandboxes - #5287

Merged
jonathanlli merged 41 commits into
mainfrom
wprazuch/mcp-atlas
Dec 1, 2026
Merged

jonathanlli merged 41 commits into
mainfrom
wprazuch/mcp-atlas

Conversation

@wprazuch

@wprazuch wprazuch commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds MCP-Atlas (Scale AI): multi-step tool use against real MCP servers, scored by LLM-judged claim coverage. The benchmark runs the 500 public tasks of ScaleAI/MCP-Atlas with the upstream ghcr.io/scaleapi/mcp-atlas:1.2.7 agent-environment image, one private sandbox per rollout. No separate issue; this PR and its review threads track the integration.

What is added

  • Resources server resources_servers/mcp_atlas: seeds a per-rollout sandbox that serves only the task's MCP servers, proxies the task's tools to it, judges the final answer claim by claim, and separates environment failures from model outcomes with mask_sample and failure_kind.
  • Backends resources_servers/mcp_atlas/backends/: the system that serves a task's tools is selected by the backend config key. scale_live (the upstream image against live services) is the default and the only backend in this tree; the registry lets a deployment add another without changing the server. The backend's name is recorded in every prepared row and verify response, and a row prepared for another backend is refused.
  • Benchmark entry benchmarks/mcp_atlas: prepare.py downloads the pinned Parquet file and writes 500 rows with the tools the image serves (schemas from tool_catalog.json, 320 tools over 36 servers) and the normalized ground-truth claims.
  • Credential handling credentials.py: each sandbox receives only the known service credentials its servers require; host and provider credentials are refused; missing credentials fail at startup when the declared datasets are readable, and every seed rejects a task whose credentials or servers are wrong before any sandbox is allocated. validate_rollouts.py scans rollout files for credential values before they are published.
  • Docs: a Fern tutorial, a README with the measurement protocol, the failure taxonomy and the upstream differences, and a glossary entry for backend.
  • Core: gym eval reverify forwards one MCP-Atlas-named saved field, mcp_atlas_environment (the rollout's tool-call count, service errors and provenance), so a re-judged row keeps its original environment attribution, and nemo_gym.core exports is_materialized_task_row. Nothing else in nemo_gym changes.

How a task is scored

Each ground-truth claim is judged against the final assistant message with upstream's score_claims.py prompt (temperature 0, structured output): fulfilled 1, partially fulfilled 0.5, not fulfilled 0. coverage is the mean; reward is 1 when coverage reaches 0.75, so mean/reward is the upstream pass rate. The default judge is Gemini 3.1 Pro, upstream's default, on any OpenAI-compatible endpoint.

Differences from the ScaleAI reference

Behavior that is not in upstream, each a deliberate choice for Gym's evaluation and training use:

  • Failure attribution and masking. Upstream feeds every tool failure back to the model and scores the task. Here an infrastructure failure (sandbox did not start, a task tool missing, provider-reported transport loss) masks the rollout with mcp_atlas:<kind>, and a service quota, TLS or server error masks it when mask_service_errors is set, so infrastructure noise does not become training zeros. Two cases follow upstream and stay scored: a tool's own returned error, including a program-execution timeout, and a sandbox whose server the model's own command ended (after a transport failure, only when a program or command tool ran in the rollout, the provider still runs commands in the sandbox, and the server's port refuses connections).
  • Authentication failures are configuration errors. A recognized credential rejection from a credentialed service stops the rollout with HTTP 422 before judging, instead of becoming a scored or masked outcome.
  • Judge failure masks. Upstream scores a claim whose judge call fails eight times as not fulfilled; here the rollout is masked (judge_failed).
  • Tool-call budget. Upstream stops at the 100th tool call; here the model receives an error and may still answer. The bridge deadline is 1860 s, above upstream's 1800 s per-task budget, so a tool's own timeout error reaches the model; no per-task wall-clock deadline is enforced.
  • Model turns. max_steps is upstream's harness default of 256; reference runs of the credentialed benchmark used 100, which the README documents as an override.
  • One sandbox per rollout. Upstream shares one agent-environment across tasks; here stateful servers start clean for every rollout. On OpenSandbox the tool calls go over lifecycle exec to the sandbox's loopback with no exposed port and an explicit default-deny network policy, and the server refuses to start for scoring unless the provider declares that its deployment enforces network policies (networking.enforces_network_policy: true); the Apptainer and shared-URL paths are explicit development modes that cannot produce scores.
  • One documented tool-version mismatch. Task 6887c6d4614f06dc73af2411 requests a ClinicalTrials tool the pinned package does not register; it is kept in dropped_tools for that task only.

Validation

  • Unit tests: 351 in the server and benchmark suites, including the backend registry, backend mismatch refusal, the scored environment-destroyed case with its controls, typed seeds and episode ownership, large requests on the exec transport, and reverification; the touched core tests and the repository-wide checks pass. CI is green on every gating check at the current head; the one red job is the non-blocking miniswe_sandboxed conformance probe, which this PR does not touch.
  • Example rollouts: the five rows of data/example.jsonl were run end to end through the single_agent_turn_legacy Environment Server on a CPU node with the Apptainer development config, a SIF built from the pinned image, Gemini 3.1 Pro as policy and judge, two concurrent rollouts. All five complete and pass (coverage 1.0 on four, 0.929 on one) with 4 to 11 tool calls over the filesystem, git, CLI, desktop-commander and DuckDuckGo servers. No service errors, nothing masked, no credential values or host paths in the output. These are examples of the five key-free tasks, not benchmark scores.
  • Review reproductions on a live OpenSandbox deployment with the pinned image: a 200 KB tool argument fails the exec on the commit before the fix and succeeds after it, and environment_destroyed is set only when model code actually kills the sandbox's server.
  • pre-commit run --all-files, the detect-secrets baseline and DCO sign-off pass.
  • Live-service derisking: with the production service credentials, 34 tasks covering every credentialed server (no e2b-server) ran through this server at concurrency 4, once with a hosted policy and once with the same Nemotron 4 Nano RL checkpoint and vLLM serving condition that our internal fork of the ScaleAI harness (with our own sandbox fixes) evaluated on the full 500 tasks. No masked rows, no service errors, no credential values in the output, and the known-unavailable services were counted in provenance. On the same 34 tasks the two harnesses agree once the tasks that ended in a terminal model error in either run are set aside (production 0.867 vs Gym 0.908 mean coverage on the 27 remaining tasks, within single-sample noise); the rest of the gap is context-window overflows, which both score as zero, the way upstream does.

Open before the benchmark is marked verified

Deployment validation, not code: a credentialed run of the 500 tasks with seeded accounts (411 tasks use at least one key-gated server), enforced network and control-plane isolation evidence on the OpenSandbox deployment, and an authenticated Slack tool listing. verified: false stays until then.

Source and licensing

  • verifier.py and the claim normalization in benchmarks/mcp_atlas/prepare.py adapt services/scoring/score_claims.py at revision 5c11ac44e96d31b91b92a0affad5f2648255907a, MIT, Copyright (c) 2026 Scale; the files keep the notice.
  • credentials.py derives its server-to-credential registry from mcp_server_template.json at the same revision, MIT.
  • tool_catalog.json holds the schemas exported from the image's /list-tools; its five Slack schemas are the static definitions of [email protected], MIT, Copyright (c) 2025 Dmitrii Korotovskii.
  • Dataset: CC-BY-4.0. Details in ATTRIBUTIONS.md and the server README.

Ownership

Opened by @wprazuch (Frontier Eval) on 2026-10-29 and closed on 2026-11-16. Reopened on 2026-11-23 by @jonathanlli, who now owns the branch, as agreed with Frontier Eval and the other stakeholders: this PR becomes the public scale_live backend of a single MCP-Atlas environment whose other backends live outside this tree. Since the reopening: two merges of main, the backend seam, the scored environment-destroyed case (resolving the open review threads), the component lock refresh and the example rollouts. AI-assisted implementation and tests; every line was reviewed by the author.

🤖 Generated with Claude Code

…dboxes

Adds MCP-Atlas (public 500 tasks) as the mcp_atlas resources server and a benchmark entry. Each rollout gets its own agent-environment sandbox serving only the task's MCP servers; the verifier ports upstream score_claims.py.

Signed-off-by: Wojciech Prazuch <[email protected]>
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 29, 2026 10:46
@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Oct 29, 2026

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

HOLD — sandbox isolation, cancellation cleanup, and the advertised reverification path need correction.

Reviewed all 25 changed files and their directly affected contracts across three independent topics. This was static inspection only: no tests, model rollouts, downloads, or live sandbox checks were executed. Catalog assessment covered tool/server mapping and preparation contracts; long third-party schema lines were reader-truncated, so exhaustive external-schema conformance is not claimed. Suggested code below is unexecuted and must be verified before adoption.

RISK — Representative real rollout evidence is missing

The PR explicitly reports no example rollouts. Unit tests and individual live tool calls do not exercise the configured Simple Agent → sandbox → final answer → judge path. Trusted AGENTS.md requires representative real smoke rollouts for behavior-changing environment work; the pinned rubric makes missing required evidence at least a RISK.

Could you run and inspect representative model-driven tasks using the committed configuration, and provide exact commands/configuration, model and judge versions, task IDs, saved trajectories, claim verdicts, coverage/reward, and masked/unmasked counts? Include successful tool use and a genuine model failure, with an environment-failure case distinguished separately. Report mean reward for the selected set. Preserve verified: false until baselining and review justify changing it.

Acceptance is inspected, reproducible rollout evidence showing real tool outputs reaching the model and verdicts consistent with its final answer. This is an evidence request, not a claim that particular model scores should occur.

NOTE — Suggestion: document the benchmark on the published site

The new benchmark has substantial setup requirements, but its documentation exists only in the resources-server README. There is no MCP-Atlas entry in the published environment catalog. The pinned rubric requires documentation for notable user-facing benchmarks.

Add a concise Fern evaluation tutorial and catalog link covering preparation, server startup, collection/profiling, the exact sandbox/judge configuration keys, seeded-account prerequisites, and current limitations. Retain the implementation README and its distinction between isolated scoring sandboxes and the shared development URL. Proposed acceptance: the page is reachable through the existing evaluation-tutorial navigation, its links pass documentation checks, and its prepare/run sequence is usable without consulting PR text. Documentation must not imply the Slack preparation failure is resolved.

RISK — Upstream-derived material lacks the required provenance/licensing record

verifier.py explicitly contains a verbatim upstream prompt, while prepare.py identifies adapted upstream scoring rules. Their headers do not record the required source URL, full upstream revision, source filenames, and applicable upstream license/notices. The blanket licensing sentence is not that record, and this changeset does not update the attribution file.

Please add the provenance to the affected file headers and PR description, retain applicable original copyright/license notices, record the component in ATTRIBUTIONS.md, and distinguish upstream MIT material from Apache-2.0 local modifications. These requirements come from trusted AGENTS.md and CONTRIBUTING.md. The exact original notice and full upstream revision were unavailable here, so no replacement notice is fabricated.

Acceptance is a static provenance/license audit of those files and the attribution record, with the PR mapping original files to affected Gym files. Preserve the separate CC-BY-4.0 data attribution and pinned dataset revision; no runtime behavior change is needed.

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.

Comment thread resources_servers/mcp_atlas/sandbox.py Outdated
box = AtlasSandbox(base_url="", tool_names={}, missing_tools=[])
try:
box.port = self._ports.acquire()
box.base_url = f"http://127.0.0.1:{box.port}"

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.

BLOCKER — Shared host networking bypasses per-rollout tool isolation.

Failure: The pool deliberately exposes sandbox APIs on host-loopback ports, and call_sandbox_tool authenticates neither the caller nor the session. The default provider configuration does not establish separate networking. A rollout offering the committed Python-execution tool can therefore contact another concurrently running sandbox directly. For example, with A offering code execution and B serving memory plus calculator, code in A can scan the configured ports, POST to B's /list-tools, then POST {"tool_name":"memory_read_graph","tool_args":{},"use_cache":false} to B's /call-tool. This reads B's state without either resource-server allowlist; mutable tools can also alter it. Loopback and --cleanenv do not separate processes sharing that network namespace.

Correction: Establish a network/access boundary between evaluated code, other rollouts, and Gym control-plane services. Change endpoint construction and provider networking together, using isolated networking plus a host-controlled transport or another verified boundary. Adding an isolation flag alone would break the current loopback proxy, so an exact provider-specific patch is uncertain.

Preservation / proposed acceptance: Run A and B concurrently with a private marker in B. A must be unable to list/call B's tools or change that marker, while the host proxy can call each sandbox independently. Each task must retain its own mutable state and permitted internet access. Also deny A access to Gym model/judge control endpoints. Keep the explicitly shared development URL separate from scoring configuration. This attack path is source-reasoned, not an executed exploit.

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.

Still open: the host-loopback transport and default provider configuration lack a verified network/access boundary. Acceptance requires concurrent rollout A/B isolation (no cross-rollout tool/state access or Gym policy/judge control-plane access) while preserving the host proxy and required internet access. A compatible transport/egress implementation and live acceptance evidence remain outstanding; keep this blocker open. A possible route is sandbox-local loopback plus host-controlled exec transport through OpenSandbox, with no exposed task-service ports. It still needs enforced IP-level egress and protected policy management; DNS-only filtering is insufficient. @hemildesai, could you review that transport/isolation direction and the acceptance requirements?

Comment thread resources_servers/mcp_atlas/app.py Resolved
Comment thread resources_servers/mcp_atlas/sandbox.py Resolved
Comment thread resources_servers/mcp_atlas/app.py Resolved
Comment thread resources_servers/mcp_atlas/app.py Resolved
records = pandas.read_parquet(parquet).to_dict(orient="records")
if len(records) != EXPECTED_TASKS:
raise ValueError(f"expected {EXPECTED_TASKS} tasks at revision {REVISION}, got {len(records)}")
rows = [build_row(record, catalog, servers) for record in records]

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.

RISK — The advertised full benchmark cannot be prepared with the committed catalog.

Failure: prepare() constructs every row before opening its output. The catalog declares Slack image-supported but has no Slack tool entries. Any source record enabling a slack_… tool consequently raises in build_row; the PR confirms 60 such tasks. Thus a fresh gym eval prepare --benchmark mcp_atlas produces no benchmark file despite the active 500-task entry. Runtime credentials do not repair an offline catalog omission.

Correction: Export and commit the missing Slack schemas with the supplied exporter before publishing this full-set entry. Preserve the fail-closed supported-server check: silently removing Slack tasks or tools changes the declared benchmark. Exact schemas require a real image export, so no schema patch is fabricated.

Preservation / proposed acceptance: Prepare the pinned dataset from a fresh checkout and assert a written file with exactly 500 unique task IDs. Slack-enabled records must retain their image-supported tool definitions and metadata. Retain the fully missing supported-server rejection test and the existing anili_search unsupported-server drop assertion. These checks were not executed.

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.

Still open: the committed catalog declares Slack supported but has no Slack tool entries, so Preparation intentionally rejects these missing supported tools. An authenticated /list-tools export from the pinned image is required, followed by fresh preparation verifying 500 unique task IDs with Slack tools/metadata retained. Runtime credentials alone do not repair the static catalog; no guessed schemas, removed tasks or successful full-set preparation is claimed, and this thread should remain open.

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.

Published 9eb4858ff79fd88527d2cf0305e478ba92320001: preparation now writes 500 unique tasks, including all 60 Slack tasks. The five Slack entries were recovered from the official README-linked historical /list-tools export and compared against every relevant field in the pinned Slack1.1.23 registrations; the amd64 image template pins that exact package. Source URLs, full revisions, snapshot hash and full MIT notice are retained in the catalog header/PR description. All315existing tool objects are unchanged.

The pinned dataset also requests one ClinicalTrials tool absent from its pinned1.0.8 package. Only that exact task/tool pair follows upstream’s served-tool intersection, with the omission retained in dropped_tools; all500tasks remain, and other missing supported tools still fail. The existing missing-server/partial-catalog and unsupported-server tests remain, with narrow exception/near-miss regressions added.

423localtests and all-fileprecommit passed; exact-head fullCI is running. Authenticated listing/scopes in the current image/workspace remain unverified, so this evidence does not resolve that runtime acceptance condition or claim a full evaluation.

Comment thread benchmarks/mcp_atlas/prepare.py Resolved
Comment thread resources_servers/mcp_atlas/app.py Resolved
Comment thread resources_servers/mcp_atlas/verifier.py Resolved
Comment thread resources_servers/mcp_atlas/app.py Resolved
@mpatel31415
mpatel31415 requested review from a team as code owners November 9, 2026 10:07
@copy-pr-bot

copy-pr-bot Bot commented Nov 9, 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.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

@mpatel31415
mpatel31415 marked this pull request as draft November 9, 2026 10:40
@copy-pr-bot

copy-pr-bot Bot commented Nov 9, 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.

@mpatel31415
mpatel31415 marked this pull request as ready for review November 10, 2026 09:40
@jonathanlli

Copy link
Copy Markdown
Contributor

/ok to test 28b7e3b

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the benchmark-onboarding Self-contained benchmark onboarding label Nov 28, 2026
@ffrujeri
ffrujeri requested review from a team, AdamRajfer and prokotg November 30, 2026 18:39
@ffrujeri

Copy link
Copy Markdown
Contributor

This is a P0 benchmark for Nemotron 4, and internal MRs depend on it this week. Could you take a review, each on one part?

  • @prokotg: the resources server and the benchmark (resources_servers/mcp_atlas/, benchmarks/mcp_atlas/).
  • @hemildesai: the per-rollout sandbox lifecycle (start, stop on every path, ttl_s), and the open bot thread on host networking.
  • @AdamRajfer: the three keys added to nemo_gym/eval/rollout_reverification.py.

Required CI passes at 28b7e3b. One small config change is requested inline (the legacy_agent relay).

…pt its typed seed

Both environment servers move from legacy_agent to single_agent_turn_legacy
with the resources server reference and a direct_http tool grant, as the
repository asks of new configs. The resources server's seed_session now
accepts the Environment Server's typed ResourcesSeedSessionRequest beside the
cookie seed: it binds the named session to the cookie and reads the row's
verifier_metadata from task_data, so tool calls, verify and close find the
rollout under the same session. The five example rollouts are regenerated
under the new environment server (same hosted policy and judge; four scored,
one empty answer scored 0); gym env validate passes on both configs and
gym env test with data validation passes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Jonathan Li <[email protected]>
@jonathanlli
jonathanlli removed request for a team November 30, 2026 19:10
@jonathanlli

Copy link
Copy Markdown
Contributor

/ok to test aa90154

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

Two of the comments below were reproduced live on OpenSandbox with ghcr.io/scaleapi/mcp-atlas:1.2.7 and key-free servers (calculator, filesystem, mcp-code-executor); the rest are from reading the code.

What worked: the server, benchmark and reverification tests pass locally (595 passed); the sandbox started in 49 s, listed all requested tools, served ordinary calls in about 0.5 s each and stopped cleanly; the deny-by-default network policy was enforced (example.com blocked, pypi.org allowed). Not run: a full rollout with a policy model and judge, or any credentialed server.

🤖 Generated with Claude Code

Comment thread resources_servers/mcp_atlas/sandbox.py Resolved
Comment thread resources_servers/mcp_atlas/app.py Resolved
Comment thread resources_servers/mcp_atlas/app.py Resolved
Comment thread resources_servers/mcp_atlas/app.py Resolved
Comment thread nemo_gym/eval/rollout_reverification.py Resolved
Comment thread resources_servers/mcp_atlas/app.py Resolved
jonathanlli and others added 3 commits December 1, 2026 10:25
…d reverify fields

- Large tool arguments failed on the OpenSandbox exec transport: the whole
  request travelled in one environment string, which Linux caps at about
  128 KB. A request over 64 KB is now uploaded as a file the staged helper
  reads once and removes; smaller requests keep the single exec.
- environment_destroyed was set while the server still answered: the probe
  only checked that the provider could exec. It now also requires the
  server's port to refuse a /health connection, so a transient provider or
  transport error after a program tool stays a masked sandbox_unreachable.
- Close and re-seed check the owning episode: a typed seed records its
  episode, and a close or seed naming another episode is refused with a
  session conflict instead of stopping a live sandbox.
- A close or retirement ends the tool call in flight instead of queueing
  behind it for the bridge deadline; verify still waits.
- A task with no usable claims is rejected at seed and verify (HTTP 422)
  and fails preparation, rather than scoring 0 as a model failure.
- gym eval reverify forwards one MCP-Atlas-named field,
  mcp_atlas_environment, instead of the generic tool_calls, service_errors
  and provenance names another server may use for itself.
- New annotations use X | None.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: Jonathan Li <[email protected]>
…nvironment record

The five example rows were rerun through single_agent_turn_legacy on the
tree with the review fixes and latest main (same Apptainer development
config, hosted policy and judge). All five completed and scored (coverage
1.0 on four, 0.929 on one); each row now carries the mcp_atlas_environment
record that reverify forwards. No credential values or host paths.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: Jonathan Li <[email protected]>
@ffrujeri

ffrujeri commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

/review 886c361

@ffrujeri

ffrujeri commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for the fixes. The lint check fails on one hook: benchmarks/mcp_atlas/manifest.yaml needs the selection fields that main now requires (maintainers, capabilities, domains, requirements.gpu, requirements.network, primary_metric; unknown is accepted where a value is not known). The guardwords hook only skipped.

@hemildesai the new commit addresses your review of the transport, session ownership and sandbox lifecycle. Could you take another look when CI is green?

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

HOLD: the network-isolation finding is only partially resolved; scoring still accepts a provider that does not advertise enforced network restrictions.

I completed the follow-up against ca045d70d831b6ef2df8ae4683fd62e944f67e00 with three delegated reviewers. I applied the existing above-high filter for new findings and found no new critical issue. The inline BLOCKER continues comment:4412020208; it acknowledges that lifecycle exec and sandbox-local loopback fix the original exposed-port transport.

Prior findings

  • Resolved: interrupted startup cleanup (4412020233), provisioning/close races (4412020237), retirement cleanup (4412020242), provider configuration/metadata (4412020257), reverification forwarding (4412020225), judge-failure evidence retention (4412020317), malformed verdict handling (4412020332), and the TTL warning (4412020350).
  • Resolved: full-set preparation (4412020271) and partial-catalog rejection (4412020281). Preparation now writes 500 unique tasks, including 60 Slack-enabled rows. Authenticated Slack behavior was not validated.
  • Prior review body: Fern documentation and provenance/licensing records are present. The five committed development trajectories provide real model/tool/judge smoke evidence, so I am not repeating the claim that real rollouts are missing. Their mean saved reward is 1.0, mean coverage 0.9858, and masked count 0/5. They do not validate production OpenSandbox isolation. I could not independently inspect the additional 34-task credentialed comparison reported in the description.

Execution evidence

I used 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:3f8328838dc782ffc8d8f17ef48dccbfe681ef4a, the successful default-branch CI image, because the admitted head had no successful container-build check. Probes loaded the admitted source rather than the image's editable Gym installation. Missing OpenSandbox SDK packages were installed only into the scratch environment.

Purpose-built CPU probes passed for baseline-versus-head interrupted cleanup, seed/close and retirement races, named-provider metadata, judge-failure recovery through the real reverification payload builder, malformed verdicts, credential/authentication controls, and the HTTP helper's 200 KB file transport. The original partial-Whois counterexample fails closed on this head, and public prepare() produced 500 unique rows outside the checkout. I also replayed all five saved examples through the real payload builder and sessionless verifier with a stub judge: counts, provenance and failure masking were preserved.

The isolation constructor probe reproduced the remaining finding: with production mode and enforces_network_policy=false, the provider advertised only network_rules=["inherit"], yet backend construction succeeded. This is configuration-path evidence, not a demonstrated cross-sandbox exploit. No live isolation test, authenticated service call, new model rollout or full repository test suite ran during this review.

Current CI

The admitted head is not green. Both Lint check runs failed; the log identifies missing selection metadata in benchmarks/mcp_atlas/manifest.yaml. Guardwords skipped because its private catalog was unavailable. Copyright, secrets, Ubuntu/macOS locks and DCO passed; request skipped. No completed unit/server-suite result was present on this head. I report the lint failure as check status, not as a new finding above the follow-up impact ceiling.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

)
from opensandbox.models.sandboxes import NetworkPolicy

encoded_policy = NetworkPolicy.model_validate(policy).model_dump(

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.

BLOCKER: reject scoring configurations without declared network-policy enforcement. This partially continues prior finding comment:4412020208. The lifecycle-exec transport fixes the old host-loopback exposure, but these checks establish only a default-deny request that the SDK preserves. They do not check whether the resolved provider supports enforcing it.

I ran venv/bin/python -S /workspace/review-probes/run.py /workspace/review-probes/sandbox-security-1/network_probe.py with sandbox_development_mode=false and opensandbox.networking.enforces_network_policy=false. It returned provider_network_rules=["inherit"] and backend_constructed=true. The core provider explicitly withholds restricted-network capabilities for that configuration, but this path forwards the policy directly. On an unenforced deployment, evaluated programs lack the required barrier against peer state and Gym/provider control endpoints. I did not test actual deployment filtering.

Could you consult the resolved provider's effective network capabilities and reject a production scoring configuration without restricted-network support before allocating a sandbox? Keep the SDK-preservation check, lifecycle exec, absence of exposed MCP ports, and explicit development transports. This restores fail-closed isolation configuration rather than treating a serialized policy as enforcement.

Acceptance: missing/false enforcement declarations must fail before allocation; a supported configuration must preserve the exact policy and healthy host-proxied tool calls. Before closing the original isolation requirement, supply the documented concurrent A/B private-marker test on the deployment, covering direct IPv4/IPv6 peer access, Gym/provider control endpoints and policy tampering, with working host-proxy and required-service positive controls. Configuration validation alone does not demonstrate that boundary.

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.

Addressed in c04ca467: the scale_live backend now reads the resolved provider's effective capabilities and refuses a non-development OpenSandbox configuration whose deployment does not declare networking.enforces_network_policy: true, before any sandbox is allocated. The SDK-preservation check, lifecycle exec, absence of exposed ports and the explicit development transports are unchanged; with the declaration the policy is passed through exactly. Test: test_opensandbox_scoring_requires_a_deployment_that_declares_network_enforcement (missing, empty and false declarations fail before the pool is created). The concurrent A/B private-marker test on a deployment is still outstanding and stays listed in the description as an open gate, so I am leaving this thread open.

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.

Ran the concurrent A/B private-marker test on a live OpenSandbox deployment at c04ca467, twice, with the pinned ghcr.io/scaleapi/mcp-atlas:1.2.7 image and the scoring policy (default deny, the two PyPI bootstrap hosts allowed). Two sandboxes were started through the server's own SandboxPool at the same time. B (calculator, filesystem) held a random marker written over the host proxy. All probes ran as programs inside A through mcp-code-executor_execute_code, the model-reachable path.

Probe from A Result
B's address, every port B listens on (MCP 1984, DNS proxy, egress sidecar, exec daemon) all time out
Provider management API, by name and by literal address name does not resolve; literal address times out
Cluster API no service env, no service-account token mounted, name does not resolve
Instance metadata 169.254.169.254 times out
Non-allowlisted host by name does not resolve
Non-allowlisted literal IPv4 on 80, 443, 853 time out
Port 53 to any address connects, but to the sandbox's own DNS proxy: an unroutable test address 192.0.2.1 "connects" the same way, and over TCP and UDP the proxy answers the allowlisted name and returns NXDOMAIN for others
Allowlisted host (positive control) HTTP 200, before and after tampering
Tampering: iptables/ip6tables/nft flush binaries absent; the process is uid 0 without CAP_NET_ADMIN
Tampering: appending a public resolver to /etc/resolv.conf written, no effect: other names still fail, literal addresses still time out
Tampering: egress sidecar's local API /policy answers 401 without credentials

Host proxy afterwards: calculator_calculate returns 200 with the right answer in both A and B, and B's marker reads back unchanged. Both sandboxes stopped cleanly.

Not covered, so you can judge what remains: the deployment's pods have no IPv6 addresses, so IPv6 peer access could not be exercised (a literal IPv6 connect fails with no route); Gym's own servers ran outside the sandbox network, so they are covered only by the literal-address denials rather than a dedicated listener; I did not try to guess the sidecar's credentials; and this is one deployment at one point in time with a two-host allowlist. The server now refuses scoring unless the deployment declares enforcement, as described above. Leaving the thread open for you to close.

jonathanlli and others added 2 commits December 1, 2026 11:57
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: Jonathan Li <[email protected]>
…olicy enforcement

A default-deny policy that the SDK preserves is a request, not enforcement.
The scale_live backend now consults the resolved provider's effective
capabilities and refuses a non-development OpenSandbox configuration whose
deployment does not declare networking.enforces_network_policy, before any
sandbox is allocated. Explicit development mode keeps the transport usable
for runs that must not produce scores; a declared deployment passes the
same policy through unchanged.

Also add the selection fields main now requires to the benchmark manifest
(maintainers, capabilities, domains, requirements, primary_metric).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: Jonathan Li <[email protected]>
@jonathanlli

Copy link
Copy Markdown
Contributor

/ok to test c04ca46

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

The reverify part looks good to me. It now forwards one mcp_atlas_environment record instead of the generic names, which settles Hemil's point, and the reverification and MCP-Atlas tests pass locally.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/46754254242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers benchmark-onboarding Self-contained benchmark onboarding feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer Nemotron Work related to NVIDIA Nemotron risk:high Autobot PR risk: high 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.

8 participants