A record of our merge queue as it ran from November 3 to 17, 2026, written on November 17. We retired that queue on November 19. Since then our pull requests land on signed evidence, and a ring tests each new head of main after it lands. Numbers below describe the queue during that window, not anything running today.

One day a runner-image rebuild broke every build in our merge queue. The fix sat 89 minutes in that same broken queue. main's code was fine; the path to main wasn't. Our median pull request took 248 minutes to merge that day. The job is to ship quality code while main stays green and deployable. As agents write more of it, the path to main is where that job gets decided.

The rest of this post compares two ways to get changes onto main: a central merge queue, and agents that claim footprints (the files and modules a change touches) and coordinate their own landings. Agents only come out ahead when work can fan out. If every change touches one module, coordinating agents stack into a queue of their own.


How to read every number in this post

"Measured" means our repository's history, November 3 to 16. "Model output" means a simulator fed our measured failure rates: no real code failures in the queue and about 1.9% infrastructure failures per completed build. Every simulated number uses that measured-failures scenario, except one chart with generic inputs (4.6 and 8.7-minute checks, 5% failing).

Your queue tests everything twice, in series

A queue tests every change on top of everything ahead of it, so its speed is its validation time, however many people are waiting.

You run a queue because changes that pass alone can fail together. Shopify described it in their write-up on merging work from 1,000 developers. The fix tests each change on top of everything ahead of it, so each result depends on the one before. Speculation runs those tests in parallel, but the dependency caps your gain.

Uber's SubmitQueue paper works out a bad case. Each test takes 30 minutes, and you test one change at a time.

At 1,000 changes a day, the last change waits "over 20 days."

Your agent already ran the tests before it opened the pull request, and the queue runs them again, one change at a time. That is the same limit as one line:

λ ≤ (60 / T) × min(M / r, S)

λ is merges per hour. T is the critical path of one test run, in minutes, from start to verdict. M is the number of runners. r is how many test runs a landed change costs. S is how many changes can usefully be in flight. For agents, S counts independent work streams. A work stream is a stream of mostly non-overlapping work. Its changes rarely touch the same code as changes in any other stream, so we can build, test and land them side by side.

The speed limit, in plain words: each hour you can land at most 60 times the number of changes you can usefully test at once. Then divide by the minutes one test takes from start to verdict. Diagram titled the collapsed math. The queue's terms (builds C, batch B, efficiency η, failure rate p) reduce to S for a queue. The agents' terms (work streams k, claim gap L) reduce to S for agents. Machine-minutes reduce to M over r. All three feed one line: 60 over T times the smaller of M over r and S.


Show the algebra

Machine-minutes. Let A be the runner-minutes one landed change consumes, counting a run shared by a batch once. M runners supply 60·M runner-minutes an hour, so

λ · A ≤ 60 · M

Runner-minutes A aren't elapsed time. T is critical-path time, which can include waiting that occupies no runner, and a run with parallel jobs occupies several. Suppose each run holds one runner for at least T minutes. Suppose also each landed change has at least r runs credited to it alone. A run validating a batch counts once, not once per change. Then A ≥ r·T and this becomes λ ≤ (60 / T) · (M / r). Hardware enters through M.

Work in flight. Little's law says N = λR / 60: N is the average number in the system, λ changes an hour, R the average residence in minutes. Every landing spends at least T minutes in the system, so R ≥ T and N ≥ λT / 60. If the system truly caps occupancy at S, then λT / 60 ≤ N ≤ S, so

λ ≤ (60 / T) · S

For a queue, S is a real cap: B·C slots. B is the number of changes per build, and C is the number of builds. For agents, it is the number of work streams, a property of the code. λ sits under the lower ceiling.

A merge queue is the special case of agent coordination where every change counts as overlapping every other. We proved the deterministic core in Lean 4, a proof checker: 126 theorems with core axioms only, in formal/merge-queue-speed-limit on GitHub.

