Skip to main content

10x production changes with AI

At Flashduty, AI now handles production changes: it drafts the change ticket from the code diff, an engineer approves it, and AI rolls out, watches, and rolls back by the ticket. In two months, monthly production changes went from about 45 to 523. Here is why we did it, how it works, and what people still decide.

Flashduty Engineering

10x production changes with AI

Almost all of the code at Flashduty is now written and tested by AI, and when something breaks in production, AI SRE investigates first. It reads the logs, the metrics, and the recent changes, and gives a first conclusion before an engineer takes over.

In the second half of this year we looked at our whole engineering process and found one step that still depended entirely on people: getting code into production. That step had three problems.

First, changes took a lot of time. An ordinary release needed someone to write a change ticket, build, roll out in batches, and watch logs and alerts. A change that touched several services or the database often took an engineer a full day, and a complex one took several. Writing code had become much faster, and releasing it was now the slowest part.

Second, engineers do not like writing change tickets, for the same reason they do not like writing docs. This is not about any one person. A ticket ships no feature and takes time, so a hand-written one usually had a sentence or two: what changed and which version to deploy. How many steps, what should make us stop, and how to get back were rarely all written down. Docs have the same problem. We described how we handed them to AI in We stopped writing docs by hand, and change tickets are the same kind of problem.

Third, a well-written change ticket matters more than it used to. The first step in investigating a production alert is now to have AI SRE look at recent changes: which changes are in progress, how far each has gone, what it might affect, and which pull requests it includes. When the ticket says all of this, AI SRE can follow the pull requests straight into the code and judge which change is related to the incident. When the ticket is one sentence, it has to start from scratch, the same as a person would. The quality of the ticket directly determines how fast an incident is handled.

So since September 23, 2026, AI has handled changes too: it drafts the change ticket from the code diff, and after an engineer approves it, AI rolls out by the ticket, watches, and rolls back if something goes wrong.

What changed in two months

Results first. Over the previous 10 months we averaged about 45 production changes a month. October had 453 and November had 523, roughly 10 times as many.

Production changes per month: 21 to 73 a month from November 2025 to August 2026, averaging about 45; 102 in September, 42 of them after the 23rd; 453 in October; 523 in November

The difference comes from how we release. A release used to take up a person's time, so features were batched. Now an engineer only approves the ticket and looks at the result in the pre-production environment, so each change ships on its own once it merges. On days with any change, the median is 16 a day. The busiest week had 166.

Each release also carries less. Most tickets now cover one or two pull requests. We come back to what that means for stability below.

A thin ticket usually means an unfinished plan

We started with the ticket rather than with automated deployment, and the reason is the second problem.

A change ticket has to answer three things: what the steps are, what counts as trouble, and how to get back. When the author cannot answer them, it is usually not laziness. The change itself has not been thought through.

Take a ticket that says "roll back the image if there is a problem". Roll back to which version? If this change also altered a table or a message format, can the old version still read the new data? How many errors, for how long, count as "a problem"? If these have no answer when the ticket is written, someone has to work them out under pressure during the incident.

When they are written down in advance, a bug in the code can be caught and reverted within minutes. A shorter incident costs less against the SLA. So we had two goals: stop releases from taking up engineers' time, and give every change a plan that has been written out.

Both are a good fit for AI. A complete ticket requires reading every relevant diff, checking the version currently in production, and collecting a metrics baseline before the rollout. That is tedious for a person. For AI it is a few more minutes.

What a change ticket should contain

Before letting AI write tickets, we fixed the structure of the ticket itself. We did this with Flashduty custom forms.

Required fields set the floor. Our change form has 14 fields, and impact assessment and rollback plan are required. The rollback field carries its requirement in the input hint: write stop-loss conditions as numbers and durations that can be judged directly. Whether a person or AI writes the ticket, it cannot be submitted with these two empty.

Fields follow your own process. Besides fixed fields such as title, planned time, and operator, we added service, environment, affected components, image, and code changes. Affected components map to the components on our status page, so when a change affects users, the on-call engineer knows right away which status page item to update. A team with a different process can use its own fields.

Field configuration of the Flashduty change form: the rollback plan is required and its hint asks for stop-loss conditions written as numbers and durations; below are custom fields such as checklist, service, environment, and affected components

Status changes reach people. When a ticket is created and each time its status changes, a card goes to the matching chat group according to the notification policies. Policies can match by channel, so each team's changes go to its own group. The card carries the service, environment, affected components, and a link to the ticket, so people in the group know who is changing what without opening the console.

