Merge Queue Academy
Your main branch broke again. Two green PRs merged, and now CI is red. Learn how merge queues eliminate this problem—permanently.
The Problem
Section titled “The Problem”Every engineering team that scales hits the same wall: pull requests that pass CI individually break main when merged together.
This isn’t a tooling problem—it’s a fundamental race condition. Two developers can’t know about each other’s changes until after they’ve both merged. By then, it’s too late.
Manual solutions don’t scale. “Just rebase before merging” becomes a full-time job. Branch protection helps but doesn’t prevent semantic conflicts. The bigger your team grows, the worse it gets.
A merge queue is the systematic solution.
Start Here
Section titled “Start Here” What is a Merge Queue? The core concept: testing PRs against their future merge target.
How Merge Queues Work Mechanics, lifecycle, and coordination with CI systems.
Features
Section titled “Features” Two-Step CI Separate PR validation from queue validation.
Batching Test multiple PRs together for efficiency.
Speculative Checks Parallelize testing by assuming success.
Parallel Queues Independent lanes for non-conflicting changes.
Use Cases
Section titled “Use Cases” Monorepos Many teams, independent components, complex dependency graphs. Merge queues with scopes let changes flow without blocking unrelated work.
High-Velocity Teams 20+ PRs per day? Without a queue, you're playing merge roulette. With one, every commit on main is guaranteed tested.
Long CI Pipelines 30+ minute builds make rebasing painful. Batching and speculation turn that cost into an investment.
Get Started
Section titled “Get Started” Do You Need One? Signs, prerequisites, and when to skip it.
Companies Using Merge Queues How Uber, Shopify, GitHub, and others use them at scale.