Skip to content
Marvex

Guide

The Code Review Playbook

Most complaints about code review are complaints about waiting. Most attempts to fix it start with a style guide. That mismatch is why the fixes rarely work.

A practical playbook for running code review as a system: routing and first-response targets, change sizing, what a good review actually checks, shortening rework loops, and the metrics that show whether review is healthy.

Engineering ManagementMarvex EngineeringEngineering Intelligence, Shiprocket15 min read
Two engineers reviewing code together at a shared workstation
1
Named reviewer per pull request — the single highest-leverage routing rule
4
Review-relevant measures in Marvex: pickup, review time, rework and review depth

Review is a queue before it is a craft

Ask a team what is wrong with code review and you will hear about waiting: changes that sit for days, reviewers who never respond, the fortnight-old pull request everybody has stopped mentioning. Ask what they have done about it and you will usually hear about a checklist, a style guide or a training session. The complaint is about latency and the remedy is about quality, which is why so many code review initiatives leave the actual problem untouched.

Both halves matter, but they are different systems with different fixes. Latency is governed by routing, reviewer capacity, change size and work in progress. Quality is governed by what reviewers look for, how much context they have, and whether they have enough time to think. A playbook has to address them separately or it will trade one for the other — which is precisely what happens when a team imposes a 24-hour merge deadline and discovers six months later that approvals have become automatic.

The framing that helps most is to treat review as a shared service with a capacity, a queue and a service level, rather than as something people do in the gaps between their real work. That framing immediately raises the right questions: what is our expected response time, who is on duty, what happens when the queue exceeds capacity, and is reviewing counted as work when we plan a sprint.

  • Latency and quality are separate systems with separate fixes
  • Style guides do not shorten queues; routing rules do
  • Merge deadlines buy speed by purchasing shallower review
  • Treat review as a service with capacity, a queue and a service level

Route it: name a person, set a first-response target

The routing rules are simple, unglamorous and account for most of the achievable improvement.

Assign one named reviewer. A pull request assigned to a team is assigned to nobody; diffusion of responsibility is entirely reliable in a group of eight. Round-robin assignment with a code-ownership fallback works well. What matters is not the mechanism but the property: exactly one human knows this is theirs.

Set a first-response target rather than a merge target. "Every pull request gets a substantive first response within one working day" is achievable and it legitimises the honest reply — "I have read it, this needs an hour, I will do it this afternoon" — which is far better for the author than silence. A merge deadline, by contrast, is a direct incentive to approve without reading, and teams reliably discover this the hard way.

Cap concurrent reviews. Someone holding six open reviews is doing all six slowly. A cap of two or three makes overload visible and forces the load-balancing conversation instead of letting it happen silently.

Make reviewing count as work. If review time is not represented in what a team commits to, then reviewing is unpaid labour competing with the delivery people are actually measured on, and it will lose every time. This is the structural fix behind most review latency problems, and the only one that requires a manager rather than a bot.

Show the queue. A standup item listing open pull requests older than a day, oldest first, resolves a surprising share of pickup time with no policy change at all — mostly because the oldest item is usually one nobody realised was waiting.

  • One named reviewer, always
  • First-response target of about one working day; never a merge deadline
  • Cap concurrent reviews per person at two or three
  • Budget review time in sprint capacity, explicitly
  • Display the waiting queue oldest-first where the team already looks

Size it: the author controls most of the review experience

Review quality is largely determined before the reviewer arrives, by how the change was packaged. A reviewer given a coherent three-hundred-line change with a clear description will do a good job; the same reviewer given two thousand lines mixing a refactor, a behaviour change and a dependency bump will scan for obvious problems and approve. This is not a character flaw, it is a working-memory limit.

So the highest-leverage review practice belongs to the author. Split changes until each has one purpose. Separate refactors from behaviour changes so the reviewer is never hunting for the four meaningful lines among a thousand moved ones. Land interfaces before implementations. Use feature flags so incomplete work can merge safely rather than accumulating on a branch. Extract mechanical changes — renames, formatting, generated code — into their own pull request that can be reviewed in a minute and approved without thought, because it genuinely requires none.

Write a description that states intent, constraints and the alternatives considered. Reviewers cannot evaluate whether a solution is right without knowing what problem it was solving and what was ruled out. A change with no stated intent can only be checked for internal consistency, which is the weakest form of review available.

Point at the risky part. "The retry logic in the second commit is the bit I am least sure about" directs finite reviewer attention to where it pays. Most authors know exactly where the risk is and most never say.

  • Package changes so each has a single purpose
  • Separate refactors from behaviour change; land interfaces first
  • Extract mechanical changes into their own trivially reviewable request
  • State intent, constraints and rejected alternatives in the description
  • Name the risky part explicitly and direct attention to it

Deepen it: what a good review is actually checking

With formatting, lint, types and dependency scanning automated — and they should all be automated, running before a human opens the change — a human review has four jobs left, roughly in order of value.

