A pull request can be neatly formatted and still change the wrong behavior. Automated checks help with syntax and some classes of defect, but a reviewer needs to understand the intended outcome, the affected boundaries and the evidence that the change works. Reviewing the diff is only one part of that task.
GitHub’s pull-request review documentation explains the mechanics of comments, approvals and requested changes. Those controls support a review process; they do not decide what a reviewer should investigate. The method below focuses on behavior and proportionate evidence rather than turning every small change into a formal audit.
Read the problem statement before the implementation
Ask what concrete situation triggered the change and what users or operators should observe afterward. A useful description connects a before state to an after state. “Improve validation” is less informative than explaining which invalid request was accepted and how it should now be rejected.
For a fictional scheduling application, suppose a change prevents booking a slot that has already been reserved. The reviewer should first understand the concurrency scenario, not merely inspect a newly added conditional statement. That context determines which evidence matters.
If the description is missing, request the smallest clarification needed to review confidently. Do not infer product requirements from variable names and then approve your own interpretation. The author and reviewer need a shared target before discussing whether the implementation meets it.
Identify the changed behavior and its boundaries
List the public or operational interfaces affected: API response, database state, background task, user interface, configuration or monitoring. A small code diff can cross several boundaries, while a large mechanical refactor may preserve behavior.
Trace one representative path through the change. Identify the input, relevant decision, side effect and output. For the booking example, follow two competing requests through the availability check and reservation write rather than reading each file in isolation.
Note what the change explicitly does not cover. A fix for one endpoint may leave another path that creates the same resource. That may be an accepted scope choice or an incomplete fix. The review should make the distinction visible rather than silently expanding or shrinking the intended task.
Separate mechanical checks from reasoning
Use automated formatting, type checking and linting where the project already supports them. These tools reduce repetitive comments and let reviewers focus on decisions. Do not spend the review negotiating stylistic preferences that the repository has already settled.
Automation does not prove semantic correctness. A type-safe function can select the wrong account, apply a rule at the wrong time or ignore an important failure. Treat passing checks as evidence about their defined scope, not as a general approval signal.
When a mechanical issue appears repeatedly, improve the shared tooling or documented convention. A long stream of minor style comments can obscure the one behavior issue that actually blocks release. Keep the review’s priorities clear to the author.
Examine state transitions and side effects
Ask what persistent state changes and when. Consider partial failure between steps, duplicate requests and concurrent updates where they are relevant to the operation. Not every change needs distributed-systems analysis, but stateful behavior deserves more than a happy-path reading.
For the booking fix, a check followed by a separate unprotected write may still allow two reservations. The important question is whether the storage operation enforces the intended constraint under concurrency. A reviewer should ask for evidence at that boundary rather than merely suggest another in-memory condition.
Look at external effects such as emails, payments or file publication. If an operation retries, determine whether those effects can occur twice. The review should connect error handling to the actual consequence, not simply praise the presence of a retry loop.
Review failure behavior as a user experience
Follow expected errors through the system. Does the caller receive an actionable response? Is the application left in a consistent state? Can the user retry safely? A raw exception may be useful internally but unsuitable as the public explanation.
Distinguish temporary failures from invalid inputs or permission failures. A blanket catch-and-retry mechanism can hide defects, amplify load or repeat actions that should never be retried. Ask why the chosen response is appropriate for each meaningful category.
Check that diagnostics preserve useful context without exposing secrets or personal data. A new log statement can be operationally helpful and still contain too much information. Prefer identifiers and structured facts that answer the investigation question without copying the whole request payload.
Inspect authorization where resources are selected
When a change reads or modifies an identified resource, review how access is enforced. A valid resource identifier does not establish that the caller owns or may use it. Follow the account or tenant scope through the query and subsequent actions.
Be alert to authorization that occurs on one path but not another. A new background worker, export endpoint or administrative shortcut may bypass a check that exists in the ordinary interface. The reviewer should understand the trust boundary rather than relying on the presence of a familiar helper somewhere in the diff.
Keep the review proportionate and concrete. Point to the resource/action combination that lacks a demonstrated check, and ask for the intended policy. Avoid vague security warnings that do not help the author identify a behavior to implement or test.
Evaluate tests against the risk they claim to cover
Read the test’s setup, action and assertion. Does it fail for the original bug? Does it exercise the changed boundary, or only duplicate the implementation’s internal structure? A test that mocks away the relevant concurrency or database behavior may not support the claim made in the description.
Look for representative negative and edge cases where they matter. For the booking example, test competing attempts and confirm the resulting stored state. A pair of sequential requests may demonstrate duplicate rejection without demonstrating protection against a race.
Do not demand tests that add little evidence for a reversible, low-impact change. A text correction may need a focused visual or content check instead. Explain the uncertainty you want resolved and choose the least expensive meaningful verification for that uncertainty.
Consider deployment and compatibility
Ask whether the change requires a migration, configuration update or coordinated client release. The code can be correct in a fully upgraded environment while failing during a rolling deployment. Review the transitional states the release process can actually create.
Check whether older instances can read new data and whether new instances tolerate the old schema during rollout. If a feature flag controls the behavior, identify its default, owner and removal plan. A flag is not automatically a rollback for data already written.
Look for a credible recovery path. The reviewer does not need a disaster plan for every commit, but a high-impact change should explain what happens if its assumptions fail. Connect that explanation to observable release signals and the actual reversibility of the operation.
Write comments that make a decision easier
Describe the observed issue, its consequence and the specific change or evidence needed. A comment such as “This read is not scoped to the caller’s account; can this return another tenant’s record?” gives the author a concrete question to resolve.
Distinguish required changes from suggestions and optional preferences. The author should not have to guess whether a minor naming idea blocks approval. Use the team’s conventions, and explain tradeoffs when several implementations could be reasonable.
Avoid rewriting the entire solution in comments before understanding the constraints. Ask a focused question when intent is unclear, then evaluate the answer. Good review combines independent judgment with willingness to revise an initial interpretation.
Recheck the relevant changes after feedback
When the author updates the pull request, inspect the modified behavior and the evidence addressing the concern. A resolved comment marker is not proof that the issue is fixed. Equally, do not restart the entire review unnecessarily if the revision is narrow and its effects are clear.
Watch for new interactions introduced by the fix. A validation change may solve one case while changing an error response used by a client. Review the consequences that follow from the new diff rather than treating each comment as an isolated checklist item.
Record any accepted limitation or follow-up clearly. A follow-up should have an owner and a reason it can safely wait. Do not approve a known correctness gap merely because a ticket exists if the current release depends on that gap being closed.
Approve a behavior, not a feeling
The final review decision should reflect what was checked and what remains uncertain. For a substantial change, a short summary can identify the user path, failure cases and deployment assumptions reviewed. This helps future readers understand the evidence behind approval.
A useful pull-request review does not attempt to predict every possible defect. It focuses attention on the change’s purpose and meaningful risks, asks for proportionate evidence and leaves the code easier for another person to operate. That is a stronger contribution than finding the largest number of comments in the diff.