Repository navigation
fix(sdk): let apply replace or remove sandboxes as planned - #13434
Merged
Merged
Conversation
The SDK refused any authored change that would replace or remove a bound sandbox before planning. That guard predates sandboxes becoming replaceable and contradicted the documented change paths. OpenTofu now plans such changes like any other, with the existing data-loss warning.
cv
enabled auto-merge (squash)
October 18, 2026 23:53
Contributor
cv
added a commit
that referenced
this pull request
Oct 19, 2026
## Failure The ARM64 vLLM runtime (`runtimes/vllm`) built on an upstream `vllm/vllm-openai` image published under the tag `qwen38-flash-next`, which isn't a vLLM release. Whether it served the GTC DC templates' model, Nemotron 3 Super 120B NVFP4, was untested. The GTC DC README called all nine templates "planned configurations", and still said apply fails an agent health check that no longer exists. ## Decision - **The runtime base** is the vLLM v0.32.0 release (today's latest), pinned by its multi-platform digest. `runtimes/qwen38` keeps its own base, built for that model. - **The GTC DC README** records results from a DGX Spark run of the Spark templates, and drops the stale health-check sentence. The three Spark templates' headers say what was verified. - **Not changed:** the AMD64 runtime (`runtimes/vllm-amd64`, vLLM 0.27.1), because it can't be verified on AMD64 GPU hardware here. ## Validation On a DGX Spark, with this runtime image and agent images built from `v1`, plus #13434 and #13435: - **Model service:** the Hermes template applied in about 72 minutes, mostly a 74.8 GiB download at about 20 MiB/s and a 15-minute load. vLLM v0.32.0 used FlashInfer's NVFP4 kernels on the GB10. Requests without the key were refused with `401`, and requests with it succeeded. - **Hermes:** a short answer in 4 seconds once warm; a terminal tool call returned the exact hash in 17 seconds; a five-point itinerary in 14.5 seconds, within the 1,024-token limit. - **Deep Agents:** switching the deployment's harness replaced only the sandbox, in 28 seconds, while the model kept serving. Short answers took 5–6 seconds, the itinerary 18 seconds, and a write-then-read file task with three tool calls 29 seconds, returning the file's contents. - **OpenClaw:** agent start fails, as tracked in #13372. Inside the sandbox, `setpriv` reports "initgroups failed: Operation not permitted" (NVIDIA/NeMo-Fabric#430). - **Destroy** took 9 seconds and kept the model cache, gateway storage and credentials. The run found two bugs, fixed separately: - **#13434:** the SDK refused harness and image changes that should replace the sandbox. - **#13435:** services with host IPC planned a replacement on every reapply. `cargo ci` passes locally: 1,598 unit tests and 149 lifecycle tests.
cv
added a commit
that referenced
this pull request
Oct 19, 2026
## Failure The live Kind suite exceeded its 270-second wall budget on #13434 (279 s), although all 7 tests passed. The four cluster tests ran one at a time, so their durations added up. A run that recorded the cluster's events showed where the time went. In each of the three tests that deploy a sandbox, about 31 seconds pass between Kubernetes stopping the sandbox's `agent` and `supervisor` containers and the next destroy step. That's the default 30-second termination grace period expiring, because those OpenShell containers don't exit on `SIGTERM`. That's about 95 of 231 seconds locally. ## Decision Keep every check, and stop paying those waits one after another: - **Side by side:** the live Kind profile runs up to four tests at once. Each cluster test already uses its own namespace, Helm release, issuer namespace and local ports, and after a run the cluster holds no per-test cluster-wide objects. - **The registry test runs alone** (`threads-required = "num-test-threads"`). It seeds its private registry by tagging, pushing and untagging the node's shared agent image. In the first side-by-side attempt, the OIDC test's sandbox failed to pull that image (`ErrImagePull … failed to resolve reference`) while the registry test ran. Not changed: the grace period itself. Shortening it from NemoClaw would work around OpenShell's signal handling, and force-deleting pods in tests would stop testing the real destroy path. ## Validation `cargo ci live-kind` locally: all 7 tests pass, in 175.6 s of wall time, down from 231 s run one at a time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failure
nemoclaw applyrefused any authored change that would replace or remove a bound sandbox, before planning:This covered a different harness adapter, sandbox image or network policy, and removing a sandbox from the configuration. The guard (
State::validate_bound_sandboxes, added in September) predates #13375, which made sandboxes replaceable. It contradicted:docs/usage.mdsays a harness, image or driver configuration change "replaces the sandbox" and removing a sandbox "deletes it".Only changes to an agent's configuration got through, because they live in a separate target. It surfaced while switching the harness of a running DGX Spark deployment.
Decision
Remove the guard, its error variant and the CLI help text for it. OpenTofu plans the replacement or deletion like any other change, and the existing plan output warns that it "deletes sandbox files and conversation history". Files that must outlive a sandbox belong on mounted volumes (#13425). The unrelated check that keeps an unfinished creation's configuration stays.
Validation
sandbox_admission): removing, re-imaging or re-policing a bound sandbox reaches planning without changing intent or state. It failed before the change with the refusal error.fabric_deployment: an adapter change applies, replacing the sandbox, and changing it back replaces it again.remote_service: a replacement whose new images fail their checks stops before any change, keeping intent and state. It's renamed from "refused" to "failed".shared_service): removing one consumer now deletes only that sandbox, leaving the shared model service and the other consumer untouched, and re-adding it creates a new sandbox. It's ignored by default and wasn't run here.cargo cipasses locally: 1,598 unit tests and 149 lifecycle tests.