Is this the right change? Does it solve the stated problem, is the problem worth solving here, and does the approach fit the system it is landing in? This is the highest-value question and the one most often skipped, because it is uncomfortable to ask at review time. It is also the reason a design note before implementation is worth thirty minutes.

What happens when it fails? Error paths, partial failures, retries, timeouts, concurrent access, empty and enormous inputs. Generated and hand-written code alike tend to be strongest on the happy path and weakest here, and it is where most production surprises originate.

Is it maintainable by someone else? Naming, boundaries, the coupling being introduced, whether the tests describe the requirement or merely restate the implementation. A test that asserts what the code does rather than what it should do passes forever and protects nothing.

Does it fit the codebase? Existing patterns, existing utilities, conventions the reader will expect. Consistency is worth more than local optimality in a shared codebase.

Two habits improve the tone of all four. Distinguish blocking comments from suggestions explicitly — a prefix convention is enough — because an author cannot otherwise tell whether a remark is a requirement or a musing. And ask a question rather than issuing an instruction when you are not certain: "what happens if this is called twice" gets a better answer than "add a lock here", and is correct more often.

  • Automate everything a machine can check before a human looks
  • Right change → failure behaviour → maintainability → codebase fit
  • Tests that restate the implementation protect nothing
  • Mark blocking comments as blocking; ask rather than instruct when unsure

Shorten the rework loop

Rework — the loop between feedback and revision — is where review latency compounds. Each round trip adds a full queueing cycle, because the author has to come back, the reviewer has to be re-engaged, and both have moved on to other things in between. Three rounds of feedback on a change can easily take longer than the implementation did.

Front-load the disagreement. The cheapest place to resolve an approach argument is before the code exists. A short design note for anything non-trivial, or a draft pull request opened early to invite directional feedback, converts a three-day review loop into a thirty-minute conversation.

Batch feedback. A reviewer who leaves five comments over two days causes five rounds of context switching; the same five comments delivered together cause one. Review the whole change, then submit.

Name a decider for contradictory feedback. When two reviewers disagree, the author is left arbitrating between two more senior people, which is an unfair position and a slow one. A rule as simple as "the code owner decides" removes the deadlock.

And know when to leave the pull request. Anything past two rounds of substantive disagreement should move to a call or a shared document. Text review is excellent for defects and poor for design arguments, and the pull request thread is the worst available venue for a discussion that needs a decision.

  • Each feedback round costs a full queueing cycle, not just the reading
  • Resolve approach disagreements before implementation
  • Submit feedback as one batch, not as a trickle
  • Name a decider so the author is not arbitrating between seniors
  • After two substantive rounds, get off the thread

Reviewing when a machine wrote the first draft

AI-assisted authoring changes the economics of review, and pretending otherwise is how review becomes the bottleneck it was not before.

The first change is volume. If authoring gets meaningfully faster and reviewing does not, the queue grows — the constraint simply moves downstream. Review capacity has to be planned as deliberately as authoring capacity, or the visible gain is converted into waiting rather than into delivery.

The second change is the failure mode of the code itself. Generated code is usually syntactically clean, idiomatic and self-consistent, which defeats the shallow review heuristics people have built up over years — "it looks fine" is a much weaker signal than it used to be. The errors that survive tend to be plausible rather than sloppy: a method that does not exist on that type, a nullable treated as non-null, a subtly wrong boundary condition, an API used the way it is usually used rather than the way it works here.

That pushes review upward, towards judgement. Is this the right thing to build, are the assumptions true, does this belong in this module, is this dependency one we want. Those questions were always the highest-value part of review; now they are most of what is left, because the mechanical checks are better handled by machines anyway.

Two practical consequences. Stricter static analysis earns disproportionately more than it used to, because it catches the plausible-but-wrong class cheaply and without a human reading. And pull request descriptions become more load-bearing, not less: when the code cannot be assumed to encode intent, the intent has to be stated. A reviewer who does not know why a change takes this shape can only verify that it is self-consistent, and generated code reliably is.

Keep junior engineers reviewing, deliberately. Review has always been a primary way people learn a codebase, and if it becomes purely a senior judgement activity that path closes. Under load a queue routes everything to the most experienced person available unless something prevents it.

  • Faster authoring without more review capacity just relocates the queue
  • Generated code fails plausibly, not sloppily — "looks fine" weakens as a signal
  • Review shifts towards judgement: right thing, right place, true assumptions
  • Strict typing and static analysis pay more than they used to
  • Protect junior engineers' access to reviewing, or the learning path closes

Measuring whether review is healthy

Four measures cover it, and they must be read together because each has an obvious way to cheat.

First-response time is the most sensitive health indicator and the one to watch weekly. It responds fastest to routing changes and to capacity problems, and it is the number authors actually feel.