Try this: drag "T, mean minutes per check" from 5 to 10 and watch the queue's ceiling halve. Then raise "C, builds at once" and watch it climb.

λ ≤ (60 / T) × min(M / r, S). Doubling M doubles the machine ceiling. In the fixed-r, fixed-S model, halving T doubles both ceilings. Raising S helps only until M / r is the lower term.

When our queue jams, the fix has to go through the jam

A CI change, not load, caused our worst day, and the fix had to wait in the broken queue.

Waits on three days tell the story. The slowest day was not the busiest day. On November 14 a runner-image rebuild broke every build in our merge queue, and the queue was 88% of the longer wait.

Bar chart of median wait from add-to-queue to merged, measured. November 3: 15 minutes with 108 merges. November 14: 129 minutes with 155 merges. November 16: 27 minutes with 231 merges. The slowest day was not the busiest day.

A normal day, November 3, took 31 minutes at the median to merge a pull request.

Picture the page nobody wants. CI changes and nothing merges. The fix is ready but sits in the queue it is meant to repair, the 89 minutes from the top of this post. If you change CI, you change the queue's capacity, and you do it at full traffic.

Tuning your queue buys constants

Every knob you can turn buys a constant factor, and none of them removes the second test.

Jane Street's Yaron Minsky said such tricks "tweak the constants, but don't change the asymptotics." We turned every knob. More builds at once is speculation: it tests each entry on top of the ones ahead, betting they pass. Each extra build adds less than the one before. In model output with generic inputs, the second build adds 72% of the first build's throughput and the eighth about 39%. Those inputs illustrate and don't reproduce our scenario.

Bar chart, model output, generic inputs, throughput added by each build as a share of the first build's throughput. The second build adds 72%. The fourth adds about 49 to 50%. The seventh and eighth add about 39%. The thirteenth through sixteenth add about 20%.

Batching and reuse help too. Faster runners help only the compute share of T. Waiting for a runner stays in T, and a build in our queue waited a median 7.7 minutes for one. Every knob buys a constant, and the second test stays.

Even a tuned queue pays for the same answer twice

The second test is the part of your runner bill that decides nothing new.

Our queue spent 507 runner-hours over four weeks. About 277 of them re-decided what the signed run had already decided, apart from interactions across pull requests. That's your runner bill, spent twice.

Your agents already ran the tests, so test once and coordinate on what you touch

Your agent already runs the tests, so keep that run, sign it, and stop paying for the same answer twice.

Your agent already runs the tests before it opens anything. On most teams nobody keeps that run, so the same tests rerun on the pull request and again in the queue. We keep ours. In November our pull request check ran no tests, only a five-minute check that the agent's signed run existed. The queue still reran them.

The redesign has three parts, and each moves a term in the line:

1) Test once, in the agent's loop. Record the run as signed evidence with CI/lock, our open core attestation tool. The gate verifies it instead of rerunning it. This moves r.

2) Coordinate on footprints. A footprint is the set of files and modules a change reads and writes. Agents claim theirs, stack on overlapping work in flight, and rerun only if what they stacked on fails. This moves S.

3) Land on evidence. A change merges when its signed run verifies against the policy on main and nothing overlapping has landed since its base.

Does part 1 pay? Here's test compute per merged change, measured. A mint is one signed run of the test ring, the set of test suites every change must pass, recorded as evidence.

Bar chart, measured, test compute in machine-minutes per merged change. Agents' signed runs (local mint) 34. Merge queue 82, of which 23 are the test ring and the rest builds. Post-merge and nightly about 38. Actions history covers November 14 to 16, mint records November 3 to 16.

The Actions history covers only November 14 to 16, including the jam day.

Mint records cover November 3 to 16.

About a third of our test compute re-ran content a signed run had already passed, over half counting queue builds. None of 30 sampled queue failures were real code failures.

On the same 14 runners, three designs land very differently

With the same runner budget, stacking agents out-land the tuned queue, and signed reuse would widen the gap, if it were built.

