Technical Product Management Course · by Stanislav Belyaev
EN RU

Merge Queue Wait

4 outgoing · 4 incoming · 8 total connections

Map Detail
Code Review AMPLIFIED IN MONOREPO AMPLIFIED DISTRIBUTED

Merge Queue Wait

Merge Queue Wait measures the time a pull request spends waiting in the merge queue after approval before it is actually integrated into the target branch. Extended queue times indicate contention on shared branches, slow CI validation, or serialization bottlenecks. Reducing this wait time shortens the gap between approval and delivery, keeping developer momentum intact.

Time spent in queue after approval. Critical bottleneck at 20+ active developers.

MONOREPO CONTEXT

CRITICALLY AMPLIFIED: Expedia's shared-UI monorepo had 20+ PRs competing simultaneously — each merge invalidated all others. Queue partitioning by affected project area is essential. Without it, merge queues become the primary productivity killer.

DISTRIBUTED CONTEXT

AMPLIFIED: PR enters queue at end of developer's day → fails overnight (flaky test or conflict) → developer doesn't see failure until next morning (12h later) → resubmits → fails again while sleeping. A 30-minute fix becomes a 2-3 day merge cycle.

Scale Impact
👤 Solo / Pair (1–3)
0.1
👥 Team (4–15)
0.3
🏢 Department (15–100)
0.8
🏛️ Organization (100+)
1

Queue contention is superlinear. Graphite: 10 devs queued = 45+ min wait. Expedia faced 20+ competing PRs in their shared-UI monorepo.

4
Influences
4
Influenced by

→ Influences

High CriticalMONODIST
Change Lead Time

Direct additive component.

Bottleneck at 20–30+ devs
GitHub Engineering / Merge Queue research
Monorepo: In large monorepos with hundreds of contributors, merge queue becomes THE dominant lead time component.
Distributed: Merge queue failures overnight add full-day delays. In distributed monorepos, queue becomes THE dominant lead time component.
Context Switching

Unpredictable waits fragment the workday.

Variable wait times compound
Merge queue / Developer productivity research
Medium CriticalMONODIST
Developer Satisfaction

Watching approved PRs reset by others' failures.

Common complaint
Merge queue documentation / Developer surveys
Monorepo: In monorepos, a flaky test in an unrelated project can reset YOUR PR — creating acute cross-team frustration.
Distributed: Watching your PR fail overnight and waiting until morning to fix it — repeatedly — is the fastest path to frustration and attrition.
PRs Completed per Week

Queue failures reset PR progress. Each failure = hours or days of delay before retry completes.

Expedia: 20+ PRs competing
Trunk.io / Merge queue scalability
Monorepo: Monorepo merge queues are especially brutal without queue partitioning. A single failure invalidates all queued PRs.
Distributed: Queue failures overnight mean devs wake up to failed merges, resubmit, and wait another 12-24h cycle.

← Influenced by

Test Flakiness

One flaky failure cascading-resets all queued PRs.

10%+ flake rate makes queues unusable
GitHub Merge Queue Documentation & Trunk.io
Monorepo: Expedia: 20+ PRs competing simultaneously — flaky tests in any affected project reset the entire queue.
Medium CriticalMONODIST
PR Size

Larger changes conflict more with queued PRs.

∝ change surface area
Graphite, GitHub Engineering
Monorepo: In monorepos, cross-project PRs have much larger surface area, increasing conflict probability in shared merge queues.
Distributed: Large cross-project PRs from batching have higher conflict probability, and each conflict recovery takes 12-24h.
Affected-Project Detection

Queue partitioning: PRs only compete with PRs affecting the same projects, not all PRs.

Aviator/Mergify partition queues by affected area
Aviator + merge queue tools
Handoff Latency

Slower human cycle times mean PRs accumulate in queues. More concurrent PRs = more conflicts and resets.

Queue depth ∝ processing latency
GitHub Merge Queue, GitLab CI/CD
Metrics map by Stanislav Belyaev · Analysis powered by Anthropic Claude Opus 4.6 · All data validated by human experts