DEV Community

Cole Halton
Cole Halton

Posted on

The AI reviewer's check went green on a PR where 0 of 13 changed files got a comment

Here is a real merged pull request. pingdotgg/t3code#40736, 13 changed files, a normal web app diff. The CodeRabbit check run on the head commit is completed / success. The walkthrough comment rates it Merge Risk: Minimal. And when you pull the review comments, the bot commented on zero of those 13 files.

Not "few". Zero. Green check, minimal risk, no line in that diff ever got read.

I found that one by joining the check run to the comments instead of reading either on its own. So I did it across 43 merged PRs in five cohorts. Coverage of the changed files came in between 8% and 22% pooled, and the gate went green on the empty ones anyway.

The check measures that the reviewer ran

This is documented, and it is easy to miss. CodeRabbit's own page on what the CodeRabbit status check means spells out the states:

CodeRabbit did not review the commit. The check counts as passing for a required check, but no review happened.

That is the Skipped state, and Rate limited reads the same way. On GitHub you at least get a title like Review skipped or No files to review on the check run. On GitLab, Azure DevOps and Bitbucket there is no skipped or neutral state at all, so the same page says the commit status reports success and the description carries the reason instead.

So if your branch protection requires the CodeRabbit check, you have a required check that returns pass without a review. That is a real design decision with a reasonable rationale (a skipped review should not block you forever), and it also means the check is not evidence about your diff. The same page is explicit that files dropped by path filters or size limits are not reviewed, and the check can still pass.

Their troubleshooting page for missing reviews closes the loop on the extreme case: when path filters exclude every changed file, the review is skipped with the reason No files to review and the check passes. Lock-file-only and generated-code-only PRs end this way.

I want to be fair here. This is a reviewer being honest in its docs, and the behavior is the standard shape across the category. GitHub Copilot code review ships its own documented excluded-file list, which I went through earlier in Copilot's skipped files and what they do to your eval. Different product, same structural gap: the summary you read at merge time covers a scope you never measured.

Coverage is the denominator nobody prints

Finding counts are the metric everyone publishes, and I have already shown they track diff size almost perfectly (r=0.947 between churn and root findings on a 14-PR CodeRabbit cohort). Coverage is the metric that answers a different question: did the reviewer look at this file at all.

Method, all anonymous GitHub REST, no token:

  • GET /search/issues?q=is:pr is:merged reviewed-by:coderabbitai[bot]&sort=updated for the cohort
  • GET /repos/{repo}/pulls/{n}/files?per_page=100 for changed files, per the pull request files endpoint
  • GET /repos/{repo}/pulls/{n}/comments?per_page=100 for review comments, paginated, per the review comments endpoint
  • GET /repos/{repo}/commits/{head}/check-runs and filter name == "CodeRabbit" for the gate
  • roots = comments where login starts with coderabbitai and in_reply_to_id is absent
  • coverage = |paths touched by roots intersect changed files| / |changed files|

What came back:

Cohort PRs Changed files Touched Pooled Median PRs with zero
mixed repos 12 178 32 18.0% 17.4% 1
scylladb only 6 86 9 10.5% 5.0% 3
mixed + filter 10 212 17 8.0% 20.8% 1
mixed + filter 9 140 29 20.7% 25.0% 0
mixed + check join 6 46 10 21.7% 20.8% 1

One number from the same pulls is worth knowing on its own: of 54 root comments in the first cohort, 32 had line: null. Those are findings pinned to a revision that is no longer the current diff, which is why coverage has to be computed by path and not by line. I hit that in the off-head verdict audit too.

Some of the gap is documented scope, so subtract it before you blame the model

The honest version of this measurement filters the diff the way the tool's config says it will. CodeRabbit publishes every default exclusion pattern, and the list is long: dist, node_modules, .next, .nuxt, .cache, vendor, coverage, out, bin; every *.lock plus package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb, Package.resolved and *.sum; folders named generated, gen, __generated__ and their variants; *.generated.*, *.tsbuildinfo, *.d.ts, *.map, *.min.js, *.min.css; the eight-character-hash bundle pattern that Vite and Rollup emit; images, fonts, docs, data files and binaries.

Two things in there are worth a second look for a team reviewing agent output. **/*.d.ts is the published contract of a library you consume. **/generated/** is where your codegen writes, and codegen is what agents reach for. Both are code that ships.

When I applied that filter, 12% to 23% of the changed files in my cohorts fell out of scope by default. That is real and it is disclosed, so it belongs in the numerator, not in a complaint. It moved pooled coverage from 8.0% to 9.1% on one cohort and 20.7% to 26.9% on another. The filter explains a chunk of the gap. It does not explain zero of 13.

There is one more trap in the same doc, and it is the kind of thing that turns coverage to zero without anyone noticing. A lone include pattern is an allowlist:

A lone src/** stops CodeRabbit from reviewing everything outside src/, including package.json and your CI files.

CodeRabbit accepts a list with only include patterns and does not warn you. So if someone added src/** to narrow review, the reviewer quietly stopped looking at your CI config, your dependency manifests and your infra. The check stays green. That is a config bug that reads like a passing gate, and it is worth grepping your .coderabbit.yaml for today.

The four numbers to add to your PR audit

Run this over your last 20 merged PRs and print four numbers per PR. Not a dashboard, just a table:

  1. changed_files from /pulls/{n}
  2. touched_files = distinct path values in /pulls/{n}/comments from bot logins with no in_reply_to_id
  3. coverage = touched / changed, plus a filtered version with your reviewer's documented exclusions removed
  4. the reviewer's check conclusion on the head commit

Then look at the rows where coverage is 0 and the conclusion is success. That intersection is the whole point. It is the set of merged PRs your gate called reviewed and no reviewer read.

Two implementation notes from doing this the wrong way first. Count comment objects, not threads, and paginate: a single page silently truncates high-volume PRs, and my first unpaginated pass missed 16 root comments on one pull. And when you build the cohort from search, check /rate_limit before you conclude a repo has no matching PRs, because a 403 with an empty items array reads exactly like zero results.

If you want the number without writing the script

Every tool in this space has a review scope you can inspect, and the useful thing is to read it before you buy or before you trust the check.

CodeRabbit gives you path_filters in .coderabbit.yaml and an app setting, which is good, because you can diff the effective config against your intent. Copilot's exclusions are documented but not yours to edit, which is why the coverable path there is a second tool for dependencies and generated code. Greptile and most hosted reviewers expose per-repo include and exclude patterns in their own dashboard. Kodus is the one in this list you can self-host and read: the review scope and path filters live in the repo you deploy, so git log on the config is the audit trail, and you can run the coverage script against its own output the same way. Same criterion for all of them: can I print the set of files the reviewer will consider, and does it match the set of files my team thinks is under review.

If your reviewer is closed and its scope is a mystery, you still have the API and you can measure what it actually touched. The gate just is not the measurement.

A green CodeRabbit check on a PR is a true statement about a process. It ran. Whether it read your diff is a separate number, it takes about 40 lines of Python to compute, and almost nobody prints it. That is the gap between "we turned on AI review" and "we know what our AI review covers", and it is the difference between a gate and a green light with nothing behind it.

Top comments (0)