Does the redesign win on equal compute? We simulated 14 runners with the same size and price, in the measured-failures scenario (model output). This is an equal metered-runner budget: we charge the pull request and queue runs, and the agent's own local run is free.

Bar chart, model output, 14 runners, merges per hour at equal metered-runner budget. Tuned queue 45.5. Stacking agents 57.0. Stacking agents with signed reuse 81.7, which assumes agent-side reuse that is modeled, not built.

The signed-reuse bar is modeled, not built. How far agents fan out depends on your code: if one module takes most changes, stacking agents behave like a queue. The appendix shows how we charged each side.

Testing the formula on real GitHub runs

We wrote down our predictions before running anything, then checked them against real GitHub runs. Chart, measured on real GitHub, 4 runners, 2-minute test. Sealed 90% prediction bands against measured landings per hour. Merge queue all-green: predicted 38 to 56, measured 56.6, just above. Merge queue head-green: predicted 52 to 92, measured 58.6; runner-minutes per change 4.04 against a predicted 2.4 to 3.7, a miss. Agents landing on evidence: predicted 107 to 129, measured 126.1. Same module on 4 runners: predicted 19 to 28.5, measured 22.1. Same module on 8 runners: measured 21.9.

Same machines, same two-minute test: agents landed more than twice as many changes an hour as GitHub's merge queue, for half the runner time. Then we doubled the machines on a single module and nothing moved. That's the whole argument in two rows: runners only help once your work can fan out.

Both of our misses were queue predictions, and we'd rather show you. The all-green queue ran a hair over its band because GitHub started jobs faster than we assumed. The head-green queue never batched: GitHub built all 40 changes one at a time, so it cost as much as all-green.

Method: we sealed the predictions by hash before any run, and the harness never saw them. Both designs ran on the same capped runners, with GitHub's real merge queue as the baseline. Job start took 2 seconds or less during our runs, a condition of this experiment and not a general finding. The harness, predictions and results are public, so you can run the same head-to-head on your own repository.

We also built the landing step as a GitHub Action in a public repository, testifysec/agent-coordination-demo. An agent changes a module, tests it under cilock run, publishes the signed evidence and pushes, with no merge queue and no CI test run. One ready pull request went from opened to merged in 21 to 28 seconds. When two pull requests touched the same module, the Action merged the first and refused the second (first run, second run).

Run summary for the refused change: workflow land-on-evidence.yml, status Failure, total duration 24 seconds, plan job 7 seconds, land job failed, annotation reads PR #51 overlapping change landed since base (m21); re-run on the new base or stack.

Evidence proves a change passed its own tests, not that the combination is green, so a post-land check runs the full suite on main. It caught a breaking pair that passed alone, bisected to the culprit and opened a revert pull request. We started the check and signed the revert by hand, and main was green about 3 minutes after it went red (run).

Log of the post-land run: test step 19 seconds; api package failed TestDescribeIsStrict while the other 32 packages passed; main is RED at c166c17e85, bisecting; first bad commit is the merge of pull request #56; revert pull request 57 opened.

The price: you have to trust your agent's tests

Move the tests and you move the trust: "the agent says the tests pass" is a claim, not a result.

Your CI pipeline is a machine you own. An agent's loop is a laptop or sandbox you didn't provision. A model drives it, and that model can be prompt-injected, edit the tests it must pass, and report success whether or not anything ran.

So before you trust an agent's test run, ask:

Question What answers it
Did the tests actually run? a signed record of the command and its exit code, not a chat message
On which code? evidence bound to the exact commit and tree
By whom, on what? a verifiable identity for the agent and the machine, not a shared token
Were the tests the tests? the test files and their inputs are part of what the record covers
Is a rerun until green a pass? not answered by one record; we haven't shown the gate sees earlier attempts


What a signature does and does not prove

