Many releases a day, one stop sign
Picture an afternoon in which thirty-one changes reach production across nine services, and three of them touch the same customer-facing flow. A little after four, errors on that flow triple. The person on call has one question, and it is the only one that matters: which change was it, and can we undo it without undoing the other thirty?
The tempting answer is to ship less often. One big release a week, tested properly, and you would always know what changed. I think that answer has the risk backward. A weekly release tells you what is in it. It also packs a week of changes into one deploy, so when it breaks, you are searching a week.
The better answer is many small releases and one stop sign: a check that compares the new version with the old one on a small slice, and pulls the release back on its own when the evidence says so, without waiting for a meeting. The same stop sign, with alarm lines drawn in advance, keeps working after release, when the inputs drift.
This essay draws on material from the Transition2 course: shipping many small changes safely with flags, migrations and canaries, plus two lessons on drift alarms and on recurring audits with an automatic pause. The thresholds and examples are the course's own.
Small changes shrink what one bad release can do
Batching still makes sense when every release has to clear an outside review before it can reach users. For a service you deploy yourself, continuous deployment shrinks the blast radius. Each deploy carries one change or a few, so when something breaks, the suspect list stays short.
Short is the point. With three suspects, the on-call engineer can put the deploy markers and the flag changes on the same graph as the error spike, switch the suspects' flags off one at a time, or bisect the deploy list.
Small releases are only safe with three tools underneath them:
- Flags, so deploying code and releasing behavior are separate steps.
- Migrations that never break the code still running.
- Canaries that roll back by themselves.
Three kinds of flag, three lifespans
A flag separates deploying code from releasing it. The code ships switched off, then you turn it on for staff, then for one percent of users, then for everyone. A close cousin is the dark launch: the new backend path runs for real users without them seeing the result, so you can measure load before anyone depends on it.
Flags are not all the same thing, and the difference is how long each one should live.
| Flag | Lifespan | What the build checks |
|---|---|---|
| Release flag | Short-lived | An owner and an expiry date in its config; the build fails once the date passes |
| Experiment flag | Ends on a set date | The build fails if it has no date at all |
| Operational kill switch | Can live for years | Allowed to stay |
| Permission flag | Can live for years | Allowed to stay |
Mixing these up is how a pile of stale flags starts: flags nobody dares delete. Keeping the kinds separate, in a small registry the build reads, makes the rule mechanical. A release flag past its date fails the build. An experiment flag with no date fails the build. A kill switch passes.
When you delete a flag, remove both code paths in the same change.
Expand and contract: change the data shape in small moves
Flags do not help with the database. If two versions of the app are running, and during a rollout they always are, a single rename statement breaks one of them.
Take a rename of a "full name" column to "display name". It happens in several small moves, never one. The pattern is called expand and contract, or parallel change.
- Expand. Add the new column, nullable. If the old column is required, relax that too, or the new version cannot insert.
- Write both. Deploy a version that writes both columns and reads the new one, falling back to the old.
- Backfill the new column in small batches.
- Use only the new column. Once nothing old is running, deploy a version that reads and writes only "display name".
- Contract. Drop the old column.
Each step works with whatever version is still serving traffic. That is the whole rule.
The ceremony looks excessive until you run the control. Do the one-statement rename while the old version is still live, and the old version's very next read fails: the column it asks for no longer exists. For a few minutes, old code and the new schema run together, and that window is enough.
The contract step deserves two guards of its own, because it is the step you cannot take back:
- If an old instance that nobody drained writes a row after the backfill, the contract step refuses to run. That row exists only in the old column.
- If the version that writes both columns is still running, dropping the old column is refused too.
The canary is judged against a baseline, on a small slice first
A canary sends a small slice of traffic to the new version and compares it with the old version over the same minutes. Written down, the judge has four parts: a metric, an interval, a success condition and a failure limit. For each window it returns one of three verdicts: pass, fail or inconclusive.
The course's judge fails a window on either of two rules:
- The absolute objective: errors above one percent, or 99th-percentile latency above 500 milliseconds.
- The comparison: canary errors above twice the baseline, the old version's error rate over the same window.
Why compare at all, when you could check that the whole service stays under one percent errors? Because the fleet number hides the canary. Put the canary on five percent of traffic and let it throw fifteen percent errors. Its share of the fleet total is 0.05 times 15%, or 0.75 points. If the old version runs at, say, 0.2% errors, the fleet reads about 0.94%, under the one percent objective. The fleet check says pass. The comparison sees a canary at 75 times its baseline, far past twice, and fails it.
The reverse case is why the absolute rule stays. When a shared dependency hurts both versions at once, the canary and the baseline rise together and the comparison looks fine. Only the absolute objective catches that.
The third verdict matters as much as the other two. When a window has too few requests to judge, the answer is inconclusive, and inconclusive pauses the rollout for a person. A thin window that happens to look clean is not evidence.
Then the slice grows in steps, and the judge keeps reading each window. In the course's progressive test, the canary broke at fifty percent of traffic, and traffic went back to zero.
The stop sign does not wait for a meeting
The rollback in that test happened because the judge said fail, not because someone noticed and convened a call. That is what "one stop sign" means here: a predefined rule, with predefined evidence, that acts on its own.
You can test whether you have one. Pick one service, push a deliberately bad canary in staging, and see whether it rolls back without anyone touching it.
This also settles the argument about deploy freezes. Pausing feature changes over a peak weekend is a reasonable judgment call, but keep the pipeline working, because a security fix still has to ship. A freeze that is really fear usually means nobody trusts the rollback. Test the rollback instead.
Some failures arrive after the canary passed. An hour later, something breaks. Default to revert: a revert returns you to a known state, and fixing forward means writing new code while users wait. Fix forward only when reverting is worse, and the clearest case is right after a contract step, when the old code needs a column that is gone. That is why the contract step waits days, not minutes, after the version that stopped using the old column.
After release, a drift alarm is a smoke alarm
For a model in production, the release is not the last risk. The work reaching it changes. A new intake portal launches, the mix of documents shifts, new layouts appear.
Two statistics from the drift lesson do the work. The population stability index sorts today's inputs into fixed groups, called bins, and compares that mix with a stable reference period. CUSUM, short for cumulative sum, keeps a running tally of small departures in a signal you choose, such as audited review errors, so slow creep crosses a line that no single day would.
Neither one names a cause. The lesson's phrase is the one to keep: a drift chart is a smoke alarm, not a fire report. The shift may be seasonal, a logging change, or a real change in the source. A rise in an "unknown category" feature could mean customer behavior changed, a new form shipped, or an upstream parser started truncating text, and each of those calls for a different response.
So an alert leads to three checks, in order:
- Confirm the features actually moved.
- Inspect the upstream mix and the instrumentation: did the alert start at the data source, or after preprocessing?
- Compare blind outcome labels, from reviewers who cannot see the model's call, against the baseline.
Then the response follows the outcome, not the chart. If inputs drift but blind correctness holds, keep running, sample more and document the shift. If correctness falls in one new source slice, narrow that lane and inspect current examples, and keep the established lanes running while their own measures stay in bounds. The reverse also holds: stable inputs with falling quality deserve action, which is why a labeled audit sample keeps running even when the drift charts are quiet.
The pause needs a scope, an owner and a way back
The recurring audit lesson makes the case for an automatic pause on model lanes. Without one, a serious regression can run until the next quarterly report. With a careless one, an alarm can stop a whole service on an unconfirmed signal and strand legitimate work.
The answer is to define the pause before the incident. A confirmed high-severity error triggers containment immediately. A distribution alert alone opens an investigation. In the lesson's transfer review example, a verified rise in serious missed cases pauses the lane; during the pause, only the affected transfers go to trained analysts, and urgent legitimate transfers get an expedited check.
Scope it to the lane. If the alert rate rises for two consecutive weeks and the audit finds a new misclassification pattern in one region, hold that region's lane while the rest continues under its own evidence.
A pause plan names, in advance:
- the affected population,
- the owner of the backlog that builds up,
- how much safe manual capacity exists,
- the evidence that will justify a restart.
Restart has its own rule. A paused lane's timer expiring overnight proves nothing. Restart needs the cause understood, a corrected version that passes a fresh blind sample covering the changed source, and the accountable owner's sign-off on a restart record that names the affected slice, the audit result and the remaining limit on exposure. Then resume the smallest affected lane first, and sample it more heavily for a defined period before returning to the normal cadence. A passed regression test does not establish recovery under new traffic.
Repeated checking needs a stopping rule
Peek at the scoreboard often enough and luck looks like a trend. A canary judge reads a fresh window every interval. A drift monitor reads a fresh sample every week. Each look is another chance for ordinary noise to cross a fixed line, and if you check long enough, it will.
The recurring audit lesson's answer is sequential monitoring: alarm lines chosen in advance for repeated looks, not a single-look threshold reused forever. Its example is a weekly monitor that reviews a random sample of 300 automatic decisions, with two lines and a rule for each.
| Signal | Response |
|---|---|
| Warning line crossed | Increase sampling, or narrow the lane |
| Pause line crossed | Pause the lane under the pause plan |
| Confirmed high-severity error | Contain now, whatever the lines say |
| Labels delayed | Review the delayed labels separately, under a rule written in advance |
Record the sample sizes and the decision boundaries. The lines limit false-alarm risk under the assumptions you set; random noise can still cross one, which is why a crossing leads to the checks above and not straight to a verdict.
Two habits keep the lines honest.
Do not reset the baseline after every alert. Each reset can quietly normalize a slow decline. Version the thresholds and the baseline window, so nobody can make a warning disappear by redefining normal after each change.
Keep a small pre-alert sample. When an alarm fires, investigators can then compare raw examples from before and after, instead of picking only the cases that fit the explanation they already suspect.
The canary's inconclusive verdict is the same discipline at release speed: a window too thin to judge goes to a person, rather than letting chance decide in either direction.
A short checklist
- Ship small, one change or a few per deploy, and put deploy markers and flag changes on the same graph as your error rates.
- Give every release flag an owner and an expiry date, and fail the build when the date passes or an experiment flag has none. Keep kill switches and permission flags in their own class.
- Delete a flag with both of its code paths in the same change.
- Change the data shape by expand and contract, and make the contract step refuse to run while old or dual-writing code is live.
- Judge the canary on two rules: an absolute objective, and errors against the old version's baseline over the same minutes. Treat a thin window as inconclusive and hand it to a person.
- Prove the rollback is automatic by pushing a deliberately bad canary in staging.
- Default to revert, and hold the contract step for days so revert stays possible.
- Treat a drift alarm as a smoke alarm: confirm the movement, check upstream and logging, then compare blind outcome labels.
- Write the pause plan first: scope, backlog owner, manual capacity, restart evidence. Restart on a fix, a fresh blind sample and a signed record, never on a timer.
- Draw warning and pause lines for repeated looks in advance, version the baseline, and do not reset it after each alert.
The checks a change has to pass before it ever reaches a canary are the subject of the earlier essay in this series, An eval that runs on every change. For the wider argument that the gate is where release quality actually lives, see the release gate is the product.
Go deeper: the full lessons and labs are in the Transition2 course.