Review time — first response to approval — read alongside change size. Rising review time on rising change size is arithmetic, not decay. Rising review time on flat change size is worth investigating.

Rework share of cycle time tells you where alignment is happening. Rising rework means disagreement is being discovered at review; falling rework with stable depth means it is being resolved earlier, which is the outcome you want.

Review depth — comments per pull request and the proportion of reviews with substantive discussion — is the counterweight that stops the other three from being gamed. Speed improving while depth collapses is not an improvement; it is a quality problem being deferred to production.

Two rules for using any of these. Read them at team level, not per person — a per-reviewer leaderboard produces fast, shallow, useless reviews within a month, reliably. And distinguish authoring from contribution: Marvex tracks "PR worked on", meaning a member authored at least one non-merge commit in a pull request, separately from being its author, because on teams that pair or hand over work those populations differ and review-load views built on the wrong one will misallocate.

  • First-response time weekly; it moves first and authors feel it
  • Review time is only meaningful next to change size
  • Rework share shows whether alignment happens early or late
  • Review depth is the counterweight that prevents gaming
  • Team level only — per-reviewer leaderboards produce shallow reviews
code reviewpull requestsreview latencyreview depthengineering practice

Frequently asked questions

What is a reasonable code review turnaround time?

Set a first-response target of roughly one working day, and do not set a merge deadline. A first-response target is achievable, and it legitimises the honest reply that says "I have read this, it needs a proper hour, I will do it this afternoon" — which is far more useful to an author than silence. A merge deadline creates a direct incentive to approve without reading, and teams that impose one typically discover months later that approvals have become automatic. Measure first-response time weekly, because it is the review metric that responds fastest to routing and capacity changes.

Should pull requests be assigned to a person or to a team?

To a named person. A pull request assigned to a team is effectively assigned to nobody: diffusion of responsibility in a group of eight is extremely reliable, and every member reasonably assumes someone better suited will pick it up. Round-robin assignment with a code-ownership fallback works well, but the mechanism matters far less than the property it creates — exactly one human knows the change is theirs to act on. Pair this with a cap of two or three concurrent reviews per person so that overload becomes visible instead of silently lengthening the queue.

How do you improve code review quality without slowing delivery?

Move everything a machine can check to before the human review — formatting, lint, types, dependency and licence checks, security scanning — so reviewer attention is spent only where judgement is required. Then reduce change size, since review quality is mostly determined by whether the reviewer can hold the change in working memory. Both make review faster and deeper at the same time, which is why they are preferred to any policy that trades one for the other. Track review depth, such as comments per pull request, alongside review time so you can tell a genuine improvement from an erosion.

What should a reviewer actually look for?

Four things, in order of value. Whether it is the right change — does it solve the stated problem, and does the approach fit the system. What happens when it fails — error paths, partial failures, retries, timeouts, concurrency, empty and enormous inputs. Whether someone else can maintain it — naming, boundaries, coupling, and whether the tests describe the requirement rather than restating the implementation. And whether it fits the codebase's existing patterns and utilities. Formatting, lint and type errors should never appear in a human review; automation catches them more reliably and they crowd out the comments that matter.

How does code review change when AI writes the first draft?

Two things change. Volume rises, so review capacity must be planned deliberately or the queue simply moves downstream and the authoring gain becomes waiting. And the failure mode shifts: generated code is usually clean, idiomatic and self-consistent, so "it looks fine" is a much weaker signal than it was. The errors that survive are plausible rather than sloppy — a method that does not exist on that type, a nullable treated as non-null, a subtly wrong boundary. Review therefore moves towards judgement: is this the right thing, are the assumptions true, does this belong here. Strict typing and static analysis pay more than before, and pull request descriptions become more load-bearing, because intent can no longer be assumed from the code.

Are per-reviewer metrics useful?

Not as performance measures. Every per-reviewer metric has a cheap gaming strategy — approve faster, comment less, avoid the hard changes — and a reviewer leaderboard reliably produces fast, shallow reviews within about a month. Per-person views are useful for one thing only: spotting load imbalance, so you can see that one person is absorbing most of the review work or that someone has no available reviewer for their area. Read the health metrics — first-response time, review time, rework share, review depth — at team level, and use individual views to redistribute work rather than to rank people.

How large should a change be before it is split?

Split when the reviewer can no longer hold the whole change in working memory, which for most codebases means a few hundred changed lines excluding generated files, lock files and pure formatting. Past that threshold review degrades from evaluation into a scan for obvious defects followed by an approval — which is why very large pull requests often attract fewer comments than small ones despite containing more to discuss. Useful splitting techniques: separate refactors from behaviour changes, land an interface before its implementation, ship incomplete work behind a feature flag, and extract mechanical changes such as renames and generated code into their own trivially reviewable request.

Keep reading

Marvex

See it on your own delivery data

Connect GitHub, GitLab or Jira and Marvex builds your DORA, cycle-time and sprint views from the history you already have.