Skip to main content

Runbook: sandbox-launcher (compose profile)

Stage 2 S1, core#4632 (implements #4598; tracker #4630). Founder ruling 4: the launcher is the only component on the compose profile that creates containers. Contract: proto/upsquad/sandbox/v1/launcher.proto; workspace model: ADR-0037. Kubernetes has no launcher service (S6, #4637).

1. What it is​

One process (cmd/sandbox-launcher, image upsquad-sandbox-launcher) that holds the Docker socket, git, a workspace root it owns and an in-memory session/lease table, and serves one API (upsquad.sandbox.v1.LauncherService) to one caller (the agent-orchestrator). It launches only through the tested argv (internal/workflow/sandbox buildDockerArgsOpts / buildServeDockerArgsOpts): runtime and network from its own config, cap-drop ALL, uid 65534, read-only root, no-new-privileges, cgroup caps, --pull never. No request field names a mount, flag, network, runtime, user or container name.

RPCDoesRefuses (Connect code, identity)
GetRuntimethe configured runtime (verified against docker info at start)—
Launchbatch run under <root>/batch/, bounded server-side by wall_seconds and the disk pollinvalid_argument: non-positive or above-ceiling limit, tag-only / unlisted image, grammar; failed_precondition: image not present locally; resource_exhausted: session ceiling
StartServeddetached session sbx-sess-<id>; /work = acquired workspace (:rw/:ro) or scratch tmpfs; /tmp = disk-backed scratch <root>/scratch/<id> (exec); relay secret as -e UPSQUAD_RELAY_SECRET (name only on argv); hard-TTL timer + disk poll (/work+/tmp vs disk_mib)as Launch, plus hard_ttl_seconds ≤ 0 or above the wall ceiling, lease TTL above ceiling, dotless / IP / platform-tier egress_grant entry; not_found / permission_denied / already_exists for the workspace
ProbeServedcurl container (capped, --pull never) dials the endpoint the launcher issuednot_found unknown session; permission_denied org/run mismatch
StopServeddocker rm -f by the derived name; workspace kept (fresh unmounted lease); idempotentpermission_denied
RenewLeaselease_until = now + TTLnot_found = already reaped
AcquireWorkspacework tree <root>/ws/<id>/tree (the only part mounted at /work) and git directory <root>/ws/<id>/git (launcher-only — the git directory never enters the sandbox mount); git --git-dir … init + fetch --depth 1 <url> <ref> + checkout --detach; no remote is ever written, no .git pointer in the treefailed_precondition: expired credential, unknown host, clone failed; invalid_argument: grammar, unset expiry; resource_exhausted: tree > max_bytes; internal: credential residue
ReleaseWorkspacemarks the workspace releasing (no new mount), stops any mounting session, git --git-dir=<launcher git dir> --work-tree=<tree> -c core.fsmonitor=false -c core.untrackedCache=false status --porcelain --untracked-files=all --ignored=matching --ignore-submodules=all (every git call bounded by GitCallTimeout, 300 s) → changed_paths (nothing the sandbox wrote supplies config, index or refs; ignored files are reported). A gitlink path is reported changed unless it is still the empty directory the checkout left; a list of exactly 10000 entries is truncated (dirty is true). Deletes tree and git dir. Repeat calls never read clean: only the call that examined the tree returns a list; a second call is not_found (unknown workspace_id) once the workspace is gone, and aborted (still being acquired or released; retry) while another call is still releasing it. A StartServed whose session was ended by a release during its docker run -d removes the new container and fails abortedpermission_denied; not_found (unknown or already released/reaped: treat as dirty unless this caller holds the earlier answer); aborted (release in progress: retry); internal (could not determine what the sandbox changed): the status failed, timed out or wrote a warning to stderr (only stdout is parsed) — the workspace is still deleted; treat it as dirty

Ids are launcher-issued 128-bit hex. The (MaxSessions+1)th live sandbox (served or batch) is refused, never queued.

2. Caller authentication​

