A code-review agent that cries wolf will be ignored, including when it is right. The false positive rate is the number that decides trust: how many of its findings are real problems, and how many are noise. The check is a manual review of a sample of findings, judged against the code, not against the agent’s confidence.
Before you start
A set of pull requests the agent reviewed, with its findings, and a developer who can judge them.
Collect the findings from real reviews
Pull the findings from the last 20 pull requests the agent reviewed, with the check name, the severity, and the line each one concerns. Keep the human decision for each: accepted, rejected, or ignored.
Count the findings per check: a check that fires on every pull request is either the most useful check or the noisiest one.
Judge each finding by hand
For each finding, read the code at the line and mark it true positive if the problem is real, and false positive if the code is fine. A finding that is technically correct but useless, such as a style note on generated code, counts as a false positive for trust purposes.
Have the same developer judge all of them in one sitting, so the standard stays consistent.
Fix the noisy checks, not the developers
For the check with the most false positives, fix the check: narrow its rule, exclude generated files, or lower its severity from block to note. A check that is wrong half the time should not block a merge.
Re-measure after the fix on the next 20 pull requests, and compare the rates.
Practice check: fictional Maple Corner agent, 20 pull requests, 40 findings
The table below is fictional practice material, worked out by hand from the stated review. It is the expected result for the practice sample, not a run of any agent.
| Check | Findings | True positives | False positives | Verdict |
|---|---|---|---|---|
| Missing error handling | 12 | 11 | 1 | Pass – trusted |
| Unused variable | 15 | 6 | 9 | Fail – too noisy |
| Secrets in code | 3 | 3 | 0 | Pass – trusted |
| Style notes | 10 | 2 | 8 | Fail – too noisy |
Twenty-two of forty findings are true positives, but the unused-variable and style checks are mostly noise: 9 of 15 and 8 of 10 are false positives. Those two checks are narrowed and lowered to notes.
Expected result. UNTESTED: the counts in the practice table are worked out by hand, not measured by reviewing real findings. Pull your own agent’s findings from the last 20 pull requests, judge each one by hand, and fix the check with the most false positives.
Limits
- A finding that is technically correct but useless still erodes trust: count it as a false positive.
- A blocking check must be right almost every time: lower a noisy check to a note.
