Topic 5 of 5 · 5 min read
Working with automated AI reviewers
Goal: Triage a set of AI reviewer comments into real issues, noise and false positives, and say what the bot missed.
Treat an AI reviewer as a fast first pass that finds some real bugs and some noise; a human still decides, and a bot is never the only approver. Tools such as GitHub Copilot code review and Claude-based review actions read a diff and post comments in seconds.
Check yourself · 1 of 3
Which comment from an AI reviewer is most likely a false positive?
Why it matters
A bot is cheap, tireless and consistent about the things it sees: a missing null check, an unused variable, a copy-paste slip. It is weak where the problem sits outside the diff: the product intent, a caller in another repository, a decision made in last week's meeting. It also sounds sure when it is wrong, and it can raise the same low-value comment on every pull request until people stop reading its comments.
How to triage
- Sort every comment into one of four bins. Real issue: a bug or risk you can reproduce. Worth doing: a fair improvement, not urgent. Noise: true but trivial, or already covered by the linter. False positive: wrong, because the bot misread the code or lacked context.
- Verify before you act. Reproduce the claimed bug or read the code it refers to. Do not apply a bot's suggestion without reading it; suggested fixes can introduce new bugs.
- Reply to the false positives. A one-line reason, or a note in the instructions file, stops a repeat.
- Ask what it missed. Read the PR for what a diff-only reader cannot see: intent, tests that should exist, callers, data and security effects.
- Tune it. Give the reviewer project rules (a custom-instructions file), narrow its scope and drop comment types the team always ignores.
- Keep the human gate. Branch protection should require a human approval. A green bot check is not an approval.
Before and after
Weak: the author clicks "apply" on all nine bot suggestions and merges because the bot gave it a thumbs-up.
Better: the author sorts the nine. Two are real (an unchecked index, a missing await), three are worth doing, three are noise, one is a false positive because the value is validated in a middleware the bot never saw. The author fixes two, defers three, dismisses four with a reason, and asks a human to review the part that handles refunds, which the bot did not comment on at all.
What goes wrong
- Silence read as approval. No comments from the bot does not mean no bugs.
- Applying suggestions blindly. An automated fix may change behaviour.
- Comment fatigue. Too much noise teaches the team to ignore the bot, including its good catches.
- Bot as sole approver. Nobody then understands the change.
Examples
A false positive
A bot says: "user_id may be null at line 31." The route's middleware already rejects requests without a user. The author replies, "Validated in requireUser before this handler", and adds a line to the review instructions file so the bot checks middleware first.
What the bot missed
Nine comments on a refund change, all about style and one unused import. None notes that the refund can be issued twice if the request is retried. A human reading for intent asks for an idempotency key.
Key points
- Use an AI reviewer as a first pass; a human approval is still required.
- Sort each bot comment into real issue, worth doing, noise or false positive after checking it.
- Never apply a suggested fix without reading it, because fixes can add new bugs.
- A bot that finds nothing has not proved the change is correct.
- Tune the reviewer with project instructions and drop comment types that are always noise.
Common mistakes
- Reading a quiet bot as a sign that the change is safe.
- Applying all suggested fixes with one click and not reading them.
- Leaving a noisy bot untuned until everyone ignores it.
- Letting a bot approval satisfy the required review.
Check yourself · 2 of 3
An AI reviewer posts no comments on your pull request. What does that tell you?
Check yourself · 3 of 3
What should you do with a fix the bot suggests?
Practice items, not counted towards your mastery.
Start here
- Google Engineering Practices: code review (opens in a new tab)ArticleFree
The reviewer and author guides, written for teams that review every change.
- How to write code review comments (Google Engineering Practices) (opens in a new tab)ArticleFree
Kind, specific comments that explain why and leave the decision to the author.
- How to handle reviewer comments (Google Engineering Practices) (opens in a new tab)ArticleFree
How an author answers feedback, resolves disagreement and avoids taking it personally.
More for this topic
- Using GitHub Copilot code review (GitHub Docs) (opens in a new tab)DocsFree
How a bot reviewer is requested and what it posts on a pull request.