Technical Product Management Course · by Stanislav Belyaev
EN RU

PR Size

6 outgoing · 9 incoming · 15 total connections

Map Detail
Code Review AMPLIFIED IN MONOREPO AMPLIFIED DISTRIBUTED

PR Size

PR Size tracks the number of lines added, modified, and deleted in each pull request. Research consistently shows that smaller pull requests receive more thorough reviews, merge faster, and introduce fewer defects. Monitoring this metric encourages teams to decompose work into reviewable increments and avoid risky large-batch changes.

Lines of code changed per pull request. Optimal: 200–400 lines.

MONOREPO CONTEXT

AMPLIFIED: Atomic cross-project changes (e.g., updating a shared API and its consumers) produce massive PRs. Stacked PRs are the primary mitigation; without them, PRs touching multiple services become unreviewable, drastically reducing defect detection.

DISTRIBUTED CONTEXT

AMPLIFIED via vicious reinforcing loop: developers learn each PR submission costs a full day of latency → batch more changes → larger PRs → more review rounds → more TZ delays → more batching. This is the #2 problem after review latency.

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

Batching pressure increases at scale. Graphite data shows PRs with >3 files double merge time. Developers batch more when review cycles are slow.

6
Influences
9
Influenced by

→ Influences

Code Review Turnaround

+100 lines → +25 min review. ~50-line PRs merge 40% faster.

Direct measurement
PropelCode (50K+ PRs analyzed), Adadot, Graphite
Distributed: Large PRs + TZ gaps = multi-day review cycles. Each clarification question adds 12-24h.
Change Failure Rate (CFR)

>1,000 lines → 70% lower defect detection.

<300 lines get 60% more thorough reviews
SmartBear/Cisco (2,500 reviews), PropelCode, Microsoft
Change Lead Time

Larger PRs take longer at every stage.

Elite: <194 code changes
LinearB (6.1M PRs analyzed), PropelCode, Graphite
Medium CriticalMONODIST
Merge Queue Wait

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.
Incident Frequency

Undetected defects reach production. Size warnings → 35% fewer defects.

Microsoft data
Microsoft, SmartBear/Cisco, PropelCode
High CriticalMONODIST
PRs Completed per Week

Larger PRs take longer to write, review, and merge. 200-line PR = 1 day. 2000-line PR = multiple days.

Optimal: 200-400 lines
Graphite, LinearB, PropelCode
Monorepo: Cross-cutting monorepo changes create massive PRs (15+ services) unless using stacked PRs. Massive PRs kill throughput.
Distributed: Batching to minimize cross-TZ round-trips creates larger PRs, creating vicious cycle: large PR → more review rounds → more batching.

← Influenced by

High CriticalMONO
Test Flakiness

Devs batch changes to minimize flaky gate exposure.

Google: 2-16% compute resources on flaky reruns
Google Research - Continuous Integration Testing
Monorepo: In monorepos, flaky tests in ANY consumer of a shared lib block the PR — massively amplifying batching incentive.
CI/CD Pipeline Speed

Slow pipelines incentivize batching into fewer, larger PRs.

Fast CI ↔ smaller PRs
Devonair, SurferCloud, DeployFlow, Jeevisoft
Medium HighDIST
Code Review Turnaround

Slow reviews → fewer, larger PRs to reduce round-trips.

Behavioral adaptation
Cubic, Code Climate, FullScale
Distributed: Developers learn each PR submission costs a full day of latency, so they batch more changes to minimize round-trips.
Test Suite Exec Time

Expensive runs incentivize batching.

N/A
Deployment Frequency

Frequent deploys → no need to batch.

DORA elite
DORA Metrics - Deployment Frequency & Batch Size
High CriticalDIST
Cross-Team Coordination

Devs batch cross-team changes to minimize coordination rounds. Updating a shared API + 15 consumers in one PR.

Stacked PRs are the mitigation
Monorepo and DevOps best practices
Distributed: Developers batch cross-team changes even more aggressively to minimize costly cross-TZ coordination rounds.
Shared Lib Blast Radius

Atomic changes to shared libs + all consumers create enormous PRs.

Can span dozens of files across services
GitHub Engineering, GitLab Research
Handoff Latency

Devs batch more changes per PR to minimize costly cross-TZ round-trips. Each submission costs a full day.

Batching is the rational response
DevOps research on batching behavior
AI Code Review Overhead

154% larger PRs from AI batching. AI enables generating more code faster, leading to bigger PRs.

+154% PR size
Faros AI, SonarSource, GitClear - Already Validated
Metrics map by Stanislav Belyaev · Analysis powered by Anthropic Claude Opus 4.6 · All data validated by human experts