İçeriğe geç
wedevit

November 30, 2026 · 9 min read · software

İlhan Buğra Aslan

Pull requests sit in the queue for days: how to run code review that works


When code review is slow, the cause is rarely reviewers who cannot be bothered. It is the size of the thing being reviewed and the absence of a rule about who reviews it. In the study Google published about its own process, the median change is 24 lines and more than 35% of changes touch a single file. Twenty four lines gets read. Nine hundred lines does not get read, it gets approved. So the process you need comes down to two sentences: keep changes small, and answer a review request within one business day. Everything else sits on top of those two. There is also a finding most teams do not expect: the measured output of code review is mostly not defect finding.

Two numbers first, because "review is slow" is a feeling

The first number is wait time. Meta's definition is a useful one to borrow: Time In Review is how long a change spends waiting on reviewer action, summed across every review cycle. Time the author spends reworking the change does not count, because that is not the queue. Meta made the P75 of this metric its north star and reported a correlation between slow P75 review times and engineer dissatisfaction.

The second number is size. Pull the line count distribution for every PR merged in the last two months and look at the median and the P90. Put those two numbers next to each other and most of the process argument settles itself. If your median PR is 600 lines, review is not happening in your team, approval is. Without both numbers the discussion stays at the level of personal impressions, and nobody changes their mind.

The variable is batch size, not reviewer discipline

Google's study, based on logs from nine million reviews, shows how small a small change can be: over 10% of changes modify a single line, around 90% touch fewer than 10 files, and the median is 24 lines changed. The company's own engineering guide points the same way: "100 lines is usually a reasonable size for a CL, and 1000 lines is usually too large." The guide's real yardstick is not the line count though. It is one self-contained change, meaning one part of a feature rather than the whole feature.

The number everyone quotes comes from somewhere else: a 2006 case study at Cisco published by SmartBear. It is vendor material rather than peer-reviewed research, so do not treat it as a hard threshold. It does offer two practical limits that most teams recognise from experience: defect density found per review drops once a review runs past roughly 200 to 400 lines, and attention fades in sessions longer than 60 to 90 minutes.

The sneaky part about a large PR is that comment volume does not drop. In Google's data the average number of comments grows with the size of the change and peaks around 12.5 comments for changes near 1250 lines. The reviewer is talking. What they are talking about stays on the surface, because an architectural problem is invisible inside a forty file diff.

The one business day rule

The sentence in Google's review speed guide is blunt: "One business day is the maximum time it should take to respond to a code review request." Responding is not the same as finishing. If you have no time, "I can look at this after lunch" or "ask whoever owns that module" both count as a response. The same guide tells reviewers not to break their own focus: finish the thing you are writing, then review at a natural stopping point.

On the measured side, Google reports a median wait for initial feedback of under an hour for small changes and about five hours for very large ones, with the median latency for the whole review process under four hours. Meta ran an experiment with a bot that nudges reviewers on stale changes and reported a 7% drop in average Time In Review and a 12% drop in the share of changes waiting more than three days. Those look like small numbers until you work out how much of your delivery lead time is pure queue. In most teams the review queue is longer than the CI/CD pipeline itself, and it is the single biggest contributor to change lead time in your DORA metrics.

What review actually catches

This is where expectation and outcome part ways. A Microsoft study hand-classified 570 comments across 200 review threads. The largest category, at 29%, was code improvement suggestions. Defect finding came only fourth out of nine categories, at 14% of comments. In the same study, finding defects was the number one stated motivation for review among both developers and managers. The sharper detail is inside that defect category: of 78 defect comments, 65 were logic issues and only 5 were about security.

The conclusion is not to stop reviewing. It is to fix what you expect from it. Human review is good at design, naming, unnecessary complexity and the question of whether this code can be read six months from now. It is weak at security holes and regressions. Those are caught by test automation, static analysis, dependency scanning and secret scanning. Review sits on top of those, it does not replace them.

The machine finishes before the human starts

Before a change reaches a human, these should have run automatically: formatter, linter, build, unit tests, static analysis and a dependency vulnerability scan. Google's review tool displays analyzer output inline alongside human comments, in a different colour. The logic is simple. Nothing a machine can say should be left for a person to type.

Formatting has no place in a review discussion. Indentation, quote style and import order belong in a config file in the repo, not in a comment thread. One small habit sharpens the rest: prefix optional suggestions with "Nit:". Google's guide spells this out, and it means the author can merge without acting on that comment. It sounds trivial. It removes a surprising amount of friction between a senior reviewer and a junior author.

Who reviews this needs a written answer

One reviewer is enough for most changes. In Google's data fewer than 25% of changes have more than one reviewer, the median reviewer count is one, and even very large changes average under two. What usually happens in teams that mandate two approvals is predictable: both reviewers assume the other one looked properly.

The number matters less than making the assignment automatic. On GitHub the mechanism is the CODEOWNERS file: you map path patterns to owners, and any PR touching those paths requests them automatically. Three details get misremembered constantly. The file can live in .github/, the repo root or docs/, and the version on the PR's base branch is the one that applies. The last matching pattern wins, so general rules go at the top and specific ones at the bottom. If one line lists several owners, an approval from any one of them satisfies the requirement. Draft PRs request nobody until they are marked ready for review.