Per request, the orchestrator mints an RS256 JWT with the platform signing key (oauth.RS256SandboxLauncherMinter): iss = PLATFORM_ISSUER, sub = agent-orchestrator, aud = oauth.SandboxLauncherAudienceURI(MCP_GATEWAY_PUBLIC_BASE_URL) (…/sandbox-launcher), exp − iat = 60 s, a 128-bit jti, rpc = the Connect procedure, and the binding: org_id+run_id (Launch, StartServed, AcquireWorkspace — must equal the body), sandbox_session_id (Probe, Stop, Renew) or workspace_id (Release). The launcher (launcherauth) verifies against a static public key file: RS256 only, kid, iss, single exact aud, sub, iat not in the future, not expired, exp − iat ≤ 60 s, jti single use (registry full ⇒ refuse), rpc, binding; id-keyed calls also check the org/run claims against the launcher's own record. Every refusal is unauthenticated, logged as sandbox_launcher_authn_refused with peer, procedure, reason and the claimed aud/sub — never the token — and counted in sandbox_launcher_authn_failures_total{reason}.

Refusals to start: the caller key file holds private key material, is not RSA ≥ 2048, or DISABLE_AUTH/ICS_MODE is set. The orchestrator refuses SANDBOX_SUBSTRATE=remote without the platform signing key.

Stated residual: the jti registry is in memory; after a launcher restart a token captured in its last 60 s can be replayed once, for the exact call it was minted for.

