Canary/progressive deployment auto
Changes go to a slice of traffic first and metrics decide the rest - automatic promotion or automatic rollback with no human in the loop - and every change carries verifiable provenance, with AI-assistance disclosure enforced by CI rather than left to convention.
- Green-classified PRs auto-merge and auto-deploy without human intervention
- Merge throughput has risen substantially against the pre-agent baseline, and the merge path is no longer the constraint on delivery
- Canary or progressive deployment is automated (no manual rollout decisions)
- Auto-deploy includes automated rollback on error rate threshold breach
- Merge queue wait time is under 10 minutes
- Auto-merge and auto-deploy logs for Green PRs
- PR throughput dashboard showing sustained growth against the pre-agent baseline
- Canary deployment configuration with automated promotion/rollback rules
- Development L4 (Code Review & Quality) - Green/Yellow/Red classification and auto-merge must be operational
- Delivery L3 (Merge & Deploy) - policy-based rules and deterministic ordering must be in place
What It Is
Automated canary and progressive deployment is the practice of rolling out changes to a small percentage of production traffic first, automatically monitoring key metrics during the rollout, and either automatically promoting to full traffic (if metrics look good) or automatically rolling back (if metrics degrade). The entire lifecycle - from "deploy to 5%" to "promoted to 100%" or "rolled back to previous" - is automated without human intervention in the happy path.
Manual canary deployments existed before AI-assisted development. The L4 upgrade is the automation: removing the human who watches the canary and makes the promotion/rollback decision. At 50+ PRs/day, manually watching each canary deployment is not feasible. Automated analysis - comparing error rates, latency distributions, and key business metrics between canary and baseline using statistical analysis - makes the promotion/rollback decision reliably without human attention.
Flagger (built on top of Kubernetes) and Argo Rollouts are the primary implementations. Both support analysis templates: define the metrics to compare, the comparison method (Prometheus queries, Datadog metrics, custom HTTP checks), and the thresholds. The operator handles the traffic splitting, metric collection, comparison, and promotion/rollback. Spinnaker's automated canary analysis (ACA) provides similar capability for non-Kubernetes environments.
The second half of this L4 item is provenance. When deployment is automatic, the deployment record is the only place the origin of a change is ever written down, and it has to be trustworthy. That means machine-enforced disclosure of AI assistance rather than a convention people are asked to follow. The Linux kernel's 7.2 cycle is the instructive case: LWN counted 1,111 commits carrying Assisted-by tags on 2026-08-17, just under 7% of the cycle and up from 301 in 7.1, with 252 patches crediting the Sashiko LLM review system - and at least one maintainer strips the tags on the way in. A disclosure convention with a single non-participant is not a dataset, it is an anecdote. If the tag matters, a CI check has to require it and a merge has to fail without it.
Sourcegraph made the enterprise version of this argument on 2026-07-27: the blocker to agent adoption in regulated environments is not capability, it is the ability to prove which files the agent read. Provenance that answers "which model, which prompt, which context, which human accepted it" is what turns a canary record into an audit record.
At L4, progressive deployment is the default path for all production changes. The deployment doesn't go to 100% of traffic immediately - it starts at 5-10%, waits for the analysis window (typically 10-15 minutes), and advances to 25%, 50%, then 100% if each phase passes. This staged approach limits blast radius for every deployment while maintaining deployment frequency.
Why It Matters
- Limits blast radius for every deployment - at 50+ PRs/day, some percentage of deployments will introduce regressions; progressive rollout limits each regression to 5-10% of users for the first 10-15 minutes, dramatically reducing incident scope
- Eliminates manual canary watching - manually monitoring a canary at high deployment frequency is a full-time job; automated analysis removes this overhead while providing more rigorous and consistent evaluation than human monitoring
- Enables safe auto-merge → auto-deploy - the green = auto-merge → auto-deploy pattern is only safe with automated progressive deployment as the deployment strategy; full-traffic auto-deploy without canary is reckless at L4 volume
- Generates deployment performance data - every canary analysis run produces a record of which metrics were compared, what values were observed, and what the decision was; this data makes deployment patterns visible and improvable
- Provenance turns a deploy log into an audit record - when nothing but automation touches the path from merge to production, the deployment record is the only surviving evidence of where a change came from; enforced disclosure is what keeps it complete
- Supports agent-driven development at scale - agents that produce PRs need deployment infrastructure that can handle their output safely; automated canary is the deployment safety net that makes autonomous agent workflows viable
Getting Started
- Instrument your key metrics in Prometheus or Datadog - canary analysis requires observable metrics. At minimum: HTTP error rate (5xx responses), p50/p95/p99 latency, and 1-3 business-level metrics (checkout conversion, login success rate, API success rate). These must be queryable by the canary analysis tool.
- Install Flagger or Argo Rollouts - if using Kubernetes, Flagger integrates with your service mesh (Istio, Linkerd) or ingress (NGINX, Traefik) for traffic splitting. Install Flagger with your preferred provider and configure it for your cluster.
- Define a canary analysis template - create a Flagger
MetricTemplateor Argo RolloutsAnalysisTemplatethat defines: which metrics to compare, what thresholds indicate regression, and how long the analysis window should be. Start with error rate (fail if canary error rate > 2x baseline) and latency (fail if p99 latency > 20% above baseline). - Configure your first canary rollout - annotate one service for canary deployment. Start with a conservative schedule: 5% traffic for 10 minutes, then 25% for 10 minutes, then 50% for 10 minutes, then 100%. Use
maxSurgeandmaxUnavailablesettings to control pod counts during rollout. - Test rollback explicitly - deploy a known-bad version (one that generates 5xx errors at a 5% rate) and verify that Flagger detects the error rate increase and automatically rolls back within the configured window. Rollback must be tested before it's needed.
- Enforce the AI-assistance disclosure in CI, not in the contributing guide - add a check that requires the disclosure trailer (
Assisted-by:or your equivalent) on any commit whose diff was agent-produced, fail the merge without it, and carry the tag through into the deployment record so a canary promotion can be traced back to its origin. A convention that one maintainer can silently strip produces numbers you cannot use. - Carry the provenance into the rollback path too - when an automated rollback fires, the incident record should show the provenance of the change that triggered it. That is the data that tells you, months later, whether agent-authored changes roll back more often than human-authored ones.
- Add deployment events to your team dashboard - canary promotions, rollbacks, and in-progress deployments should be visible in a shared dashboard. "Canary at 25%, metrics nominal" tells the team that an auto-deploy is in progress without requiring anyone to watch it actively.
The canary analysis window needs to be long enough to collect statistically significant data but short enough not to create a deployment bottleneck. At 50 PRs/day, a 30-minute canary window per deployment creates a deploy queue that can't clear faster than it fills. Target 10-15 minutes per phase, not 30. If your traffic volume is too low for statistical significance in 10 minutes, use a longer window for business metrics but shorter for error rate.
Common Pitfalls
Using canary analysis with insufficient traffic. Canary analysis comparing 5% traffic to 95% baseline requires statistically significant traffic volume. If your service handles 100 requests/hour, 5% is 5 requests/hour - not enough to detect a 2% error rate increase with confidence. For low-traffic services, use blue-green deployment (100% traffic switch with instant rollback) rather than canary, or use a minimum request count threshold before canary promotion.
Analysis templates that are too strict or too lenient. A template that fails on any 1% error rate increase will cause constant rollbacks from normal production noise. A template that requires 10% error rate increase won't catch real regressions. Calibrate thresholds by analyzing your current production metric variance: a "failure" threshold should be outside normal variance by 2-3 standard deviations. Start lenient and tighten over time.
Not accounting for time-based traffic patterns. A canary deployed at 3am Sunday sees different traffic (and different baseline behavior) than one deployed at 2pm Tuesday. Some analysis templates use fixed numeric thresholds that become inappropriate at low-traffic times. Use relative thresholds (canary error rate vs. concurrent baseline error rate) rather than absolute thresholds to handle traffic pattern variance.
Canary that can't actually roll back. Some services have one-way state changes: database migrations, event streams, feature flags that once flipped can't be flipped back cleanly. Canary + automated rollback only works for stateless deployments or deployments with backward-compatible state changes. For breaking changes, progressive deployment must be decoupled from feature activation (feature flags) and use a blue-green strategy instead.
Treating a valid attestation as evidence the change is safe. The ChainDrop compromise of the keyv npm ecosystem on 2026-08-04 is the clearest lesson of the month on this point: the malicious tarballs carried valid npm provenance attestations, because the maintainer's account had been taken over and the project's own Actions pipeline built and published the payload - 444 packages and 2,212 versions in under four hours. The attestation was correct; the source was malware. Provenance tells you where a change came from, not whether it should be there. Do not let a green provenance check substitute for the canary metrics.
Disclosure by convention rather than by check. Every organisation that has tried voluntary AI-assistance tagging has found the same thing the kernel did: participation is partial, and the non-participants are invisible in the data. If you intend to answer questions like "do agent-authored changes trigger more rollbacks", the tag has to be a merge requirement, applied uniformly, from the day you start counting.
Forgetting about canary in your monitoring. When a canary is running, your monitoring shows mixed signals: some users are on the new version, some are on the old. Alerts that fire on aggregate error rate can be triggered by canary issues that are already being handled by rollback automation. Ensure your monitoring is canary-aware: distinguish between "canary pod errors" (handled by automation) and "production pod errors" (requires human response).
How Different Roles See It
Bob's team has auto-deploy to production but it deploys to 100% of traffic immediately. Last month, an agent-generated change that passed CI caused a 12-minute production incident affecting all users before the on-call engineer noticed and rolled back manually. Bob wants to prevent this but is worried that adding canary stages will slow down the deployment pipeline.
What Bob should do: Bob should calculate the trade-off explicitly. Current state: 100% traffic deploys in 2 minutes, but incidents affect 100% of users and take 12 minutes to detect and resolve. Proposed state: canary deploys in 15 minutes (5% for 5 minutes, 25% for 5 minutes, 100% if passing), incidents affect 5% of users and are resolved in 5 minutes automatically. The incident cost comparison: current = 100% users × 12 minutes vs. proposed = 5% users × 5 minutes. The canary adds 13 minutes to the happy path but reduces incident scope by 95%. At current incident frequency (monthly), this is a good trade. Bob should pilot Flagger on one service and measure actual deploy time and incident scope over 60 days.
Sarah wants to understand whether the team's progressive deployment rollouts are actually catching regressions or just adding latency. She suspects the canary analysis thresholds are calibrated too loosely - canary rollouts always pass, which might mean the thresholds are missing real issues.
What Sarah should do: Sarah should audit the canary analysis history: how many canary rollouts were automatically promoted? How many were automatically rolled back? How many of the automatically promoted deploys were later identified as causing production issues? If 100% of canaries are promoted and 20% of those cause post-deployment issues, the analysis thresholds are clearly too loose. Sarah should partner with Victor to calibrate tighter thresholds using historical metric data: "what would error rate and latency have looked like during the canary phase of the three incidents we had last quarter?" Setting thresholds that would have caught those incidents is the calibration target.
Victor has Flagger installed and running canary deployments for two services. He wants to add automated analysis that goes beyond error rate and latency - specifically, he wants to include business metric analysis (feature adoption rate, API success rate for key workflows) in the canary decision. Standard Flagger metrics don't cover these.
What Victor should do: Victor should implement Flagger custom metric templates using the webhook provider. The webhook allows Flagger to call an external analysis service that can evaluate arbitrary business metrics. Victor should build a simple analysis service: given a deployment ID and time window, query Datadog (or wherever business metrics live), compare canary segment metrics to baseline segment metrics, and return a pass/fail with explanation. This custom analysis service can be reused across all services and becomes the team's standard for "business-metric canary analysis." Victor should also thread provenance through the same service. The analysis webhook already knows the deployment ID, so it can attach the origin of the change - model, session, disclosure trailer, accepting human - to the promotion or rollback record at no extra cost, which is exactly the data the team will want the first time someone asks whether agent-authored changes roll back more often. Victor should propose contributing the analysis service pattern to the team's internal developer platform so all services can benefit from business-metric canary without each service team building it themselves.
Further Reading
From the Field
Recent releases, projects, and discussions relevant to this maturity level.
How This Guide Changed
What each edition changed in this guide, newest first.
- V1.6September 2026LATEST
The matrix item paired automated progressive delivery with verifiable provenance this month, on the reasoning that once nothing but automation stands between a merge and production traffic, the deployment record becomes the only surviving account of where a change came from. The guide now argues that AI-assistance disclosure has to be a CI check rather than a convention, using the Linux 7.2 cycle - 1,111
Assisted-bycommits and at least one maintainer stripping them - as the demonstration that voluntary tagging produces numbers nobody can use. A new pitfall carries the ChainDrop lesson that a correct provenance attestation over a compromised source is still malware, so provenance never substitutes for the canary metrics. - V1.5August 2026
The opening was rewritten to state the mechanism instead of describing it as a maturity upgrade: a slice of traffic first, metrics decide the rest, promote or roll back with nobody watching. After a month in which agents were shown escaping sandboxes and deleting production data, the automatic rollback half of that sentence carries considerably more weight than the automatic promotion half.
- V1.3June 2026
The Kubernetes reference behind the progressive-delivery pattern was re-pointed to a canary rollout walkthrough that had not gone stale. Nothing about the practice itself moved this month.
- V1.0March 2026
In the first edition this was the item that took the person out of the canary. Manual canaries long predate agents; the argument here was that at fifty-plus PRs a day nobody can sit and watch each rollout, so the promote-or-roll-back decision has to be made by statistical comparison against a baseline - Flagger, Argo Rollouts, Spinnaker's automated canary analysis - or it does not get made at all.
Where does your team actually sit on this?
This guide describes one level of one area. Run the assessment to place your team across all 16 areas, see which gates you have passed, and get a report you can take to your stakeholders.