What context did each of my 11 cases actually need? Sorting an AI reviewer's results by hand

2026-11-29来源 dev.toEnglish

Nov 29, 2026 · @spacexcx

I sorted 10 cases from my AI diff-reviewer experiment, plus one out-of-scope case, by how much context each one needed. The sorting is mine, done after I knew the outcomes, so it is a ledger and not a test.

The tool reads a git diff and flags possible logic bugs, quoting the line behind each flag. In my earlier post I reported 79 pull requests: four flags that maintainers fixed, all in the first 29 PRs, none in the next 50. One reader suggested the gap came from missing context. This post sorts what I have. It does not test that idea.

Correction to my earlier post. I wrote that the tool only sees the diff. That was wrong for most runs. From v0.1.0 onward, it sends the diff plus the full contents of each changed file up to a size cap. It never sees files the PR did not touch.

What the tool actually sends

The tuning run (Case 1, Godot #102513, on prompt v0.1) ran before full-file context was added, so it saw only the diff. Cases 2–11 ran on v0.1.1–v0.1.3, which send the unified diff and the full text of each changed file. A single file is capped at 40,000 characters, and all full files together are capped at 300,000 characters; past either cap, remaining files fall back to diff-only. (I did not re-measure exact character counts for the larger C/C++ files like Assimp and curl, so large individual files may have hit the 40k fallback.)

The tool never sees unchanged files. A caller in another file, a type definition elsewhere, or a framework contract is invisible to it unless the changed file happens to restate it.

How I sorted the cases

I gave each case one of four labels, based on what a reviewer would need to judge the flag:

  1. Inside the hunk. The problem is readable in the changed lines themselves.
  2. Same file. The reviewer needs the surrounding function or the rest of the changed file.
  3. Other file or external contract. The reviewer needs code outside the changed files, or a framework or library contract.
  4. Unclear. I could not decide.

I did this by hand, one case at a time, and I already knew each outcome. Some of my reasons leaned on it. I wrote "the code is legitimate" for a case I had already dismissed. That makes these labels a record of my reading, not an independent measurement.

The 11 cases

# Case Set Context class Tool flagged? Outcome
1 Godot #102513 Tuning set Other file or external contract Yes Dismissed: false alarm, caught by the second-pass critique
2 driftbench #15 / #26 Hand-picked live Inside the hunk Yes Author fixed, merged
3 Godot #119097 Hand-picked live Inside the hunk Yes Author fixed
4 Godot #123641 Hand-picked live Same file Yes Review thread resolved, code updated
5 PyTorch #197776 Hand-picked live Other file or external contract Yes Author fixed an import-time crash in torch/_dynamo/variables/memory.py (commit 2b2c4fc)
6 Universal-Firmware-Flasher-Tool #1 Hand-picked live Same file Yes No reply, unresolved
7 Strawberry #4685 Controlled Python Other file or external contract Yes Dismissed after I read the code
8 Conan #20415 Controlled Python Inside the hunk Yes Dismissed after I read the code: speculative
9 Assimp #6955 Controlled C/C++ Unclear Yes Dismissed after I read the code: behaviour differs only on malformed input
10 Werkzeug #3113 Calibration (known regression) Inside the hunk No Missed on the first run
11 curl #23517 Out of scope (repo above my star ceiling) Unclear Yes Dismissed after I read the code: speculative

Cases 1–10 are in scope. Case 11 is listed for completeness. Case 10 is a known regression I picked for calibration, so it is not a live PR and was never a fair "did it flag a random PR" test. No author names appear here.

What the table shows, and what it does not

The four cases an author fixed or resolved sit in three of my four classes: two inside the hunk, one in the same file, one needing another file or contract. So the table does not say "the tool only works when the answer is in the diff". With one confirmed case in the external class, I also cannot say it works there. Three cases is too few for a rate.

Per class, counting cases 1–10:

  • Inside the hunk (4): two fixed, one dismissed, one missed.
  • Same file (2): one resolved with a code update, one with no reply.
  • Other file or external contract (3): one fixed, two dismissed.
  • Unclear (1): dismissed.

Three things this cannot separate. First, all four confirmed cases come from the set I picked by hand, so context class and selection are tangled together. Second, I labelled the PyTorch case after the author confirmed it, so I cannot tell whether the full-file context supplied what the tool needed. Third, a reader suggested that feeding in callers would cut false alarms. I never ran the tool with callers, so this table neither supports nor refutes that.

What the table also cannot see is any bug the tool did not flag. Case 10 is the only miss I know about, and I chose it.

Limits

  • Small and hand-built. Ten in-scope cases, one of them a calibration case I picked. Nothing here supports a rate.
  • One labeller, outcomes known. I am the only person who sorted these, after the fact.
  • Mixed populations. The cases come from a tuning set, a hand-picked live hunt, two controlled rounds and a calibration set. They were not drawn the same way.
  • Different tool versions. The tuning set ran on gemini-1.5-flash with prompt v0.1. The live hunt ran on gemini-3.6-flash with prompt v0.1.1. The controlled Python rounds used gemini-3.6, 3.7 and 3.8 flash with prompts v0.1.2 and v0.1.3. The C/C++ round used gemini-3.5-flash-lite with v0.1.3.
  • Claims stay inside the evidence. For "fixed", I mean the author said so or committed a change. I did not verify that the original code would have crashed, beyond what the linked commit states.

Data and what comes next

The raw table, with no author names, is here: https://github.com/Spacexcx/pr-check/blob/main/cases_context.csv

Next week I will rerun the tool on PRs picked by a script, not by me. I will publish the selection rule before running it, and report every flag, including the dismissed ones. After that I want to rerun the 10 cases above with the calling code added to the input, three runs each, to see whether the output changes.

原文:https://www.a8q9.cn/en/article/what-context-did-each-of-my-11-cases-actually-need-sorting-an-ai-reviewer-s-resu-d63483.html

相关文章