A signature authenticates a statement. It doesn't alone prove the signer ran the approved tests honestly or captured every input. That moves your trust boundary onto the agent's machine. Test-once is safe only if the tooling there records what actually ran and a person approved the signing identity. The policy on main must name the tests and inputs that count, and the evidence must bind to the exact tree. The Lean model takes the evidence's honesty as a hypothesis.

The gate enforces something narrower. Pushgate refuses a commit unless a signed record from CI/lock names that exact commit and an agent identity a person approved. It uses cilock verify to check the record against the policy on main. On November 17, Pushgate refused one of our own pushes, a one-line change to a queue setting, because no signed record named that commit. It went through once the agent produced the evidence.

Staying deployable means testing before you land

Independent runs cannot establish that two changes are correct together. Only a test of the combined tree can. A queue runs it before landing, and landing on evidence runs it after. You trade pre-land assurance for throughput and faster recovery, on purpose. In our history the trade is small: 3 confirmed breaks across pull requests in about 1,250 merges over four weeks.

That is a 0.24% break rate, so the plan, as of November 17, kept a combined check on main that bisects to the culprit and opens a revert. The demo's post-land check was its first form; in our own repository that check did not exist yet.

If you need a green tip a fraction g of the time, landing first has its own ceiling: λ ≤ −60 · ln(g) / (b · t_r). Here b is the share of changes that break when combined with others, and t_r is the minutes from break to revert. The appendix has the arithmetic. Formula output, not simulation:

main green 90% of the time Changes an hour you can land
b 0.24% (our measured break rate across pull requests), t_r 15 minutes about 175
b 0.1%, t_r 15 minutes about 420
b 0.1%, t_r 5 minutes about 1,260

If staying deployable is your goal, test before you land. Run a combined check on changes whose footprints touch, land disjoint changes on evidence, and keep the post-land check as a backstop. Our read: Anthropic's monorepo made the same trade, dropping its queue and investing in post-merge and pre-deploy automated testing.

Trying it on your own repository

If you want to try this, pick one repository your agents already work in.

1) Record your agents' test runs with CI/lock. Have each agent run its tests under cilock run. The run it already does then becomes a signed record of what ran, on which commit, as which identity. Start with the first attestation guide.
2) Add the land-on-evidence Action from testifysec/agent-coordination-demo. A change that carries passing evidence, with nothing overlapping landed since its base, merges without running the pipeline again. The post-land check still catches changes that break each other.
3) Run the same head-to-head on your own runners. The harness is published in testifysec/agent-coordination-demo, so you can check the prediction against your own queue.
4) Measure before and after. Merges an hour, runner-minutes per landed change, and time from a break to its revert. Then you'll know which term in the line binds for you. If M / r is the smaller term, hardware or reuse is the lever. If S is, look at fan-out. If one module takes a quarter of your changes, expect about 4 work streams.

The demo repository has the agent coordination skill, the evidence gate workflow, the land-on-evidence Action and the repository settings for steps 1 and 2.

Pushgate is the hosted form of the gate: it checks the signed record on every push and refuses what it can't verify. The TestifySec Platform behind it issues the signing certificates and the agent identities a person approves, so you have no keys to manage.

You can also do all of this yourself. CI/lock is open source under Apache 2.0, and it signs with a plain key pair. The agent signs its run with cilock run -k and its private key. The gate verifies it with cilock verify against the public key. Run that check in a server-side git hook (pre-receive) or a required CI check, which is what the demo repository does. A client-side hook isn't a gate, because the author can skip it.

Appendix: data and methods

The sources behind the claims above, in the order you meet them. Nothing here is needed to follow the argument.


Show the data and methods

The numbers behind the jam chart

Our repository merged 2,331 pull requests from November 3 to 16 (UTC): about 6.9 an hour, or 165 per calendar day. On November 16 we merged 231 pull requests, 49% more than November 14's 155, and waited a fifth as long. Completed merges aren't offered load, since congestion suppresses completions, so that's a hint, not proof. Lead time from opening to merging: 31 minutes on November 3 (57% in the queue), 248 on November 14 (88%).

