chore(sandbox): drop the ts/go daemon switch, Go is the only implementation - #5569
Conversation
There was a problem hiding this comment.
2 issues found across 18 files
You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="deploy/helm/sandbox-env/values.yaml">
<violation number="1" location="deploy/helm/sandbox-env/values.yaml:44">
P2: The documented kind deployment still runs the TS daemon because its overlay and reload script explicitly select the bare `studio-sandbox` image, so this Go-only default is not applied to local validation. Updating the kind overlay/build command to use `studio-sandbox-go` and the Dockerfile's `go` target would keep the supported environment consistent.</violation>
<violation number="2" location="deploy/helm/sandbox-env/values.yaml:44">
P1: A chart release can now point at a missing Go image because the sandbox image release gate checks only the legacy TS repository before skipping both builds. Checking the Go manifest as well, or building/publishing the Go image independently when its tag is missing, would prevent production pods from becoming unpullable.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| goRepository: ghcr.io/decocms/studio/studio-sandbox-go | ||
| # The Go sandbox daemon. The daemon implementation IS the image — there is no | ||
| # runtime switch, so a pod cannot disagree with the template that created it. | ||
| repository: ghcr.io/decocms/studio/studio-sandbox-go |
There was a problem hiding this comment.
P1: A chart release can now point at a missing Go image because the sandbox image release gate checks only the legacy TS repository before skipping both builds. Checking the Go manifest as well, or building/publishing the Go image independently when its tag is missing, would prevent production pods from becoming unpullable.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At deploy/helm/sandbox-env/values.yaml, line 44:
<comment>A chart release can now point at a missing Go image because the sandbox image release gate checks only the legacy TS repository before skipping both builds. Checking the Go manifest as well, or building/publishing the Go image independently when its tag is missing, would prevent production pods from becoming unpullable.</comment>
<file context>
@@ -39,10 +39,9 @@ envName: ""
- goRepository: ghcr.io/decocms/studio/studio-sandbox-go
+ # The Go sandbox daemon. The daemon implementation IS the image — there is no
+ # runtime switch, so a pod cannot disagree with the template that created it.
+ repository: ghcr.io/decocms/studio/studio-sandbox-go
# Pinned to a specific version so chart upgrades pull a matching image
# instead of silently moving with `:latest`. Bump in lockstep with
</file context>
| goRepository: ghcr.io/decocms/studio/studio-sandbox-go | ||
| # The Go sandbox daemon. The daemon implementation IS the image — there is no | ||
| # runtime switch, so a pod cannot disagree with the template that created it. | ||
| repository: ghcr.io/decocms/studio/studio-sandbox-go |
There was a problem hiding this comment.
P2: The documented kind deployment still runs the TS daemon because its overlay and reload script explicitly select the bare studio-sandbox image, so this Go-only default is not applied to local validation. Updating the kind overlay/build command to use studio-sandbox-go and the Dockerfile's go target would keep the supported environment consistent.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At deploy/helm/sandbox-env/values.yaml, line 44:
<comment>The documented kind deployment still runs the TS daemon because its overlay and reload script explicitly select the bare `studio-sandbox` image, so this Go-only default is not applied to local validation. Updating the kind overlay/build command to use `studio-sandbox-go` and the Dockerfile's `go` target would keep the supported environment consistent.</comment>
<file context>
@@ -39,10 +39,9 @@ envName: ""
- goRepository: ghcr.io/decocms/studio/studio-sandbox-go
+ # The Go sandbox daemon. The daemon implementation IS the image — there is no
+ # runtime switch, so a pod cannot disagree with the template that created it.
+ repository: ghcr.io/decocms/studio/studio-sandbox-go
# Pinned to a specific version so chart upgrades pull a matching image
# instead of silently moving with `:latest`. Bump in lockstep with
</file context>
PR: #5569 chore(sandbox): drop the ts/go daemon switch, Go is the only implementation Bump type: patch - decocms (apps/api/package.json): 4.160.0 -> 4.160.1 - @decocms/native (apps/native/package.json): 4.160.0 -> 4.160.1 - @decocms/sandbox (packages/sandbox/package.json): 1.35.1 -> 1.35.2 - @decocms/shared (packages/shared/package.json): 0.13.0 -> 0.13.1 - deploy/helm/sandbox-env (chart 0.10.1) (deploy/helm/sandbox-env/values.yaml deploy/helm/sandbox-env/Chart.yaml): image.tag/appVersion -> 1.35.2 Deploy-Scope: server
The Go daemon has been the implementation every sandbox claims since #5484/ #5569; the TS daemon was still building, still shipping in a second image and still claiming half the docs. Delete it (~24k lines) and keep only what is not the daemon: - `daemon-e2e/` — the black-box HTTP/SSE conformance suite, moved out of the implementation it used to live inside. Its default target is now `daemon-go/bin/daemon` instead of the TS bundle; `DAEMON_E2E_CMD` still swaps in any other binary. - `orgfs/` — the org-fs client/WebDAV plus the privileged mounter sidecar, which is its own image and stays TypeScript. Dead `detachMount` (the sync twin, only reachable from the deleted daemon's exit hook) removed with it. - `daemon-protocol.ts` — the config + SSE wire types Studio's daemon client and web UI consume, previously reached into the daemon source. One image, one daemon: the Dockerfile's `ts`/`go` targets collapse into a single stage and `studio-sandbox-go` is the only image published — the `studio-sandbox` name is frozen at 1.35.3 (its last TS tag) and stays pullable for rollback. The image also drops the node-pty install that existed only because the TS bundle marked it external. CI: the two daemon-e2e jobs become one (Go, keeping the `daemon-e2e` job name), docker-smoke builds and boots one image, and daemon-e2e-windows.yml — a gate on a subtree that no longer exists — is deleted. Docs say Go: sandbox README rewritten (it still described the Bun daemon and the removed desktop link), a README for daemon-go, CONTRIBUTING rule #4 and AGENTS gotcha #8 rewritten, and every `packages/sandbox/daemon/...` pointer in the Rust local-api parity comments repointed at its Go or daemon-e2e successor. Co-authored-by: Pedro França <pedrofrxncx@deco.cx>
Summary
Teardown #1 of the Go rollout scaffolding, on top of #5568 (now merged — Go is the default).
Once Go is the only daemon, every lever that let a sandbox be TS is dead weight. Removed end to end:
apps/api/src/sandbox/resolve-daemon-impl.ts(+test)sandbox_go_daemoninOrgFlagsSchemaSANDBOX_START'sdaemonImplinputSandboxDaemonImpl/sandboxDaemonImplSchema/EnsureOptions.daemonImplresolveClaimTemplate+claim-template.test.tsreadClaimDaemonImpl,LABEL_KEYS.daemonImplstudio.decocms.com/daemon-impllabelSTUDIO_SANDBOX_GO_TEMPLATE_NAME/goSandboxTemplateNamedaemonImpl,goTemplate.*,image.goRepositoryimage.repositorynow points atstudio-sandbox-goand the chart renders one SandboxTemplate and one SandboxWarmPool again — back to the pre-canary shape, with the other binary.Two things reviewers should push on
1. The
daemon_implmetric attribute is gone. It was the Go-vs-TS comparison dimension on every sandbox metric (tenantAttrs), plus the matching pod label. With one implementation it's a constant, but any Grafana panel filtering or splitting ondaemon_implbreaks on deploy — those filters need removing. I did not touch dashboards; flagging rather than silently leaving a constant dimension.2. Deploy order is load-bearing. This deletes
studio-sandbox-<env>-goand flips the surviving template's image TS→Go (which rolls the warm pool). The API must ship first — it's the side that stops naming the-gotemplate. Sync the chart before the API and in-flight claims reference a template that no longer exists. Chart 0.9.67 → 0.10.0, with the hazard written into the Chart.yaml upgrade note.The matching CD change (drop
goTemplate, collapse back to one KEDA ScaledObject, dropSTUDIO_SANDBOX_GO_TEMPLATE_NAME) is a follow-up indecocms/deco-apps-cdand must sync after this deploys.Testing
bun test apps/api/src/sandbox apps/api/src/tools/sandbox packages/sandbox/server— 267 pass. Deleted the threeSANDBOX_STARTdaemon-impl cases and the wholeclaim-template.test.ts(its only subject was the removed function); dropped the now-unusedorgFlagsknob from theSANDBOX_STARTtest harness.helm template+helm lintonsandbox-env: one SandboxTemplate, one SandboxWarmPool, imagestudio-sandbox-go, 0 failures.bun run --cwd <ws> checkclean forapps/api,packages/sandbox,packages/shared.knipclean — no orphans left behind.bun run check:readmesfails on a missingapps/mesh/package.json(fails onmaintoo), andapps/webhas ~20react-resizable-panelstype errors from dependency drift.Next in the series
Separate PRs, each revertable on its own: remove the desktop link feature, then delete
packages/sandbox/daemon(extracting the org-fs sidecar and the Go conformance suite first).Summary by cubic
Make Go the only sandbox daemon and remove the TS/Go switch across Studio and the Helm chart. The chart now renders one template and warm pool using
studio-sandbox-go, and metrics no longer includedaemon_impl.Refactors
daemonImplfromSANDBOX_START, thesandbox_go_daemonorg flag, and the claim label/resolve logic.SandboxDaemonImpltypes and related tests.image.repositorypoints tostudio-sandbox-go.daemon_implmetric/label from runner and tenant attrs.Migration
daemon_impl.-gotemplate), then syncdeploy/helm/sandbox-env0.10.0; this flips the default image and deletesstudio-sandbox-<env>-go.decocms/deco-apps-cd: collapse back to one KEDA ScaledObject and dropSTUDIO_SANDBOX_GO_TEMPLATE_NAMEafter this deploy.Written for commit 0d051ef. Summary will update on new commits.