Code review

Code review

Also known as Peer code review

By WeavePublished 2 min read

Definition

Code review is the examination of a proposed code change by someone other than its author, or by an automated reviewer, before or after integration. It helps identify problems, share context, and assess whether a change fits the surrounding system.

Review is a conversation about a change

A useful review asks whether the change solves the intended problem, behaves correctly, and remains understandable to the next person who maintains it. Tests, naming, error handling, and interactions with existing behavior can all matter.

The reviewer needs context. A short explanation of the problem and the author's approach often does more for review speed than another reminder to approve the request. Large unrelated changes make that context harder to reconstruct.

What an approval does and does not mean

Imagine an illustrative change that adds a retry around a payment request. The happy-path test passes, but a reviewer notices that retrying after a network timeout could submit the operation twice. A discussion about idempotency prevents a production problem that a quick style check would miss.

An approval is still a judgment made with limited information. It does not guarantee correctness, security, or adequate test coverage. Automated checks and production feedback provide different forms of evidence.

Measuring the process

Separate waiting for a first response from time spent addressing feedback. A long wait may indicate unclear ownership or overloaded reviewers. Several review rounds may indicate missing context, a difficult design question, or a productive discussion.

Do not assume that fewer comments or faster approvals mean better reviews. Read representative examples and compare quality outcomes. AI-generated suggestions deserve the same scrutiny: a large number of comments can create work for authors without finding a meaningful defect.

How this relates to Weave

Weave's review metrics help teams examine review rounds and reviewer patterns alongside code quality. That makes it easier to distinguish a queue that needs attention from a review that is doing necessary work. The actual comments and change context remain important evidence when interpreting the numbers.

Explore Engineering intelligence

Sources and further reading

  1. Pull requests, GitHub Docs