Repository navigation
feat(config): let managed gateways allow sandbox driver configuration - #13425
Merged
Merged
Conversation
Sandboxes can declare driverConfig, such as mounted volumes, but every NemoClaw-managed gateway kept OpenShell's default and rejected it. spec.gateway.sandboxDriverConfig passes allow_driver_config and resource_admission through: into gateway.toml for Docker and Podman, where it is fixed with the gateway's retained storage, and into the chart's server.drivers.kubernetes values for Kubernetes.
cv
enabled auto-merge (squash)
October 18, 2026 15:46
Contributor
cv
added a commit
that referenced
this pull request
Oct 18, 2026
…y fails (#13426) Part of #12692. ## Failure `kubernetes_live::oidc::a_managed_gateway_accepts_an_existing_issuers_tokens_and_refuses_another_audience` failed once in CI (linux_amd64, on #13425). It passed on rerun, on `v1` at the same base, and locally on ARM64. The log held only the SDK's summary, `Apply incomplete / observation query failed`, so there was no way to tell why. The obvious guess was that the gateway started before the issuer's CA ConfigMap existed. The pinned chart rules that out: it mounts the ConfigMap as a required volume, so the gateway pod waits for it. ## Decision Diagnose rather than guess. When the test's apply fails, it now prints the deployment namespace's: - pods, with each container's readiness, restarts and waiting or terminated state; - 15 most recent events; - last 40 log lines of each container. Then it fails with the same message as before. Test-only; production code is unchanged. ## Validation - `cargo ci` passes locally: 1,598 unit tests and 149 lifecycle tests. - `cargo ci live-kind` passes locally: all 7 tests. The diagnostics only run on failure.
cv
added a commit
that referenced
this pull request
Oct 19, 2026
## Failure `nemoclaw apply` refused any authored change that would replace or remove a bound sandbox, before planning: > apply cannot replace sandbox 'assistant'; its files and conversation history are not separately retained 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: - **#13375's design:** a change that needs a new sandbox replaces it, and the plan shows it. - **The docs:** the change-path table in `docs/usage.md` says a harness, image or driver configuration change "replaces the sandbox" and removing a sandbox "deletes it". - **Hand-written HCL,** which replaces sandboxes normally. 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 - **Rewritten SDK test (`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. - **Lifecycle tests:** - **`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". - **The live shared-service test (`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 ci` passes locally: 1,598 unit tests and 149 lifecycle tests.
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.
Closes #12639 under its narrowed documentation scope.
Failure
A sandbox can declare
driverConfig, for example to mount volumes that outlive it (#13304, #13402). The docs on keeping agent files on mounted volumes (#13410) said the gateway must allow driver configuration, but no NemoClaw-managed gateway could. Every gateway NemoClaw installs kept OpenShell's default,allow_driver_config = false, and rejected the sandbox. So the mounted-volume path worked only with external gateways, and the docs said that retention through a sandbox replacement had not been qualified.Decision
spec.gateway.sandboxDriverConfig: for managed gateways, withallow(defaultfalse) and an optionalresourceAdmission(enabled,requiredLabels), passed through to OpenShell unchanged.gateway.tomldriver section. The file lives in the gateway's retained storage, so the setting is fixed when the deployment is created, as with the other settings stored there. Without the setting, the file is unchanged byte for byte, so existing gateways still match.server.drivers.kubernetesvalues, which Helm applies in place.sandbox_driver_configattribute, following theimage_pull_policypattern.requiredLabelsmap is rejected before apply. OpenShell refuses it at gateway start, and on Docker or Podman the value would already be fixed in storage.Validation
gateway.tomlcontents, with and without the setting;requiredLabelsrejected;cargo cipasses locally: 1,597 unit tests and 149 lifecycle tests. The docs check reports 0 errors.sandboxDriverConfig.allow: truemounted two volumes carrying OpenShell's default admission labels./sandbox/workspaceand/sandbox/artifacts.openshell_sandboxdelete/create; new container).