Learning center

Hand over half a code review so nobody reads it twice

Write down three lists at one commit: what you read and accept, what you read and doubt, and what you did not read. The third list is the one the next reviewer cannot rebuild from your comments.

Comments show findings, not coverage#

A file with no comment may have been read carefully or skipped. The next reviewer has to pick, and both choices cost something: rereading everything wastes the first review, and trusting silence leaves a gap that two approvals then cover up.

A coverage note removes the guess. List by question as well as by path, because two reviewers can read one file for different things:

PathQuestionState at 4c1e9aa
db/migrations/0412.sqlDoes it lock writes?Read, accept: adds a nullable column
db/migrations/0412.sqlCan the old release still write?Not checked
api/export.tsAre limits enforced?Read, doubt: cap applies after the query
web/AllNot read

The second row is why paths alone are too coarse. The migration was read, and its riskiest question was not.

Choose the order for the next reviewer#

Put the doubts first, with the smallest observation that would settle each one. "Cap applies after the query" becomes: run the export with 5,000 rows and log the number fetched. If it fetches 5,000, the doubt is right. If it fetches the cap, a limit exists somewhere the first reviewer did not look, such as the query builder's default.

Then list unread paths by consequence. A reviewer with one hour should spend it on the query before the copy changes.

Make the note outlive the next push#

Coverage is a statement about a commit. When the author pushes, recompute which entries still stand:

git diff --name-only 4c1e9aa HEAD

A path in that list goes back to unread. A path that is absent has the same content, but an accepted answer can still be out of date if something it depends on is in the list. In the table above, a change to a shared query helper reopens the export row.

After a rebase the same command also lists files that came from the base branch. Use range-diff there.

What the note does not do#

It does not transfer an approval. The first reviewer's acceptance is a reason to spend less time on a row, and the person who approves is responsible for the whole. If branch rules require an approval of the latest push, an earlier approval may not count anyway; the push rule explains that setting.

The note is also only as good as the reading behind it. "Read, accept" should carry one fact from the code, as in "adds a nullable column". A row that has only a check mark is closer to the Viewed box.

Worked example#

This example is fictional. Ben inherits a 34-file review with the table above and an hour before a release cut. He runs the export case and sees 5,000 rows fetched, so the doubt is confirmed and goes to the author. He answers the open migration question from the old release's insert statement, which lists its columns. He records web/ as unread and the release owner decides to hold it. The decision was made on a stated gap, which the owner could weigh.

Before handing over, submit pending comments. Return to handing over evidence.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading