Contracts with a ladder of checks, an end-of-turn gate, retrospectives and shared lessons, time-to-delivery measurement, a library of 140 verification techniques and 20 recipes, personal data kept outside the clone, and releases with rollback. Standard library only. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2.7 KiB
id, title, answers, rung, section, languages, kinds, cost, detect, ran_here, verified
| id | title | answers | rung | section | languages | kinds | cost | detect | ran_here | verified |
|---|---|---|---|---|---|---|---|---|---|---|
| smoke-after-deploy | Post-deploy smoke checks and health endpoints | Is the thing I just deployed actually up and serving correct responses? | 3 | real-world | any | general | low | curl --version | yes | ran |
Use when
- You deployed, released or restarted a service and are about to say it is live.
- You want a small set of fast checks that run after every deploy and after rollback.
Do not use when
- You need deep correctness; smoke checks only show it is alive and wired.
- You cannot reach the deployed URL; then say what you could not check.
Set up
Have a health endpoint (for example /healthz) that checks real dependencies (database reachable, migrations applied), not just that the process is up. Know the version string the deploy should now report, so you can tell the new build from the old one.
Minimal example
BASE=https://app.example.com
expected=$(git rev-parse --short HEAD)
curl -fsS --max-time 10 --retry 5 --retry-delay 3 --retry-connrefused "$BASE/healthz" | tee /tmp/health.json
curl -fsS "$BASE/version" | grep -q "$expected" # the new build is the one answering
curl -fsS -o /dev/null -w '%{http_code}\n' "$BASE/" | grep -qx 200
curl -fsS "$BASE/api/items?limit=1" | python3 -c 'import json,sys; json.load(sys.stdin)' # one real read that parses
-f makes curl fail on HTTP errors (4xx, 5xx), which is what turns the check into an exit code. --retry gives a starting service time. Add one write-and-read round trip against a test account if the service has state. Keep the smoke set under a minute.
Run
The commands above, as a script with set -e. Passing looks like: exit 0, the health JSON shows each dependency ok, and the version matches. Failure: curl exits 22 (HTTP error), 28 (timeout) or 7 (connection refused); grep exits 1 when the version is old.
As a contract check
{"id": "smoke", "claim": "The deployed service is healthy and serving the new build", "kind": "general", "rung": 3,
"cmd": "sh scripts/smoke.sh https://app.example.com", "expect": {"exit": 0}, "tier": "deep", "timeout_s": 120}
What a pass does not prove
- Only the endpoints probed. A healthy
/healthzcan sit in front of a broken checkout page. - A load balancer may send you to one healthy instance while another is bad; probe more than once.
- A cached or CDN-served response can mask a failed deploy. The version check is what shows the new build is live.
- Check the check: point it at a wrong path (
/nope) and confirmcurl -fexits 22 (run here against a local server: 22 for the missing path, 7 for a refused connection; the full script was not run against a real deployment).