Release and Rollback Clinic
The clinic is where you break prod on purpose, roll it back under a timer, and ship a real migration.
Retrieval Prompts
- State the expand-contract migration pattern in two sentences.
- State three rollback triggers that you would act on without discussion.
- State why a feature flag does not replace a rollback plan.
- State the three smoke-test checks for a capstone.
- State the rule for when expand-contract is required vs when additive-only is safe.
Compare and Distinguish
Separate these pairs clearly:
- expand migration vs contract migration
- rollback vs roll-forward
- release toggle vs permanent config switch
- liveness check vs readiness check
Common Mistake Check
For each statement, identify the error:
- "My migration tool has
--rollbackso I can always revert data changes." - "Rolling back is shameful; we always roll forward."
- "The smoke test calls
/healthzand that's enough." - "I'll leave the feature flag in place indefinitely, just in case."
- "I shipped a rename and a contract in the same PR to save a deploy."
Mini Application
Do all four, each with a written artifact:
- Rollback rehearsal. Deliberately deploy a known-bad image to
staging(or toprodduring an agreed quiet hour). Time the rollback. Writelibrary/raw/rollback-rehearsals/001.mdwith timestamps to the minute, the trigger used, and the command that restored service. - Expand-contract migration. Pick one non-additive schema change. Ship the expand half in one release with up+down SQL committed. Ship the contract half in a later release. Commit
library/raw/migrations/<id>.mdwith one paragraph on what the overlap window protects. - Smoke test suite. Commit
scripts/smoke.shwith the three checks from the concept page and wire it into the pipeline's deploy step. - Feature flag lifecycle. Introduce one flag this week. Deploy with it off. Flip it on. Retire it within 2 sprints and delete both branches in a single PR.
Evidence Check
This page is complete only if:
library/raw/rollback-rehearsals/001.mdexists with a real timer in minutes- at least one expand-contract migration pair is visible in git
- a smoke failure in CI blocks promotion (verified by intentionally breaking an endpoint once)
- at least one feature flag has been introduced and retired during the semester
If any of those is aspirational, the clinic is not done -- repeat the missing part.