Round-robin assignment inside a team spreads the load. Add one thing to it: deliberately put new joiners on reviews in areas they do not know yet. Google's reviewer suggestion tool does exactly this, adding new team members explicitly because they have no review history to go on. Review is the cheapest way to attack a single point of knowledge, and it does not happen by accident.

The bar is "better", not "perfect"

Most stuck reviews are stuck because the approval bar was never written down. Google's standard is this: a reviewer should favour approving a change once it definitely improves the overall health of the codebase, even if it is not perfect. In the guide's own words, "there is no such thing as 'perfect' code, there is only better code."

That is not lowering the bar. It blocks three specific failures: a reviewer imposing personal style, out-of-scope requests piling into the same PR, and the week-long ping-pong that follows both. When a disagreement will not resolve, the guide has a rule for that too. A change does not sit there because the author and the reviewer cannot agree. Move it to a call, write the outcome back into the thread, and escalate to a tech lead if that fails. A PR open for three weeks is not a review problem, it is an unmade decision.

Write down what to look for

Do not leave review to instinct. The headings in Google's guide give you a workable skeleton: design, functionality, unnecessary complexity, tests, naming, comments, style, consistency with existing code, documentation. Add two more. Does the change make sense in the context of the whole system rather than the diff alone, and do you say something when a piece of work is well done.

Then add a short list specific to your repo. Did the database schema change and is there a rollback path, does this break the API contract, is a new third-party dependency being pulled in, is this behind a feature flag, does anything personal end up in the logs. Put that list in the PR template. The habit that shortens review time more than any other is the author reading their own diff, as a reviewer would, before opening the PR.

Not every change deserves the same depth

The Ship/Show/Ask model described by Rouan Wilsenach on Martin Fowler's site draws this line well. Ship: merge to mainline with no review. Show: open a PR but merge immediately, comments arrive afterwards. Ask: open a PR and wait for the discussion. The author's real argument is that treating every change as an Ask both stalls the flow and pushes reviewers into approving things they never read.

In practice this becomes risk-based tiering. Copy changes, documentation and small work behind a disabled flag take the fast path. Authentication, authorization, payments, data migrations, infrastructure and any public API contract get a second pair of eyes. Saying "let's look harder at the important ones" without writing the tiers down does not work, because on a Friday evening everyone's definition of important shifts. Your branching strategy has to line up with the same tiers, otherwise the two sets of rules cancel each other out.

Keep approval inside the team

In a lot of companies the thing slowing review down is not the team at all, it is an approval step outside it. DORA's finding here is unambiguous: approval of changes by an external body or a senior manager is associated with lower delivery performance, and the research found no evidence that this kind of formal external review lowers change fail rates. The recommendation is peer review during development, with the approval recorded in the development platform.

Where separation of duties is a genuine requirement, the answer is the same. In an ISO 27001 certification audit what the auditor wants is evidence, not a committee: proof that somebody other than the author approved the change and that the record cannot be quietly edited. Branch protection rules plus required owner approval already produce that. If you want to measure the overhead, use DORA's own suggestion: what share of changes waits on an external approval, and how long that wait lasts.

How to spot rubber stamping

Chase a speed metric on its own and the team will find the cheap way to satisfy it, which is approving without reading. That is why Meta pairs Time In Review with Eyeball Time, the total time reviewers actually spend looking at a change. When rubber stamping goes up, speed looks better and that second number drops.

There is research on the downstream effect too. A 2014 study of the Qt, VTK and ITK projects estimated that components with low review coverage carried up to two additional post-release defects, and components with weak reviewer participation up to five. Participation mattering more than coverage is the interesting part: what counts is not that the PR was reviewed on paper, it is that somebody read it.

The practical tells: a 700-line PR approved within two minutes, a high share of PRs that received zero comments, the same two people approving everything, and "the tests pass anyway" turning into a stated reason for approval. The fix is not pressuring reviewers. It is making the batch smaller.

AI changed both sides of this

As the volume of code produced goes up, the bottleneck moves from writing to reviewing. In DORA's 2025 report, close to 90% of nearly 5,000 respondents said they use AI at work, and the report's central claim is that AI behaves like an amplifier: it speeds up processes that work and magnifies the ones that are broken. Code review is where that shows up fastest.

Using review bots as a first pass makes sense: formatting, common bug patterns, missing tests, stale documentation. The approval should stay with a person, because the bot is weakest exactly where review is most valuable, which is whether the change matches the business rule it was written for. Reviewing AI-written code is a topic of its own. The short version that belongs here: human review turns into theatre as the PR grows, and AI is very good at growing PRs.

What fits into this week

Measure three things: the P75 time from PR opened to first comment, the median line count of merged PRs, and how many PRs have been open longer than three days. Then set one rule and run it for a month. A PR over 400 lines gets split before review, and every review request gets a response within one business day. Write the CODEOWNERS file so that who looks at this stops being a conversation. Put your own five-item checklist in the PR template.

Look at the same three numbers a month later. If they have not moved, the problem is probably not review culture but technical debt: when changes cannot be made smaller, the code is too tightly coupled to allow it. We are happy to go through your numbers with you and work out where the queue actually forms.


Need help with this topic?

get in touch →← all posts