I review by staring at the diff alone, blind to the context it touches
In one sentence: you show me a red-and-green diff and I look at those few lines and say "looks fine." But I didn't check who calls the function that changed, didn't check what the deleted line was guarding against, didn't check this change against the unwritten conventions elsewhere — reviewing the lines that changed is easy; seeing the whole web they touch is what review actually is.
Symptom
You paste me a PR's diff, or the review tool feeds me only "the lines that changed." I stare at the plus and minus signs and pronounce, "logic is sound, ready to merge."
But I never went to check: this function whose signature changed — what else calls it; that deleted "looks-useless" check — which boundary it was actually catching; this newly added field — whether it lines up with the database schema and with the frontend's expectations; whether this change quietly violates an assumption some other module makes about it. The result: viewed on its own, the diff is flawless; put back into the whole repo, it's wrong. And the "LGTM" I gave only answers for the former.
Why this happens
Some review workflows supply only diffs or local methods; retrieval-capable agents can also miss relevant callers. Ericsson's experience report describes its industrial setup, not every tool's default inputs.
AACR-Bench finds that context granularity and retrieval affect results differently across models, languages, and agent use. This does not mean more repository text always helps. Retrieve relevant contracts, inspect actual coverage, and control noise and cost.
A report should distinguish directly inspected code, inferred impact, and unknowns. Repository access is not evidence that the repository was inspected.
Consequences
- Cross-file breakage gets waved through. A signature changed without checking every caller, a defense deleted without knowing what it defended against — these don't show up in the diff, yet they blow up in other files (echoing fixing A quietly breaks B).
- "Locally sound" masks "globally wrong." A yes I give based on half the picture is more dangerous than plainly saying "I can't see all of it," because it makes you believe the change was evaluated in full.
- The bigger the change, the less reliable. The more files a change touches and the more tangled its implicit contracts, the more "just the diff" misses — and changes like that are exactly the ones that most need a global review.
What to do instead
Feed in enough context before the review, or give me the ability to fetch it myself; don't let the review's field of vision stop at the diff boundary.
- Proactively feed the adjacent context. At minimum, give me: the definition of the changed symbol and relevant callers, the relevant fragments of depended-on files, the corresponding tests, and the original requirement / spec this change is meant to satisfy. Let what I review be "the change plus the web it sits in," not a few isolated lines.
- Have me map the blast radius first, then review. Require me to open by answering "which files / which callers / which conventions does this change affect," lay the global picture out first, then review item by item — forcing my vision to stretch from the diff out to the repo.
- Make deletions and signature changes trigger a whole-repo reference check. For changes like "what got deleted" and "signature / schema / interface changed," make it a rule to grep whole-repo references first: does anyone still depend on this deleted code? does anywhere else still assume the changed contract is the old one?
- Use a review setup that can access the repo. When you can let the review agent actually read the repo (rather than just pasting a diff), give it that capability; the more it can pull callers and dependencies on its own, the less it gets trapped in the local view.
Tool differences
Tools may provide only changed blocks or support repository retrieval. Check the actual version and run evidence: reviewed revision, inspected files, and callers not found. Supply relevant context proportionate to risk rather than indiscriminately feeding the whole repository. Budget broad retrieval and report omissions at the limit.
Example
Before:
You: (pastes only the diff) Review this: change getUser()'s return from User to User | null.
Me: Nice change, it handles the user-not-found case. LGTM.
Illustrative assumption: nullable-type static checks are off; 14 places across the repo read user.name directly, none check for null;
when the user doesn't exist, NPEs everywhere. The change itself is fine —
what's wrong is that I never looked at those 14 callers.
After:
You: Before reviewing this, grep the whole repo for getUser()'s callers
and list which ones don't handle null.
Me: Found 14 calls, 11 of which read .name/.email directly without a null check:
src/profile.ts:30, src/email.ts:12 … (listed one by one)
Making the return type nullable is correct, but these 11 must add null
handling in step, otherwise they'll NPE.
You: (fixes the 11 first, then merges the signature change)
For the same change, "just the diff" yields an LGTM that answers for half the picture, while "grep the whole repo for callers first" yields the list that actually stops the production NPE.
When the exception applies
"Don't look at just the diff" targets changes that move the whole; for some changes, the diff really is all the context there is:
- Small, self-contained changes: tweaking a constant, adjusting a string, fixing an obvious typo — it touches no contract elsewhere, the diff is the complete information, and dragging in a pile of context is just waste.
- When the context is already in hand: if you and I just wrote this code together in the same session and the callers are all already in context, then walking through a "whole-repo grep" again is redundant.
- New code may have no existing callers, but still needs checks of dependencies, initialization, side effects, build integration, and external contracts. No callers does not mean no context.
The test: an exception holds only when the change genuinely touches nothing outside the diff. The moment it involves a deletion, a signature / interface / schema change, or shared code that many places depend on, it goes back to the default — feed in enough context before reviewing.
How this differs from neighboring pitfalls
- Review that only nitpicks the surface, missing the logic bugs: that one is me having the context and still not digging deeper, picking only at the surface; this one is me never having gotten the repo context at all — no straw, no bricks. One lacks the will, the other lacks the material.
- Fixing A quietly breaks B (missing regression): that one is about a change that actually broke old functionality without a regression test to catch it; this one is about the review stage not looking at the context and failing to stop it. They're often cause and effect: a context-starved review is precisely the upstream of a regression slipping through.
- A design that looks right but can't survive the edges: that's the design layer's "plausible but actually brittle"; this is the review layer's "looks reasonable because I only looked at the local piece."
Version notes
Checked both original papers on 2026-10-29. They support evaluating context selection, not a universal claim that every model takes shortcuts or that unlimited context always improves review. Revalidate changes to benchmarks or retrieval strategy.