2a. Server authentication: TLS with a pinned key (core#4637)​

The caller token authenticates the orchestrator. AcquireWorkspace carries the SCM clone token, so the orchestrator must also authenticate the launcher (backend-security S-Q3).

SideSettingRule
launcherSANDBOX_LAUNCHER_TLS_CERT_FILE + SANDBOX_LAUNCHER_TLS_KEY_FILEBoth or neither. When set, the launcher serves TLS 1.3 only, and -healthcheck pins its own certificate.
launcherSANDBOX_LAUNCHER_REQUIRE_TLS=true, or running in a pod (KUBERNETES_SERVICE_HOST)Without a key, the launcher refuses to start.
orchestratorSANDBOX_LAUNCHER_TLS_PINS=sha256/<base64>,sha256/<base64>The current and the next key, for rotation. These pins are the only server authentication: no system roots, no hostname trust. A malformed entry is a boot failure.
orchestratorSANDBOX_LAUNCHER_REQUIRE_TLS=true, or running in a podAn http:// SANDBOX_LAUNCHER_ADDR is refused at startup. So is an https:// address with no pins. Both are fatal, never "launcher unreachable".

Compute a pin from the certificate:

openssl x509 -in launcher.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | base64

Prefix the result with sha256/.

The compose profile still serves plaintext. That is #4647 item 1, which stays open until TLS is proven on the customer-install profile.

3. Enable on the dev box​

Prerequisites: the sandbox stack up with the platform overlay (docker compose -f docker-compose.sandbox.dev.yml -f docker-compose.sandbox.platform.yml up -d), and the platform signing key's PUBLIC half on the host (as root, once):

sudo install -d -m 0755 /opt/upsquad-secrets/platform-issuer-public
sudo openssl pkey -in /opt/upsquad-secrets/platform-issuer/platform-signing-key.pem -pubout \
-out /opt/upsquad-secrets/platform-issuer-public/platform-signing-key.pub.pem
sudo chmod 0644 /opt/upsquad-secrets/platform-issuer-public/platform-signing-key.pub.pem

(SANDBOX_LAUNCHER_CALLER_PUBLIC_KEY_HOST_FILE overrides the path. Re-derive after every gen-platform-signing-key.sh --rotate.)

No root on the box? Put the PUBLIC key anywhere the deploy user can read (for example, derived from the context engine's JWKS for the active kid) and set SANDBOX_LAUNCHER_CALLER_PUBLIC_KEY_HOST_FILE=<that path> in the box .env. The dev box does this: the key is at /opt/upsquad/dev-secrets/platform-issuer-public/platform-signing-key.pub.pem (kid dev-platform-20261023-094112, 2026-11-23). The key file and every parent directory must be writable only by principals that are already root-equivalent: whoever can replace the key chooses who the launcher trusts. On the dev box, /opt/upsquad/dev-secrets is group dev, whose members are docker-group members and so root-equivalent already. The reconcile takes the key's host path from compose's own render of the launcher's bind (docker compose --profile sandbox config), so the .env is read exactly as compose reads it.

The reconcile checks this file before anything sandbox starts. It must exist, be a regular readable file, and hold exactly one PUBLIC KEY block and no private material. Otherwise the run starts nothing sandbox and exits 5 with a sandbox: caller public key … line. The compose bind is long syntax with create_host_path: false, so a missing key is refused rather than created. A short-syntax bind used to make docker create a root-owned directory at the path, which then crash-looped the launcher; if one exists, remove it as root. On a box where upsquad-sandbox-dev_sbx-internal does not exist yet, a missing key also means the dev up exits 1, not 5. The preflight runs before the sandbox stack would have created that network, and the dev stack's preview-router needs it (the exit-5 caveat in the reconciler header).

Box .env: WF_CODE_EXEC_ENABLED=true (COMPOSE_PROFILES=sandbox is no longer needed in the box .env: the reconcile adds the profile itself, §3a), DOCKER_GID=$(stat -c %g /var/run/docker.sock). Then the reconciler (or docker compose -f docker-compose.dev.yml pull && up -d) brings up sandbox-launcher-init (creates /var/lib/upsquad/sandbox-work, chown 65534, 0700) and sandbox-launcher.

Images are never pulled by the launcher. Every digest in dev/sandbox/launcher-images.txt has a pull-only sandbox-image-* entry in docker-compose.dev.yml (replicas 0) so the dev-deploy job's docker compose pull fetches it under its ephemeral token (the coder image is a private GHCR package; the box holds no registry credential). An allowlisted digest that is not local is refused failed_precondition (ErrImageNotPresent). Adding an image = one line in the allowlist + one pull-only entry (scripts/check-sandbox-launcher-compose.py S8 asserts the two agree), then docker kill -s HUP upsquad-sandbox-launcher reloads the allowlist.

3a. Dev roll (S6 follow-ups, core#4637)​

The dev deploy reconciles the sandbox. scripts/dev-reconcile.sh (run by .github/workflows/dev-deploy.yml after every main image publish, and every 15 minutes) reads the CHECKED-IN flag dev/sandbox/reconcile.flag (enabled for dev). The one-run override is the sandbox input of a workflow_dispatch (flag | 1 | 0); a box-local edit of the flag is reverted by the job's git reset --hard origin/main, so the input is the only override. When enabled it:

  1. brings the sandbox stack up as project upsquad-sandbox-dev (docker-compose.sandbox.dev.yml + docker-compose.sandbox.platform.yml), so sbx-internal exists on the literal 10.247.0.0/24 with the proxy at 10.247.0.10;
  2. re-attaches upsquad-preview-router to sbx-internal if it is not on it;
  3. only then reconciles the dev stack with sandbox added to COMPOSE_PROFILES (the box's own profiles are kept): sandbox-launcher, coder-relay-forwarder and the pull-only sandbox images, all pulled from GHCR under the job's ephemeral token. Nothing is built on the box.

The worker coder overlay has its own checked-in flag (Stage 2 S5 acceptance, core#4636). dev/sandbox/coder-overlay.flag (enabled for dev; disabled or a missing file means off) makes the reconcile add -f docker-compose.sandbox.coder.yml to every dev-stack compose call: the pull, the up -d, the per-service rollback up -d --no-deps, ps, the service enumeration and the rendered-config hash. The worker then joins coder-relay-ctl (alias agent-worker-control, CODER_RELAY_FORWARDER=10.247.3.2:9481), and the next reconcile keeps it there instead of undoing a hand-applied overlay. It fails closed on the sandbox: the overlay is applied only in a run that also applies the sandbox profile (the forwarder is a sandbox-profile service); with the sandbox flag off, misconfigured or failed, the reconcile logs one coder-overlay: line and leaves it off. There is no dispatch override; flipping it is a PR. Dev only: beyond dev it is gated by prod-enablement #4647. It never removes a network. If the sandbox step fails while sbx-internal EXISTS, the dev stack is reconciled without the sandbox profile and the run exits 5. If sbx-internal is ABSENT, nothing rolls: the dev stack's preview-router declares it external, so the dev up -d itself fails (exit 1) until the sandbox stack has created it. The reconcile logs exactly that. On a first boot (no dev network yet) it brings the sandbox stack up WITHOUT the platform overlay so the cycle breaks, and applies the profile on the next run. If sbx-internal still has the pre-S6 dynamic subnet, the sandbox step refuses and names it.

The one-time operator step (the coordinator runs it once per box), atomic. Between network rm and the next successful sandbox up, NOTHING on the dev stack can roll (the preview router needs the network). So pre-check, remove, and dispatch the deploy immediately — never on the cron, and never while a smoke holds the subnet:

cd /opt/upsquad/upsquad-core
# 0. pre-checks: no sandbox/smoke container, no other 10.247.0.0/24 network
docker ps -a --format '{{.Names}}' | grep -E '^sbx-|sbx-smoke' && echo "STOP: a sandbox or smoke container exists"
for n in $(docker network ls -q); do
docker network inspect -f '{{.Name}} {{range .IPAM.Config}}{{.Subnet}}{{end}}' "$n"
done | grep ' 10\.247\.0\.0/24$' && echo "STOP: another network holds 10.247.0.0/24"
# (a) detach the preview router and remove the dynamic network
docker network disconnect upsquad-sandbox-dev_sbx-internal upsquad-preview-router
docker network inspect -f '{{len .Containers}}' upsquad-sandbox-dev_sbx-internal # must print 0
docker network rm upsquad-sandbox-dev_sbx-internal
# (b) IMMEDIATELY dispatch the deploy (the coordinator's own GitHub identity):
# Actions -> "Deploy Dev Stack" -> Run workflow (sandbox: flag), or
# gh api repos/upsquad-ai/upsquad-core/actions/workflows/dev-deploy.yml/dispatches -f ref=main
# (c) nothing to do: the reconcile re-attaches upsquad-preview-router. Verify:
docker network inspect -f '{{range .IPAM.Config}}{{.Subnet}} {{.IPRange}}{{end}}' upsquad-sandbox-dev_sbx-internal # 10.247.0.0/24 10.247.0.128/25
docker network inspect -f '{{range $i,$c := .Containers}}{{$c.Name}}={{$c.IPv4Address}} {{end}}' upsquad-sandbox-dev_sbx-internal
# sbx-egress-proxy=10.247.0.10/24, upsquad-preview-router=..., upsquad-coder-relay-forwarder=...
docker logs upsquad-sandbox-launcher 2>&1 | grep -c '"msg":"sandbox_launcher_listening"' # >= 1
docker logs upsquad-coder-relay-forwarder 2>&1 | grep '"msg":"coder_relay_forwarder_listening"' # addr 10.247.3.2:9481
python3 scripts/check-sandbox-launcher-compose.py # rc 0

Turning the sandbox OFF does not stop it. Flag disabled (or the dispatch input 0) only stops the reconcile from applying the profile: a sandbox stack and launcher already running keep running, unreconciled, and the launcher keeps the docker socket. An unknown flag value, a missing flag file or a missing sandbox compose file is MISCONFIGURED: the profile stays off and the run fails (exit 5), never a green run. To actually stop it (coordinator):

cd /opt/upsquad/upsquad-core
COMPOSE_PROFILES=sandbox docker compose -f docker-compose.dev.yml stop sandbox-launcher coder-relay-forwarder
docker compose -p upsquad-sandbox-dev -f docker-compose.sandbox.dev.yml -f docker-compose.sandbox.platform.yml stop egress-proxy

Only the egress proxy runs in the sandbox stack. The deploy brings upsquad-sandbox-dev up with NO profile; the smoke stand-ins in docker-compose.sandbox.dev.yml (origins, probe sandboxes, a served whoami, a router probe) are under profile smoke, which only the egress smoke enables (checker S13).

The launcher's success signal is sandbox_launcher_listening. No verifyProxyAddr ok line is ever logged. The startup checks (the pinned proxy address against docker network inspect, and under runsc the gVisor canary) either pass silently or make the launcher refuse to start with a named error: ErrProxyAddrNotHeld, ErrProxyAddrConfig or ErrRuntimeNotMeasured. Only after they pass does the launcher log sandbox_launcher_listening.

4. Configuration​

EnvDev valueMeaning
SANDBOX_LAUNCHER_LISTEN:9480listener (on upsquad-dev only; no published port)
SANDBOX_LAUNCHER_BACKENDdockerdocker (the socket) or k8s (in-cluster, through internal/workflow/sandbox/k8sapi only; S6b-1 #4637). Anything else is a boot failure. On k8s the docker-only settings (SANDBOX_NETWORK, the proxy pin) are refused, the runtime defaults to runsc. Every pod runs the workspace agent (S6b-2): the launcher dials ws-receive once, the pod proves the per-pod key, its runtime banner is measured, and only then are the batch inputs sent; declared outputs come back on ws-observe's log, and anything short of a complete document fails the run. SANDBOX_LAUNCHER_ENFORCE_RUNTIME=true refuses (and deletes) any pod that does not measure as gVisor; without it such a pod is reported degraded. Coder serve-mode and AcquireWorkspace (#4703) and served-session inputs are named refusals made before any API call.
SANDBOX_LAUNCHER_WORKSPACE_AGENT_IMAGE(unset; docker ignores it)k8s only, required: the digest-pinned sandbox-workspace-agent image, which must also be on the image allowlist.
SANDBOX_LAUNCHER_K8S_POLL_INTERVAL / _K8S_STARTUP_TIMEOUT500ms / 300sk8s only: the pod status poll, and the longest a pod may stay Pending (Unschedulable included), or wait for its workspace agent, before TermReadyTimeout.
SANDBOX_RUNTIMEruncmust be registered with the daemon
SANDBOX_NETWORKupsquad-sandbox-dev_sbx-internalmust exist
SANDBOX_LAUNCHER_WORKSPACE_ROOT/var/lib/upsquad/sandbox-worksame path host-side and in the container
SANDBOX_LAUNCHER_IMAGE_ALLOWLIST_FILE/etc/upsquad/launcher-images.txtfull digest refs
SANDBOX_LAUNCHER_CALLER_PUBLIC_KEY_FILE / _KEY_ID / _ISSUER / _BASE_URLpublic PEM / PLATFORM_SIGNING_KEY_ID / PLATFORM_ISSUER / MCP_GATEWAY_PUBLIC_BASE_URLverifier
SANDBOX_LAUNCHER_SCM_HOSTSgithub.comexact provider hosts
SANDBOX_LAUNCHER_PLATFORM_TIER_HOSTSmodel-gateway:8091,context-engine:8080refused in egress_grant; must equal the squid tier (S7)
SANDBOX_LAUNCHER_MAX_SESSIONS4live served + batch
SANDBOX_LAUNCHER_LEASE_TTL / _MAX_LEASE_TTL120s / 10m
SANDBOX_LAUNCHER_REAPER_INTERVAL / _DISK_POLL_INTERVAL15s / 2s
SANDBOX_LAUNCHER_MAX_{CPU_MILLIS,MEMORY_MIB,WALL_SECONDS,DISK_MIB,PIDS,OUTPUT_BYTES}4000 / 8192 / 7200 / 4096 / 1024 / 1 MiBhard ceilings (refuse above; every axis must be > 0)
SANDBOX_LAUNCHER_MAX_WORKSPACE_MIB4096max_bytes ceiling
SANDBOX_LAUNCHER_PROBE_IMAGEcurl digestpre-pulled

S6 additions (core#4637)​

VariableMeaning
SANDBOX_LAUNCHER_MAX_SESSIONS_PER_ORGPer-org slot cap, default 2. Must be in [1, max(1, MAX_SESSIONS/2)], else the launcher refuses to start. A slot is one of: a workspace in any state (acquiring, idle, mounted, releasing); a served session that mounts no workspace; an in-flight batch run. A session that mounts a workspace uses that workspace's slot. A refusal is resource_exhausted / ErrOrgSlotsExhausted.
SANDBOX_LAUNCHER_ENFORCE_RUNTIMEtrue/false only. When true: runc is refused before the daemon is touched, gVisor must be measured at startup, and each container's runtime is read back from the daemon before it runs.
SANDBOX_LAUNCHER_PROXY_HOST / _PROXY_ADDR / _SANDBOX_SUBNETThe one hosts entry every sandbox gets (egress-proxy:<addr>). Required under runsc. The address must be a host address inside the subnet. Verified against docker network inspect at startup.

The release status read is capped: git is stopped at the 10001st record, so the list is truncated at exactly 10000 and dirty is set. An over-long record, any stderr output, a non-zero exit, or a stream ending inside a record fails the release. A reap that ends the session mounting a workspace already marked releasing leaves that workspace to its release.

5. Lifetimes and cleanup​

  • Lease: 120 s, renewed by the client at TTL/3; the reaper (15 s) ends an expired session — container removed, workspace and scratch deleted — so an orphan is gone within 2 × TTL. Audit: sandbox_session_reaped reason=lease_expired.
  • Hard TTL / disk: a per-session supervisor ends the session at hard_ttl_seconds (a renewed lease does not extend it) or when /work + /tmp exceed disk_mib (reason=hard_ttl|disk_cap).
  • Unmounted workspace: its own lease; reaped if never mounted/released.
  • Orphans: every tick, labelled (upsquad.launcher=1) containers the launcher does not know are removed (sandbox_container_reaped), unknown workspace dirs older than the TTL and unknown scratch dirs are deleted.
  • Start: all labelled containers and batch dirs removed, workspace dirs older than the TTL removed (sandbox_launcher_startup_sweep).
  • Stop (SIGTERM): every session and workspace ended before exit.
  • Durable record: sandbox_sessions (migration 298), written by the coder dispatch (internal/workflow/coderdispatch, core#4634: open on dispatch, lease_until renewed at TTL/3, closed on coder_result, reaped on a re-dispatch or an abandoned segment) and read by the W2 sweeper through migration 299's sandbox_sessions_stale() (open rows of a terminal run, or not renewed for 10 min); no secret column.
  • Consumer contract for ReleaseWorkspace (core#4634, coderdispatch.ClassifyRelease): OK → the record (dirty or changed_paths non-empty ⇒ dirty; exactly 10000 paths ⇒ truncated); not_found → dirty, paths unknown (unless this caller holds the earlier OK); aborted → retried within 2 × GitCallTimeout + 60 s; internal (status failed, or a response that could not be marshalled) → dirty, paths unknown, never retried; permission_denied → terminal. Nothing but a returned answer is ever "clean". changed_paths are untrusted strings: escaped wherever written, never an allowlist, never the set to commit.

6. Kill levers​

  1. WF_CODE_EXEC_ENABLED=false (orchestrator never constructs the client).
  2. docker compose -f docker-compose.dev.yml stop sandbox-launcher — ends every session on the way out.
  3. Emptying launcher-images.txt + SIGHUP — every launch refused.

7. Proofs​

  • go test ./internal/workflow/sandbox/... ./cmd/sandbox-launcher/ ./cmd/agent-orchestrator/ -run 'Launcher|Remote|Acquire|Release|Secrets|SecurityAssertion|Session'
  • bash scripts/sandbox-egress-smoke.sh (the project defaults to a per-run sbx-smoke-<random>; it refuses to run while another smoke or the dev sandbox stack is up on the daemon; SANDBOX_SMOKE_RUNTIME=runc|runsc forces a runtime). On the dev box (the only runsc venue until #4638 item 2) the reconciled dev sandbox stack permanently holds sbx-* and 10.247.0.0/24, so the pre-flight refuses there. To run it on the dev box: bring the dev sandbox stack down and detach the router (step (a) of §3a WITHOUT the network rm: docker compose -p upsquad-sandbox-dev -f docker-compose.sandbox.dev.yml -f docker-compose.sandbox.platform.yml down after docker network disconnect upsquad-sandbox-dev_sbx-internal upsquad-preview-router; this REMOVES the sandbox network too, so every deploy until the restore fails — dispatch it immediately afterwards), run the smoke, then dispatch the deploy (§3a (b)) to restore it. The dev roll cannot happen while a smoke runs, and the reverse. The smoke gives the launcher the daemon's unix socket as a path on the daemon's filesystem (compose bind sources are resolved by the daemon), via scripts/lib/docker-socket.sh:
    • socket mode (DOCKER_HOST unset or unix://, the dev box): the local socket from DOCKER_HOST, the docker context, /var/run/docker.sock, then /run/docker.sock; its group is stated locally.
    • remote mode (DOCKER_HOST=tcp://…, the hetzner-ci runner, which is an unprivileged container with no socket of its own; ci-runner-box.md §2): a throwaway probe container on the per-job dind (no network, read-only bind) reports the dind's own /var/run/docker.sock or /run/docker.sock and its group, and that path is bound into the launcher. Either way the launcher still holds a unix socket and nothing else does: DOCKER_HOST stays refused on every service by the compose assertion, including the launcher. No socket in either place is one named error before compose runs. Dev and prod use socket mode; remote mode exists only because the CI daemon is a per-job dind (wiped after every job, ci-runner-box.md §2), and it binds that dind's socket — not the CI host's.
  • bash tests/scripts/test_docker_socket.sh (the socket derivation, both modes).
  • bash tests/scripts/test_check_sandbox_launcher_compose.sh.

Current local counts (S6 follow-ups head):

ProofCount
tests/scripts/test_check_sandbox_launcher_compose.sh167/167
tests/scripts/test_docker_socket.sh23/23
tests/scripts/test_sandbox_smoke_runsc_claim.sh10/10
tests/scripts/test_sandbox_dns.sh9/9
tests/scripts/test_dev_reconcile_sandbox.sh83/83
scripts/coder-relay-forwarder-smoke.sh7/7
scripts/sandbox-egress-smoke.sh, runc43/43
scripts/sandbox-egress-smoke.sh, runsc + SANDBOX_ENFORCE_RUNTIME=true44/44
runsc in the hetzner-ci dindNOT EXECUTED (#4638 item 2)

8. Known gaps​

k8s backend (S6b-2, #4707). Off by default, and not enabled anywhere before S6b-3.

These differ from docker on purpose (principal-architect 6031844096 R6):

  • A root .git among a batch run's materialised inputs is refused on k8s, by ws-receive and by the launcher's pre-check, but accepted on docker.
  • k8s returns no declared outputs after a timeout or eviction. They are read only after main terminates normally. Docker also returns them after a timeout or disk kill.
  • An unreadable declared output fails the run on k8s (principal-architect R2). Only a missing path (ENOENT, ENOTDIR, ELOOP), the work-tree root, or a non-regular or symlinked entry is omitted. Docker omits every read error.

Residuals:

  • R7, unread manifest in the log. A batch pod with no declared outputs still has ws-observe print its full-tree manifest to the pod log, where nothing reads it. That is tenant-derived data in container logs. It is acceptable only behind the Log Router exclusion for namespace sandbox (security item 14; S6b-3 gate G3).

  • Short change lists are refused. An observation truncated at the 10000-entry cap fails closed (ErrObservationTruncated). The bounded release design lands with k8s ReleaseWorkspace after #4703 (G5). In it, ws-receive writes a hashed baseline and ws-observe emits differences against it.

  • Outputs are capped by kubelet log rotation. An outputs document larger than containerLogMaxSize fails closed (G4).

  • Zeroising the per-pod key K is best-effort. Copies may survive in /proc/self/environ of ws-receive and in the launcher's rendered manifest bytes. Exposure is bounded by process namespaces (shareProcessNamespace: false) and by ws-receive finishing before main starts (backend-security 6031848684).

  • The ws-receive listener accepts a single connection. Anything that reaches :9000 first could deny service; only the launcher-only NetworkPolicy closes that (S6b-3). Enforce mode must be on in the k8s launcher manifest: without it, a runc pod still receives the tree and is only reported as degraded (S6b-3).

  • prod-enablement #4647 (compose/customer-install only): plaintext orchestrator→launcher hop; sbx-internal adjacency; token narrowing.

  • #4645: node-exporter binds the host rootfs (socket included) and pid: host — two named exemptions in the compose assertion.

  • A launcher-owned read-only cache mount (S5's module-cache decision) slots in as another launcher-chosen -v in dockerArgOpts; nothing here precludes it.