fix(sandbox): name the generic warm pool on the claim, don't say "default" - #5846
Merged
Conversation
…ault"
A claim that wants no tenant pool set `spec.warmpool: "default"`. No
SandboxWarmPool is named that — the sandbox-env chart names the generic pool
after the SandboxTemplate — so the operator fell back to binding any warm pod
rendered from that template. With one pool that was invisible. With tenant
pools it hands one org's prewarmed pod, repo already cloned, to another org's
claim, and the daemon rejects the mismatched workload:
sandbox daemon /_sandbox/config returned 409: {"error":"immutable: cloneUrl"}
Every non-tenant sandbox failed to start; tenant ones worked because their
claims name their pool and the repo matches. Confirmed in prod 2026-08-07 from
the operator's own bind log: claims for montecarlo, gabriel, and `ephemeral-*`
dispatches all bound `tenant-electrolux-prod-*` pods.
Pass the SandboxTemplate name (which is the generic pool's name) instead.
pedrofrxncx
force-pushed
the
fix/generic-warm-pool-name
branch
from
August 7, 2026 11:42
f019356 to
83d9896
Compare
decocms Bot
pushed a commit
that referenced
this pull request
Aug 7, 2026
PR: #5846 fix(sandbox): name the generic warm pool on the claim, don't say "default" Bump type: patch - @decocms/sandbox (packages/sandbox/package.json): 1.44.2 -> 1.44.3 - deploy/helm/sandbox-env (chart 0.12.7) (deploy/helm/sandbox-env/values.yaml deploy/helm/sandbox-env/Chart.yaml): image.tag/appVersion -> 1.44.3 Deploy-Scope: both
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.
Every new non-tenant sandbox has been failing to start with:
Cause
A claim that resolves no tenant pool sets
spec.warmpool: "default". No SandboxWarmPool is named that — the sandbox-env chart names the generic pool after the SandboxTemplate (studio-sandbox-prod). The operator falls back to binding any warm pod rendered from the same template, which since #5830 includes the tenant pools.So a montecarlo claim binds a
tenant-electrolux-prod-*pod that is already prewarmed with electrolux's repo. Studio posts its own workload, the daemon sees a differentcloneUrlon a config it already holds, and returns 409. Tenant claims are fine: they name their pool and the repo matches by construction.Confirmed in prod (2026-08-07) from the operator's own bind log — claims bound to pods from both pools over their lifetime:
This is also a tenant-isolation leak, not only an availability bug: another org's pod (with its repo checked out) was handed to an unrelated claim. The 409 is what stopped it from being used.
Fix
Pass the real generic pool name —
this.sandboxTemplateName, the same value the chart derives the pool name from — instead of the literal"default".Testing
bun test packages/sandbox/server/provider/agent-sandbox/tenant-pools.test.ts— 20 pass; the "falls back todefault" case is inverted to assert the explicit name.spec.warmpoolshould readstudio-sandbox-prodafter deploy, and generic claims should stop bindingtenant-*pods.Summary by cubic
Fixes non-tenant sandbox startups by naming the real generic warm pool on claims instead of "default," preventing accidental binding to tenant pods and 409 cloneUrl errors. Restores availability and preserves tenant isolation.
claimWarmPoolNamenow acceptsgenericPoolNameand returns it in warm-pool mode when no tenant pool;runner.tspassesthis.sandboxTemplateName."none"when warm-pool mode is off.Written for commit 83d9896. Summary will update on new commits.