AI Writes Code Faster Than Uber Can Merge It

Preetam Dwivedi, Uber, Manjari Akella, Uber27:35 · Nov 2026 · 2,240 views
Thumbnail for AI Writes Code Faster Than Uber Can Merge It Watch on YouTube
TL;DR
  1. 1

    AI-generated changes increased Uber's merge demand from about 90 to 130 requests per hour between January and March 2026, pushing P95 land time from 30 minutes to three or four hours.

  2. 2

    Uber added admission gating, deferrals, and conflict relaxation to SubmitQueue, reaching about 300 lands per hour while bringing P95 land time back to 30 minutes.

  3. 3

    Uber now uses a hybrid model in which some changes are validated before landing and Stovepipe validates the landed trunk afterward.

Summary

Uber's monorepos handle contributions from more than 5,000 developers, with over 36,000 commits and 27,000 pull requests each week. Its SubmitQueue kept trunk green by predicting which combinations of changes could land safely, but AI-generated changes raised merge demand quickly in early 2026. The result was a sharp increase in waiting time even though trunk stayed green. Preetam Dwivedi and Manjari Akella describe three changes to the queue. Admission gating keeps expensive changes out during peak hours. A deferred queue stores those changes and retries them later. Conflict relaxation scores target overlaps and drops weaker conflicts to recover parallelism. This increases throughput, but some combinations now land without full pre-merge validation. Stovepipe checks those commits after landing and tracks the last verified-good point on trunk. The result is a hybrid approach, with selective pre-merge checks and exhaustive post-merge validation. Uber is working on batching, service-level green states, and automated recovery.

Key ideas
02:03

SubmitQueue tests possible futures to keep trunk green

When two pull requests are based on the same trunk, testing each one separately does not test their combination. If A lands first and B was never tested with A's changes, B can break trunk. SubmitQueue predicts the relevant futures: A alone, B alone, and A plus B. It aims to land changes while keeping the combined trunk green. Target analysis lets unrelated services build and test independently. Probabilistic speculation uses historical build information and change characteristics to prioritize likely-needed builds. Large changes can also be bypassed while smaller changes move through the queue.

05:28

AI-generated changes overwhelmed the previous merge optimizations

Uber's request rate rose from roughly 90 requests per hour in January 2026 to 130 in March, which Preetam attributes primarily to AI-generated changes. The existing system still kept trunk green, but P95 land time increased from about 30 minutes to three or four hours. The problem was not only more code. The rate at which pull requests were created and landed changed enough that the previous queue behavior no longer provided an acceptable wait for developers.

07:08

Admission gating protects peak capacity by rejecting expensive changes

Admission gating categorizes incoming requests as small or expensive. A small change touches fewer targets and can enter the active queue during peak hours. An expensive change may span many targets or the entire build graph, so it can hold resources while the queue validates it. During peak hours, SubmitQueue rejects those expensive changes and asks developers to retry outside the busy window. This raised the land rate from about 130 to about 160 during business hours, a gain of more than 20 percent. The cost falls mainly on developers responsible for broad libraries.

10:45

Deferrals store expensive changes instead of making developers retry

The deferred queue changes the user experience around admission gating. When an expensive request arrives during peak hours, SubmitQueue persists it rather than rejecting it. Once capacity is available, often after peak hours, the request is replayed into the active queue automatically. Developers submit once instead of watching for a suitable time and pressing the button again. Deferrals do not remove the underlying wait for an expensive change. They move the scheduling work from the developer to the system.

13:39

Conflict relaxation recovers parallelism from connected overlap graphs

SubmitQueue previously treated any target overlap between two requests as a conflict, which could connect many requests into one serial component. Conflict relaxation ranks the strength of each overlap instead. Uber uses Jaccard scoring together with newly introduced dependency edges to produce a score between zero and one. Stronger links remain, while weaker links can be dropped to meet a configured parallelism target. In the example, removing the weakest edges split six changes into three independent queues. Uber makes this assignment when a request arrives and reuses it, which preserves scheduled work and speculative builds.

18:01

Higher throughput means some combinations land without pre-merge testing

Conflict relaxation increased throughput from about 160 lands per hour to almost 250 or more during peak hours, with very good P95 land times. The cost is that dropping conflict edges can allow a combination of changes to land without being tested together. Main can therefore become broken. The system accepts this risk because the queue can process more work, then creates a separate obligation to validate what actually landed. This is the point where Uber moves from an always-green trunk to a hybrid approach.

19:22

Stovepipe tracks the last verified-good commit after changes land

Stovepipe validates commits after they reach main and maintains a separate verified-main pointer. If main advances from a known-good commit A through commits B, C, and D and that range fails validation, verified main stays at A. Later, when main reaches G, Stovepipe validates the full range from A through G. If it passes, the verified pointer moves to G. When a landed change breaks the trunk, Stovepipe pages on-call, who prepares a fix or revert and lands it through SubmitQueue. Stovepipe then checks the repaired state.

24:38

Uber is replacing one repository-wide green state with more specific states

Uber reports about 300 lands per hour at peak while keeping P95 land time at 30 minutes, compared with 90 lands per hour in January 2026. Its next work includes batching related changes so fewer builds run, tracking whether an individual service or project is green rather than using only one repository-wide verified-main pointer, and automating fixes or reverts. More specific green states could allow unaffected services to roll out even when another part of the trunk is broken.

"During peak hours, if an expensive request comes in, we no longer reject it, but put it into a deferred queue where it is persisted."Manjari Akella11:09
Who should watch
  • You run a large monorepo and your merge queue is slowing down as AI-generated pull requests increase.
  • Your team wants higher merge throughput but needs a concrete way to handle changes that land without exhaustive pre-merge testing.
  • You are designing post-merge validation, rollback, or repository health tracking for a trunk that cannot remain fully green at all times.