The last 1,000 queue runs, and a build's wait for a runner

Our last 1,000 queue runs (November 14 at 16:20 through November 17) straddle the incident:

Queue runs During the incident, November 14 to 15 After it
Succeeded 20 410
Failed 136 8
Canceled 139 286

None of the 1,000 failed on a test, lint or build-check step. The 136 incident failures were infrastructure. Of the 8 after, 2 were collateral and 6 failed in an image push we can't attribute. That is consistent with the signed local run filtering code failures upstream, though we can't prove it caught all of them.

A queue build waited a median 7.7 minutes for a runner, then ran 13.3.

How we charged each side

The table lists what each arm charges and assumes. HEADGREEN is a batching setting: a passing build merges every entry ahead of it.

Arm Charged Reuse Footprints Pre-land safety
Tuned queue every pull request CI run and every queue run, retries included; the agent's own run free HEADGREEN batching and 30% of validation reused; the 14 runners split between pull request CI and the queue at the best ratio (8 to 10 on pull request CI) none; every change overlaps every other combined tree tested before landing
Stacking agents every agent test run, restarts and infrastructure retries included none split code overlapping work tested together; disjoint changes not tested together; no post-land check charged
Stacking agents with signed reuse same signed evidence skips unchanged work (modeled, not built) split code same, with the wrong-reuse chance w uncontrolled

The totals in the chart leave out post-land and nightly runs. The queue tests the combined tree before landing; the agent arms trade that for throughput.

The arithmetic behind the deployability table

Arithmetic, not simulation, sets the ceiling. Breaks land at λ·b, where b is the share of changes that break when combined with others. Each one sits on main for t_r minutes: detection, bisect and revert. If breaks arrive at random, P(main green) ≈ e^(−λ·b·t_r/60), where e is Euler's number and λ is in changes an hour. Setting that equal to g and solving for λ gives the ceiling above.

The real-GitHub check

Predictions were written from the model alone and sealed before the first run (SHA-256 1fec38e4963a4e99c6cfe833f9da025b12f6f303738803b2cbae2b2a9dea8efc). Every test job held one of M tokens, a git-ref semaphore, so at most M tests ran at once whatever GitHub gave us. The test was a constant 2-minute sleep with no failures. Throughput is landings an hour between the 10th and 90th percentile landing.

Run Changes Landed/h Runner-min per change
Merge queue, all-green, M=4 40 disjoint 56.6 3.99
Merge queue, head-green, groups up to 5, M=4 40 disjoint 58.6 4.04
Agents, land on evidence, M=4 40 disjoint 126.1 2.03
Agents, one module, M=4 30 22.1 2.03
Agents, one module, M=8 30 21.9 2.03

Before measuring, we tuned the queue's split of runners between pull request CI and queue builds on separate 10-change runs. An even split won for both modes. Every change landed in every run. Two harness bugs cost us reruns and are fixed in the published copy. Results, tuning data and per-run workflow links are in experiments/head-to-head.

Limits

Every number here comes from one repository and a simulator, so read the model output as a planning aid, not a promise.
  • The simulator is a model. Model-output numbers use the measured-failures scenario, with the one exception named in the text. Lean covers ceilings, not probabilities.
  • One repository. The three days in the jam chart are a small sample.
  • The failure rates are thin. They come from 1,000 queue runs over three days, about 300 inside one incident. Zero code failures is consistent with upstream filtering, and conclusions could change under a different rate.
  • Actions history covers only November 14 to 16, one day of it the jam.
  • Mint records cover November 3 to 16.
  • We modeled agent-side reuse and haven't built it. The 81.7 an hour figure assumes it.
  • Footprints are write proxies. The safety result assumes a test reads only its footprint. The combined check exists for the 0.24% where that fails, measured only in our repository.
  • The demo ran at small scale. GitHub merges one pull request at a time, repo-wide, about 2 to 3 seconds each.