AI agents run our release train: the gates in front of them
By Otto van der Schaaf, We-Amp ·
Between 19 October and 23 November 2026 we published ten releases of mod_pagespeed, from 2.5.0 to 2.10.0. AI agents wrote the changes, the tests and the release notes, and reviewed the code. We-Amp is one person. A person approves the signing and publishing of every release; agents do everything else, including site deploys, behind automated gates. This post describes those gates, some of what an agent may not do, and the failure behind one of the gates.
What the AI agents do, and what a person does
AI agents write the code, the tests and the release notes, and they do the code review. Reviews use multiple independent lenses using top-tier models. A review can stop a change. It cannot clear a release gate.
Scripts decide the gates: whether the tests passed on the exact commit, whether the bytes match, whether a pull request really merged. A person approves the signing and publishing of every release.
About a thousand pull requests merged in those five weeks, across mod_pagespeed and pagespeed-optimizer. No person reads every diff. Each change passes automated gates and independent agent review; the owner reviews critical or challenging changes and approves what gets signed and published. The agents flag a change for the owner when it touches security, release signing, licensing or the guardrails, or when the reviews disagree; the owner can also pick any change.
Start from what cannot be undone
Before deciding what an agent may do, we wrote down what each release step can and cannot take back:
| Step | Can it be undone? |
|---|---|
| Pushing a NuGet package | No. nuget.org never accepts the same version number twice, so a wrong push burns the version. |
| Publishing a module release | No. Once the files are public, people download them. |
| The signed source tag | No. It is public and signed. |
| Deploying the website | Yes. An earlier version can be deployed again. |
The “no” rows are signing and publishing, and those wait for a person. The website deploy is in the “yes” row, so an agent runs it behind automated gates. A mistake there costs a redeploy. A mistake in a “no” row costs a version number, or a file people have already downloaded.
The same two questions sort the rest of the company’s agent work. Can the action be undone? Can a script check the result before it happens? A reviewed merge can be reverted until it ships, so an agent may merge, and the release gates sit between a merge and a user. A message to a customer cannot be taken back, so an agent drafts it and a person sends it.
A few examples of what an agent may not do
These are examples, not the full list. Each is held by one of three kinds of control: a platform setting, a check that refuses the agent’s action before it runs, or a written rule.
- Sign or publish a release (platform setting). Those jobs wait in a protected environment for a person’s approval (the release environment).
- Queue a pull request from a fork (a check or a written rule). A maintainer reads its full diff first (CONTRIBUTING).
- Send a message to a customer (a check that refuses it). An agent drafts it, and a person sends it.
- Print a secret, or change a primary checkout (a check or a written rule).
- Change its own guardrails unnoticed (a check that refuses it). A change to a guardrail fails a check in CI until it is deliberately recorded, and it goes through the same independent review and checks as any other change.
- Turn a red check green without the fix (written rule). A check that is skipped is recorded as waived by the owner, in the owner’s own words and with the date.
Only a script or a person lets a release through
A model’s review is useful and inconsistent. Two runs of the same review can disagree, and a review can miss what the next one finds. So a model’s verdict is never the last check before signing and publishing. It can raise a problem. Only a script or a person can let a release through. The same rule is stated for users in how mod_pagespeed’s work is checked.
Build once, sign what was tested
The module release builds its packages once, from a named commit, as a candidate build. That build is sealed: every file and its hash are recorded. Since 2.8.1, the release tag names the sealed build, and the real release run takes over those files and signs them instead of building again (how adoption works). The one exception is the Windows installer, which the release builds again around the sealed binaries and then signs.
The release refuses to take over the files if any of nine checks fails. Among them: the tag points at another commit than the one built, the candidate is older than three days, it was started by someone not allowed to release, or a single file’s hash differs from the seal. A refusal stops the run before any approval is asked for. Nothing is signed or published.
The approval has something to check. Each signing job’s name carries the run, seal and checksum hashes of the adopted build, so the person approving can compare them with the three Release-Candidate-* lines in the tag. On 2.10.0 one of them reads Release-Candidate-Run: 45213227130.
Before the tag, the full test tier, sanitizer builds included, has to be green on the release commit (the CI gates). Every Saturday at 06:30 UTC the release lane also runs as a rehearsal on the current code, with everything except signing and publishing, so a broken step shows up days before a release does. A red rehearsal opens an issue (the weekly rehearsal).
Anyone can check the result: the security policy lists the commands to verify a release’s checksums and signatures.
What went wrong
This lapse happened on a real release, and it left a gate behind. Our agentic engineering record goes back further than our public release record, which starts at 2.5.0. The failure here is the one on the public record; the nightly run, the fix and both releases are public in the pagespeed-optimizer repository.
2.9.0: agent-written code that reached users. The regression was in code an agent wrote and agent review passed.
- On 17 November at 03:47 UTC, the pagespeed-optimizer nightly failed on commit
d9996050d, including its browser test job (run 44012605598). - At 09:21 UTC, pagespeed-optimizer 2.9.0 was published from that same commit. It had a regression in the pagespeed-optimizer console and workbench: on an nginx site, clicking a URL in the URL Inspector showed “No alternates found”. The mod_pagespeed admin console was not affected.
- The fix (#853) merged at 10:54 UTC. pagespeed-optimizer 2.9.1 shipped it on 18 November at 13:37 UTC, and the container images got it with their 2.9.2 release.
- Now the latest nightly of both repositories must be green before any tag, or each red job must be looked at and the reason written down.
It reached people outside: users of pagespeed-optimizer 2.9.0 had the console regression until they upgraded.
What this does not cover
- One product line, one owner, a short record. Our public release record starts at 2.5.0, in October 2026. We have not run this method on a large team, and we do not know how it changes with ten people approving instead of one.
- Judgment stays human. A person approves what gets signed and published, reviews critical or challenging changes, and sends every message to a customer. The gates do not help decide what goes into a release.
- Checks catch what they test for. A test that passes on a short run can fail on a long one: our seccomp soak passed, then Chrome called mincore.
- No speed claim. We have not measured how fast this is against a team without agents, so we do not compare.
- No cost or failure-rate figure. We have not added up model and CI spend per release, or counted reverted changes, in a form we would publish.
For what this means for people who run mod_pagespeed, see why our releases have more gates now.
Guardrails for your own AI agents
The method fits on one page. List every action your agents can take, mark which ones cannot be undone, and make sure each of those has a script or a named person in front of it. The work is in finding the actions that today rely on an agent remembering an instruction. That is where we start when we work with a team.