Notification settings for Flashduty changes: on the left, notification policies matched by channel; on the right, a preview of the "change in progress" card with channel, planned time, operator, service, environment, and affected components
A test change card received in a Feishu group: the title reads "Planned · Test message · sample change", followed by channel, planned time, operator, checklist progress 1/3, service, environment, and affected components, then the description, impact, and backout plan

With the structure fixed, AI's job is to fill each field to that standard.

How AI writes the ticket

The engineer says one sentence: "ship these PRs to production." AI drafts the ticket by following a release runbook that defines how each part is written.

Scope. AI lists every pull request between the production version and the main branch and reads each diff. If the range includes someone else's change that is not ready to ship, it asks the author first and does not ship it along.

Steps and pacing. Each step is written as an operation that can be executed directly. Pacing depends on the change. By default the new version is verified in pre-production and then rolled out to production in batches. If the change involves a data format that old and new versions cannot both read, or a frontend that depends on a new backend API, the pacing and order are adjusted and the reason goes into the ticket.

Checks. Every pull request gets at least one check that states how to verify it, what result passes, and whether a person or AI confirms it.

Rollback plan. The rollback target is the production version found at drafting time. The conditions for rolling back are numbers, and the thresholds come from the baseline collected before the rollout. If the change cannot be fully reverted, for example an irreversible schema change, the ticket must say so and the engineer decides whether to accept it.

Below is a ticket from November 30 that fixed a database deadlock. The description covers the cause, the fix, the pull requests included, and the pacing:

An AI-drafted change ticket, CHG-20261130-ZISE: the description covers the deadlock cause, the fix, the pull requests included, no DDL or config change, and a 10-minute watch on the first batch of instances

An excerpt from the same ticket's rollback plan, translated:

Stop-loss conditions (any one):
  1) Any new instance restarts, or a panic appears
  2) Service ERROR logs per 10 minutes exceed 2x the pre-release baseline
  3) Any ERROR log related to the new lock statement
  4) API p99 above 200 ms for 10 consecutive minutes (baseline about 100 ms)
  5) A new self-monitoring alert related to this service
Action: roll back immediately on 1 or 3; otherwise pause the rollout, find the cause within
        15 minutes, and roll back if this change caused it.
Rollback target: the current production image (the ticket names the exact version).
Fully revertible: no data written in a new format, no DDL.

From September 23 to November 30, AI drafted 1,018 change tickets. We measured them alongside the 505 tickets people wrote in the 10 months before:

Per ticketWritten by people (505)Written by AI (1,018)
Description (median)14 charactersabout 830 characters
Execution steps (median)15
Checks (median)27
Rollback plan (median)29 charactersabout 300 characters
States a stop-loss condition45%99%
Names the version to roll back to79%93%
Links a pull request50%79%

Lengths count Chinese characters, since our tickets are written in Chinese. In the tickets people wrote, the median description was 14 characters and the median rollback plan was 29, and more than half did not say when to roll back. This is what the second problem from the introduction looks like in data.

The AI-written tickets without a pull request link are mostly operations that change no code, such as config changes, database maintenance, and alert rule updates. They go through a ticket as well.

How AI rolls out and rolls back

The engineer reads the ticket, can edit steps and add or remove checks, and then approves it. Before approval, AI performs no write operation other than the build. After approval, AI executes the ticket.

Pre-production first. AI deploys the new version to pre-production and goes through the checklist. For changes that affect pages, AI operates them in a real browser, in Chinese and English and in light and dark themes. The results go to the engineer, and the change moves to production only after the engineer confirms.

Production in batches. A small share of instances run the new version while the rest stay on the old one. The default watch is 10 minutes. If nothing is abnormal, the rollout continues.

A background watcher runs throughout. Before the first write operation, AI starts a watch task and records the baseline at that moment. It reads alerts every 60 seconds and the stop-loss signals named in the ticket every 2 minutes, and notifies AI as soon as a new signal appears.

Tripped signals are handled in two ways. If a new instance restarts or crashes, AI rolls back immediately and reports to the engineer afterwards. If error logs increase, latency rises, or a new alert fires, AI pauses the rollout and has a fixed time (10 minutes by default) to determine whether this change caused it. If it did, AI rolls back.

Because the rollback target and operation are already in the ticket, the rollback itself is quick. While the rollout is paused at the first batch, the old instances are still running and we measured no wait. After a full rollout, rolling back a service with 2 replicas took 26 seconds.

