Part 7 of 12 · 1 min read
How to build it so it holds up
- Containerise and pin: pinned base images, non-root, healthcheck, resource limits, minimal image; build once, promote the same digest through environments.
- Handle secrets structurally: runtime injection from a secrets manager, no secrets in images, build args, repos or logs; scan commits and images; rotate and have a leak runbook (module 11).
- Version prompts, models, tool schemas and configs with the code, with a release identifier recorded in every trace (module 9).
- Run evals in CI with a regression suite from real incidents (Level 9, Level 10 module 8); report confidence, not just a pass/fail.
- Deploy progressively (staging with replayed traces, then canary) with health checks on errors, latency, cost and quality proxies, and automatic rollback.
- Drain on deploy: stop taking new jobs, let in-flight runs finish or checkpoint (module 3), keep both versions able to read queued jobs.
- Use expand-contract migrations; never ship a destructive migration in the same release as its code.
- Keep the previous digest warm and rehearse rollback in staging and occasionally in production.
- Separate environments and credentials (dev, staging, prod) with distinct keys and data.
- Record every deploy (who, what digest, when, which eval results) for audit (Level 10 module 9).