cd /news/ai-tools/plant-a-bug-before-you-trust-an-ai-c… · home › topics › ai-tools › article
[ARTICLE · art-180060] src=infoworld.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Plant a bug before you trust an AI code reviewer

Teams running AI code reviewers should measure them with mutation-style planted-defect tests rather than vendor activity metrics, according to an analysis that recommends seeding two or three dozen real pull requests with single realistic bugs and scoring the reviewer against an answer key. The analysis says teams should track two numbers — the catch rate on planted defects and the volume of other comments left on the same pull requests — because a reviewer that buries a caught defect among thirty style comments may as well have missed it. It cites the author's peer-reviewed work on self-healing web locators (DOI 10.1016/j.jss.2026.113157) in framing AI repair as assisted triage rather than automatic fixing.

recommendation

Plant known defects in copies of your own merged pull requests and score your AI reviewer on catch rate and surrounding comment noise, not on comment volume or suggestion acceptance.

more in playbook: Evals and testing for LLM apps
read5 min views1 publishedDec 2, 2026

AI code review has moved from experiment to default in a remarkably short time. Many teams now have a model reading every pull request before a human does, leaving comments, suggesting fixes and, increasingly, approving small changes on its own.

When I ask engineering leaders how they chose their tool, the answers sound reasonable: it leaves useful comments, developers accept a good share of them, it catches things people used to miss. When I ask how often it misses a real defect, the room usually goes quiet.

That silence is the problem. A code reviewer is a test of your code. Like any test, its value lies in what it fails to let through, and most teams have no measurement of that at all. It is the same trap I described in testing, where AI testing dashboards stay green while the checks behind them quietly stop checking.

The metrics vendors show, and the ones teams track internally, are almost all activity metrics. How many comments per pull request. What share of suggestions developers accepted. How much review time was saved.

Those numbers are not useless, but they answer the wrong question. Consider an illustrative reviewer that leaves forty comments on a pull request: naming, formatting, a missing docstring, a suggestion to extract a helper. Developers accept most of them, because they are cheap to accept. On the same pull request, it waves through an inverted condition in a billing path. Every dashboard says that reviewer had a good day.

Activity metrics also reward the wrong behavior over time. A reviewer that comments more looks more valuable, even if those comments crowd out the one that mattered. A reviewer that stays quiet on a clean change looks lazy, even when quiet is the correct answer.

If you want to know whether your AI reviewer catches defects, you have to give it defects you already know about. The idea is borrowed from mutation testing, which has been used for decades to check whether a test suite would notice a deliberately introduced bug. Here the target is the reviewer rather than the test suite.

Start with a small set of real pull requests from your own codebase, changes that were reviewed and merged without incident. For each one, make a copy with a single planted defect of a kind that matters to you. Good candidates include:

Keep the plants realistic. A defect that sticks out like a syntax error teaches you nothing; one that looks like a plausible slip by a tired engineer is exactly what a reviewer is for. Two or three dozen planted pull requests across your most important code paths is enough to start.

Record, for each planted pull request, what the defect is and where it lives. That record is your answer key.

Feed the planted pull requests through the reviewer exactly as it runs in production: same configuration, same prompt, same context. Then score each one against the answer key.

Be strict about what counts as a catch. A comment somewhere in the file is not a catch. The reviewer has to point at the defect, or close enough that a developer reading the comment would find and fix it. A vague “consider adding more validation” on the right function is a judgment call; decide your rule in advance and apply it consistently.

Keep two numbers. The first is the catch rate: of the planted defects, how many did the reviewer flag? The second is the noise around those catches: how many other comments did it leave on the same pull requests? A reviewer that catches a planted defect buried among thirty style comments may as well have missed it, because nobody will read that far.

Then look at the misses one by one. Patterns matter more than the headline number. In my peer-reviewed work on self-healing web locators, I framed AI repair as assisted triage rather than an automatic fix, and the same framing applies here: the misses tell you where a person still has to look. If the reviewer reliably catches null-check removals but never notices a deleted authorization check, that is a specific, fixable gap, and an important one.

The planted-defect set is not a one-time evaluation. It is a regression suite for your reviewer.

AI reviewers change underneath you. The vendor updates the model; your team tweaks the prompt or the rules; someone adds more context to the input to reduce noise. Any of these can quietly change what the reviewer catches. Re-run the drill on every such change, and on a schedule even when nothing obvious has changed.

If the catch rate drops, treat it the way you would treat a failing test in CI: investigate before you ship. In practice that might mean rolling back a prompt change, adding a rule, or narrowing what the reviewer is allowed to approve without a human. The same drill is the fairest way to compare tools. If you are evaluating two vendors, run both on the same planted set. You will learn more in an afternoon than from any demo, much as an exit test tells you more about an AI agent than its feature list does.

Finally, use the results to set boundaries. A reviewer that catches most planted defects in configuration and documentation changes but misses half of them in authorization code should not be allowed to approve authorization changes on its own, however helpful its comments are elsewhere.

That is not an argument against AI code review. In my experience these tools catch real problems and save real time. It is an argument for knowing, with evidence, where they can be trusted and where a person still has to look.

We would never let a new test suite into CI without checking that it fails when it should. An AI reviewer deserves the same treatment. Plant a bug, see whether it notices, and keep checking.

── more in #ai-tools 4 stories · sorted by recency
── more on @infoworld 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/plant-a-bug-before-y…] indexed:0 read:5min 2026-12-02 · —