When several people release at once, AI checks for conflicts first. Before each action, AI checks whether someone else has a change in progress on the same service and whether production is still on the version it saw when drafting. If either check fails, it stops and reports. It does not overwrite a version someone else just shipped.

During execution AI ticks off each step on the ticket as it finishes, with the operator and the time. Every status change of a ticket, including submitted, in progress, done, or failed, is pushed to the engineering chat. Without opening any page, the team knows which changes are running in production at that moment.

The Flashduty change list: production changes from the last two days, each row naming the service, the change, and the PR number, with a status of in progress or done

Is it safe to let AI do this

This was the question we asked ourselves most before starting. We describe where people stay involved first, and then the evidence we have so far.

People always decide the following:

  • The content of the ticket: scope, pacing, and rollback plan.
  • Whether to move from pre-production to production.
  • Write operations such as schema and config changes. AI shows a dry-run result first and executes only after a person confirms.
  • Checks marked as manual, and whether to accept a release that cannot be fully reverted.

AI's decisions all come from the release runbook. Every rule in it states a criterion, for example "roll back if a new instance has restarted even once". Only when rules are written to that level does AI make the same call an engineer would when nobody is watching. Problems that people have found in pre-production are added to the runbook after the fix and become checks for every later release.

On evidence, we want to be clear about one thing. With 10 times as many releases, we do not yet have a statistically meaningful number for whether change-caused incidents went up or down. Such incidents were rare to begin with, and two months is too small a sample. We would rather not argue from a handful of cases.

One thing we can say for certain. Across more than 1,000 changes in these two months, no incident was caused by AI making an operational mistake during a change, such as deploying the wrong version, skipping a step, or failing to roll back when it should have. On execution alone, AI following a ticket has been more accurate than people working by hand.

What we can state are facts that can be checked. A release went from a batch of features to one or two pull requests, so when something breaks there is no need to work out which change did it. 99% of tickets state a decidable stop-loss condition, and the watcher checks those conditions every 2 minutes whether or not a person is looking. A rollback executes an operation already written in the ticket, and we measured it at under half a minute. Each of these directly shortens how long a bad change affects users.

Who else reads the ticket

Another benefit of a well-written ticket only shows up during an incident.

At 00:21 Beijing time on November 30, the PostgreSQL database that stores our alerts reported a deadlock. We opened the Changes tab on the incident and chose "24 hours before trigger":

The Changes tab of incident 341ACF: the two changes completed in the 24 hours before the trigger both touched the Monitors collection sidecar, and neither touched fc-event, the service that writes alerts

The two changes completed in that window both touched a collection component of another service. Neither touched the service that writes alert data. Within minutes we could rule out the most common suspicion, "was it the release we just did", and look elsewhere. The root cause turned out to be the partition-creation job that runs early every Monday.

AI SRE reads the same record when it investigates. It queries changes from 24 hours before the incident started to 1 hour after, and checks each one against the symptoms. When a ticket says which service changed, which pull requests it included, and how to roll back, AI SRE can state which change is related and how to revert it. When a ticket only says "update image", it has to read the code, the same as a person would.

This rests on two conditions. Every change has a record, including operations that ship no code, such as config changes. And every record says what changed and how to undo it. The first comes from process. The second used to depend on each person's discipline, and AI now guarantees it.

If you want to do the same

In our experience the order below works, and each step pays off on its own.

Record every change first. The records do not need to be detailed at the start, but they need to be complete. Flashduty supports 39 change sources, including Jenkins, GitHub, GitLab, and Argo CD, and accepts pushes through the custom change event API. Once connected, each incident lists the changes before it, and AI SRE reads them during investigation.

Then let AI draft the ticket and have people review it. Write your team's requirements for a ticket into a document: how scope is determined, how checks are written, and that stop-loss conditions must be numbers. This step involves no production operation, so it carries the least risk, and the change in ticket quality is visible right away.

Let AI execute last. The precondition is that tickets are detailed enough to follow step by step and the rollback plan has been verified to work. Start with pre-production, keep human confirmation for production, and relax it gradually as the rules accumulate.

What change management requires has not changed: think the change through before making it, and leave a record after. Both used to take engineers' time, so they were often incomplete. Now AI does them, and they get done for every change.

Related articles

Less noise. Faster recovery.

Start free, no credit card required. Or book a demo to see the full incident workflow end to end.