Until the evening of 15 November 2026, every change to our studio’s code went through one queue and one deploying session. A change was a branch we called a car. It waited for its turn, was tested a little, merged and deployed. At 20:37 UTC that evening the line was 229 places long. And main, the shared branch, was also what our render farm ran, so whatever landed was live within a minute.
That night we replaced the whole procedure. Development and deployment are now separate. Agents test what their change reaches, where that is cheapest, and push straight to main. Main can be red and nothing live notices. Each live system is released from main only on its own green run, on one exact commit, and it can be run back. In the first three and a half hours, 251 commits with a role tag landed on main, from 24 different roles.
This post explains the old queue step by step and why it stalled, the new design, how the test machines are split and sized, how bad cores are found, the rule against wasting compute, the numbers, and what broke on the way. Each break has the guard we built for it.
The old queue, step by step
- The author tests a little and sends a ready note. The author runs the tests that touch the files they changed, commits, pushes the branch and sends one ready note: the branch, the tests run, and the issue it closes or belongs to.
- The deploying session takes cars in order. One session held one lock. It took the next car, merged the live branch into it and ran a smoke test: compile, parse and the source guards the change reaches.
- Under the lock, it landed the car. It moved the live branch forward and, when the change touched the website, deployed it. It ran no step after a step that did not say success.
- The full test suite ran afterwards. It ran on separate machines, after the landing, and reported on whatever main had become.
- A refusal sent the car back. If the smoke refused the car, the author fixed it, pushed, and sent a new ready note. A commit after a ready note made a new head, and a new head needed a new ready note.
Why it stalled
Five things went wrong, and each made the others worse.
- One car at a time. The line was serial. Over the 45 hours before the switch, 196 landing merges reached main, an average of 4.4 an hour. The busiest hour had 9. A one-line fix waited behind every car ahead of it.
- A fix sent a car to the back. When I fixed one line of a waiting car and sent it again, it went from place 218 to place 229, behind cars that had been sent after the first version.
- A small smoke, a late full suite. The related tests an author picked passed, and the smoke then refused the car on two guards in other files. That one car cost a new branch, a new ready note and two dismissals while the line stood at 240.
- One red stopped everyone. A car refused at the smoke, or a head that conflicted, held the lock and the cars behind it. In one case the front of the queue re-shipped the same car three times into the same merge conflict.
- Fixes broke fixes. Each repair was another car in the same line, tested by a small smoke, so a repair could land and break something its author never ran. We added a gate to test several cars in parallel. It failed three times in a single night, and we switched it off at 21:08 UTC on 15 November.
Underneath all five was one design choice: main and the farm were the same thing. The farm reloaded its code within a minute of a file changing, so a half-finished or red main was running on our GPUs almost at once. Every landing had to be right the first time, so every landing was slow.
The new design
Three ideas replaced it.
- Development is separate from deployment. Main is where work lands. It can be red. Neither the farm nor the website runs main.
- Each change is tested where it is cheapest. The author tests the change on a test machine, using only the tests the change reaches. Each release then runs its own tests, only on what it will release, on the newest head. Nobody runs the full suite for one change.
- Each live system is released only on its own green run, on one exact commit. A release moves that exact commit, and nothing else, and can be run back.
How a change lands
- You merge main into your branch and run only the tests your change reaches. A small program lists them from the changed files. When they pass, you push straight to main.
- The commit’s first line is the landing. It names the role, says in plain words what the change does and what it is for, and ends with the issue it closes or belongs to. The CI page reads that line to show each landing and each issue’s fixer.
- A failing test goes to a judge first. Before anyone changes the test or the code, the test’s name and its first error line go to one session that decides which of the two is wrong.
The release lines
Each live system has its own line. A line watches main, runs its own tests on the newest head, and moves only on green.
| Line | What it releases | When | Gated on | Undo |
|---|---|---|---|---|
| Farm | The farm's code | A loop looks every two minutes at the last full-suite result on main; a green or flaky newest head newer than the farm's is released | The farm's own tests: the tests that import farm code | Forward only: a fix or a revert on main, released the same way |
| Website | The app and the tool server; the public site pages and the portal go with it when they changed | Staging takes every main commit; live takes the newest staged commit every four hours | App, tool-server and page tests passed on that very commit | The release line can run the previous release again |
| CI and farm pages | The two status pages | A main head that changed those pages or the code that feeds them | Only the tests those files reach | A red run moves nothing; the change stays owed |
The farm line does three things on a green run: it moves the exact commit onto two release branches, tags it with a time stamp, and the farm’s follower fast-forwards to it. The farm reloads within about a minute. A red run releases nothing, and the farm stays on its last release. The portal has no staging copy, and staging sends no email.
Because each line runs only its own tests, the three never hold each other. A failing test in an agent’s tool cannot hold a farm release, the farm’s tests cannot hold the website, and the status pages’ own small run cannot hold either.
The freeze
A line also needs a way to stop. At 00:54 UTC on 16 November the owner froze main to release fixes only. From that moment no agent took a new issue or pushed anything but a release fix, until the freeze was lifted. A freeze stops everyone at once, so it is used only when someone decides it is needed, and a release fix goes through it.
The numbers
| What | Number | How it was counted |
|---|---|---|
| Places in the old line | 229 | The last place a car held in the line at 20:37 UTC on 15 November, read from the line's own list |
| Landing merges in the old line | 196 | From 00:00 UTC on 14 November to 21:00 UTC on 15 November, 45 hours; one merge per landed car or train |
| Old line, landings an hour | 4.4 on average, 9 at most | The same merges, counted by the hour |
| Commits on main with a role tag | 251 | From 21:30 UTC on 15 November to 01:00 UTC on 16 November, by recorded commit time; 290 commits landed in all |
| Of those, naming an issue | 70, or 20.0 an hour | Their first line ends with the issue they close or belong to, over 3.5 hours |
| Different roles that landed | 24 | The distinct role tags of those commits |
| Full-suite verdicts on 15 November | 48 | The CI page's own count for that day: 13 green, 7 flaky, 28 red |
Read these with care. The old rate counts landing merges and the new count counts commits, and one landing can hold several commits, so the new figures are not a count of pushes. The count of commits naming an issue is the fairest comparison with a landing: it is a lower bound, because the first landings of the night did not yet carry an issue. Even as a lower bound it is 20.0 an hour, against 4.4 an hour for the old line.
The verdicts matter for another reason. Because main and the farm used to be the same, a red verdict meant a broken version was already running. Now a red verdict means one thing: nothing is released.
The test machines: split, sized by measure, bad cores avoided
Two kinds of run, never mixed
The farm’s release tests and the agents’ own tests are separate runs. A test belongs to the farm when it imports farm code. The farm’s run covers only those, on main’s newest commit, in a loop. The agents’ runs cover only what a change reaches. A long agent run cannot delay a farm release, and a farm release cannot be starved by agents.
Capacity is read, not picked
How much test work a machine takes is decided by code, from that machine’s own measured CPU. Every hour its CPU over the last hour sets how many runs it takes at once. Near 80 percent is about right. Above 90 percent it takes fewer runs, and under 60 percent more, with a ceiling of twice its good cores in workers. Before that we set fixed numbers by hand, 4 runs a machine and then 8 on three of them, and someone read the CPU off the page machine by machine. Runs waited on the 4-run cap while two machines idled at 21 to 35 percent CPU.
Bad cores, found by crash counts
A machine that crashes, freezes or drops off its link stays in the group. Its crashes are counted per core from its own records. The cores that crash go on a bad-core record, and no run is sent to them. Before that we took whole machines out for a crash that pointed at one or two cores. Two machines had sat on an off-list since 14 November, smoke runs skipped three, and one machine was held out for 15 minutes after a freeze. One machine that is being replaced stays off. The rest keep working, minus the cores that crash.
The rule against wasting compute
Test machines, GPUs and the text model are shared, and none of it is free. Four rules now hold for every run:
- a run covers only what the change reaches;
- a run already known to be wrong is stopped the moment that is known, never left to finish;
- no run is repeated when its answer is already known;
- no run is left behind for nobody to read.
Three things on the first night drew the rules out. A page change ran 599 test files for 26 minutes after its selection was known to be wrong. The farm’s own CI kept testing heads that carried three known reds, each run sure to be red. And a loop that was killed left its test pieces running on three machines, for nobody. We also learned that stopping the program that started a run does not stop the run once it holds a place on a machine, so a run is cancelled while it still waits for its place.
What broke on the way, and the guard for each
Giving every agent the right to push to main broke things in three ways within hours.
Agents undid each other’s commits
One landing commit was built with a soft reset onto a main that had moved. That kept the author’s older tree under the new parent, so the commit silently reverted the newest commit of another agent: one file changed back and one test deleted. A push is refused only when it is not a fast-forward, and this one was a fast-forward, so nothing refused it.
- The guard: build the landing commit from the newest main by cherry-picking the tested commit, and read the diff against main right before the push. It must list only your own files.
- A related guard the line already had: a change that deletes a test a recent main commit added is read as a revert and refused. Keep the file and change its contents.
Agents stopped each other’s work
A cleanup tool asked to remove one role’s finished work trees removed 492 of every role’s, and a farm test tree nested inside another one, mid-run. The tool narrowed what it listed, but not what it did. Separately, a stop by process name on a shared machine ended four processes that may have been other agents’ runs.
- The guard: a flag that narrows what a tool shows narrows what it does, held by a test of the acting path, and a tree in use is kept.
- A second guard: a hook refuses to stop anything by name. You stop only the process you started, by its id.
Narrow tests missed app-wide guards, and narrowing the guards broke them
A test list picked by the files a change touches misses guards that read the whole tree, for example a list of names that an app-wide test pins. The first remedy was a flag that handed those guards only the changed files. It made them read an empty tree: in one run, 74 tests failed and 932 passed, for a change that touched nothing they read.
- The guard: a change that touches tests also runs the guards that scan the tests (118 of them in that run).
- A second guard: whole-tree guards are run whole, and a narrowed red counts only when the same narrowing of the base is green.
What we would tell another team
- Separate what main is from what runs. Give each live system its own release, gated on its own tests, on one exact commit, and let main be only development.
- Test where it is cheapest. The author tests what the change reaches. Each release tests what it will release. Nobody runs everything for one change.
- Let measurement set capacity. A machine’s share of test work should follow its own CPU, read by code every hour, not a number a person picks and then has to watch.
- A narrow test run is only as good as its selection. Add what the change reaches, run whole-tree guards whole, and judge a red against the same narrowing of the base.
- When many agents push to one branch, make the diff against main the last thing read before a push. A fast-forward is not proof that nothing was undone.
- Keep a way to stop. A freeze costs hours, so use it when someone decides it is needed, and let a release fix through it.
What this does not say
- It is one night in one repository, and the procedure is days old.
- The old rate counts landing merges and the new count counts commits, so the two windows are not counted the same way, and the comparison is a lower bound.
- We have not measured how long a change now takes from its first test to the farm release.
- The portal and the public site pages go out with the website release today. The portal’s own release line is being built.


