Sandbox Jobs never received WF_DEPLOYMENT_MODE, which every worker requires
before anything else, so each Kubernetes sandbox exited at start. The
provisioner now passes its own mode.
A local development cluster (k3s) has no Kata, no bubblewrap inside runc and no
TLS between services. For it, and only with WF_DEPLOYMENT_MODE=development:
- WF_ALLOW_INSECURE_HTTP=true lets services reach each other over plain HTTP
(Git, the model proxy, the provisioner and IDE gateway targets, the worker's
control-plane client); production refuses the setting outright.
- The provisioner accepts WF_RUN_SANDBOX_MODE=host and WF_KATA_RUNTIME_CLASS=none
and passes the HTTP settings to its sandboxes.
- The development seed is built into the image (dist/api/seed.mjs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Security-relevant behaviour (development tokens, loopback HTTP, inline
checkpoints, raw provider keys, optional verification profiles) was
keyed off NODE_ENV === 'production', so any deployment that forgot
NODE_ENV silently ran with development rules.
- @wishforge/contracts exports deploymentMode/isProduction/
requireDeploymentMode. WF_DEPLOYMENT_MODE wins; misspelled values and
development combined with NODE_ENV=production are rejected; NODE_ENV
remains a fallback only for libraries and tests.
- All API, runtime, artifact, Git service and operator-script checks use
isProduction.
- The API, worker, Git service and Runner refuse to start without an
explicit WF_DEPLOYMENT_MODE; the IDE gateway treats anything other
than an explicit development mode as production.
- The development seed loads .env.local before checking the mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>