{"slug": "i-planted-20-bugs-for-three-ai-reviewers-being-right-wasn-t-enough", "title": "I Planted 20 Bugs for Three AI Reviewers. Being Right Wasn't Enough.", "summary": "A developer tested three AI code reviewers by planting 20 bugs across 40 short Python functions and scoring only the concrete failing inputs each reviewer supplied, not their explanations. ChatGPT and Grok each caught all 20 planted bugs with zero false alarms, while DeepSeek V4 Pro caught 17; in one case DeepSeek correctly described a bug but supplied an input where the buggy and fixed versions behaved identically, so it earned no catch. The developer argues that scoring explanations rather than executable evidence would have credited DeepSeek for that answer.", "body_md": "| Reviewer | Planted bugs caught (of 20) | False alarms (of 20 clean functions) | \n|---|---|---|\n| ChatGPT | 20 | 0 | \n| Grok (possible contamination: same account as the key reviewer) | 20 | 0 | \n| DeepSeek V4 Pro | 17 | 0 | \n| llama3 8B (local) | no answer | no answer | \n\nThat is round 1 of a small test I ran this week. I wanted to know which AI reviewer I should trust to check changes to my agents, so I stopped asking them and started measuring them.\n\nMy coding agent, Claude, wrote 40 short Python functions, each with a plain-English spec. Twenty were correct. Twenty had exactly one planted bug, in five kinds: an off-by-one boundary, a wrong comparison, a bad fallback, a quiet change to what the spec asks for, and a wrong default. For every buggy function it kept a hidden copy with the bug fixed.\n\nEach reviewer got the same instruction and the same 40 functions in a fresh session, with no hints about how many were broken. For every function it had to answer OK or DEFECT. A DEFECT also needed a concrete input where the function breaks its spec.\n\nHow each one ran, as recorded:\n\nThis is the rule that matters. A reviewer's explanation is saved and never scored. What gets scored is the input they gave: we run it through the buggy function and through the fixed copy. If the two behave differently, the reviewer caught the bug. If they behave the same, the reviewer said DEFECT for a reason their own evidence does not show.\n\nHere is a simplified version of that check:\n\n``` python\ndef outcome(fn, args):\n    try:\n        return (\"value\", fn(*args))\n    except Exception as e:\n        return (\"raise\", type(e).__name__)\n\ndef same(x, y):\n    if x[0] != y[0]:\n        return False\n    a, b = x[1], y[1]\n    if isinstance(a, float) and isinstance(b, float) and a != a and b != b:\n        return True   # NaN never equals itself; treat two NaNs as the same result\n    return a == b\n\ndef judge(answer, item, reference, has_bug):\n    if not isinstance(answer, dict):\n        return \"invalid\"\n    if answer.get(\"verdict\") not in (\"OK\", \"DEFECT\"):\n        return \"invalid\"\n    if answer[\"verdict\"] == \"OK\":\n        return \"missed\" if has_bug else \"ok\"\n    args = answer.get(\"failing_input\")\n    if not isinstance(args, list):\n        return \"invalid\"\n    if not has_bug:\n        return \"false_alarm\"   # any DEFECT on correct code is a false alarm\n    different = not same(outcome(item, args), outcome(reference, args))\n    return \"caught\" if different else \"wrong_reason\"\n```\n\nOn a correct function there is nothing to fix, so any DEFECT on it is a false alarm. The real scorer also adds a timeout, compares floats with a tolerance (including inside lists), and rejects code outside an allowed subset of Python before running anything. It is not a sandbox.\n\nOne assumption sits under all of this: the hidden fixed copy is treated as the truth. A demonstrated difference counts as a catch within the test's own rules. It is not independent proof that the fixed copy itself is correct, which is why every function was reviewed against its spec before the test was sealed. And a difference is only meaningful when the input falls within what the spec allows; this scorer does not check that, so a reviewer could in principle earn a catch with an input the spec never covered.\n\nOne function, `get_nested`, follows a list of keys through nested dicts and should return None when a key is missing. The planted bug returned the half-finished value instead.\n\nAll three reviewers flagged it, and all three explanations were right. ChatGPT and Grok gave the input `[{\"a\": 1}, [\"b\"]]`. The buggy version returns `{\"a\": 1}`, the fixed one returns None. Caught.\n\nDeepSeek wrote: \"On a missing key it returns the partially-traversed dict instead of None.\" Correct. But its input was `[{\"a\": 1}, [\"a\", \"b\"]]`. On that input the code reaches `1[\"b\"]`, which raises a TypeError, and both versions return None. Same output, so no catch.\n\nIf I had scored explanations, DeepSeek gets that one. Scoring the evidence, it doesn't. That gap is the whole reason the test runs the input instead of reading the sentence.\n\nDeepSeek's other two misses: it called one buggy function correct, and on another it wrote Python's `None` instead of JSON's `null`, so that single answer could not be read. The other 39 of its answers were still scored.\n\nThese scores use cleaned captures: copy and paste escapes were removed from ChatGPT's response, and a launcher warning line from DeepSeek's. Answer values were preserved, and invalid answer content stayed invalid.\n\n**It does not say ChatGPT and Grok are equal, or perfect.** This round didn't separate the two highest-scoring sessions. Bugs that were too easy is one explanation; for Grok's row, possible contamination is another. On 20 bugs, the 95% Wilson interval for a perfect score runs from 84% to 100%, and DeepSeek's 17 of 20 (64% to 95%) overlaps it.\n\n**One model wrote every bug.** The functions are short and use only builtins. Nothing here measures review of real agent code, with state, timing and network payloads.\n\n**The local model never answered.** llama3 8B on my 8 GB MacBook Air pushed the machine into swap so hard the laptop slowed to a crawl. My last attempt measured about 4 bytes every 90 seconds, a projection of roughly 37 hours for one complete answer. It is recorded as no answer on all 40.\n\n**Grok's memory state is unknown.** The AI that reviewed the answer key before it was sealed is also Grok, on the same account. The Grok reviewer ran in a private chat, but if Grok's memory crosses chats, its 20 of 20 could be contaminated. I can't rule that out from here.\n\nWhat does hold: across 60 checks of correct code, none of the three raised a false alarm. On this set, when they said \"bug,\" there was one.\n\nThe agent that planted the bugs knew the answers, so it never graded. Encryption can't erase what the planter already knows. It restricts access to the saved key; comparing files against the recorded fingerprints makes later changes detectable. Independent review covers the rest.\n\nThe answer key was encrypted with a passphrase only I typed, and it stayed locked until the three completed responses and the local model's no-answer record were locked. Before any reviewer saw the test, the fingerprints of the key, the functions, the instruction and the scorer were written down on paper and logged. After the answers arrived and before the key was opened, every answer file was fingerprinted too.\n\nA second AI, from a different company than the one that planted the bugs, tried to break the scorer before it ran. After the answers arrived, one of them turned out to contain a single unreadable row, so the scorer's answer reader had to change. The second AI broke the first version of that change: one malformed answer shape could keep a wrong verdict, and another could silently drop a row. The reader was rebuilt, the second attempt to break it did not land, and the new scorer's fingerprint was logged before the key was opened.\n\nRound 2 is already sealed: 40 new functions, longer, with bugs that often show only when two conditions meet, like page counts that divide exactly or intervals that touch without overlapping. The AI that checks the work blocked the question set three times before it was sealed, including one \"correct\" function that accepted Arabic-Indic digits in an IP address. Results go up when the reviewers finish.\n\nIf you've measured AI code review yourself: how did you keep the reviewer's explanation from getting credit its evidence didn't earn?", "url": "https://wpnews.pro/news/i-planted-20-bugs-for-three-ai-reviewers-being-right-wasn-t-enough", "canonical_source": "https://dev.to/kenielzep97/i-planted-20-bugs-for-three-ai-reviewers-being-right-wasnt-enough-6lk", "published_at": "2026-11-29 01:06:10+00:00", "updated_at": "2026-11-29 01:14:01.907336+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "developer-tools"], "entities": ["ChatGPT", "Grok", "DeepSeek", "llama3", "Claude"], "also_reported_by": [], "takeaway": "Score AI code reviewers on a concrete failing input run against both the buggy and fixed function, not on their explanations: DeepSeek correctly described a bug but gave an input where both versions returned None, earning no catch.", "recommendation": {"advice": "When evaluating AI code reviewers, require a concrete failing input and verify it produces different output on the buggy and fixed versions; explanations alone can be right while the evidence is wrong.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/i-planted-20-bugs-for-three-ai-reviewers-being-right-wasn-t-enough", "markdown": "https://wpnews.pro/news/i-planted-20-bugs-for-three-ai-reviewers-being-right-wasn-t-enough.md", "text": "https://wpnews.pro/news/i-planted-20-bugs-for-three-ai-reviewers-being-right-wasn-t-enough.txt", "jsonld": "https://wpnews.pro/news/i-planted-20-bugs-for-three-ai-reviewers-being-right-wasn-t-enough.jsonld"}}