K1.6.2 Task 1.6

Single-Pass Reviews Produce Contradictory Findings: Split Into Per-File + Cross-File

Loading 18 files into a single prompt causes attention dilution — the model praises async/await in one file and criticizes identical usage in another. The fix: split into per-file local passes (consistent depth) plus a separate cross-file integration pass (catches interface mismatches).

The attention dilution problem

An 18-file single-pass review produces contradictory feedback: async/await praised in auth.ts as “clean, modern approach” but flagged in payment.ts as “unnecessary complexity — use callbacks.” Both files use the identical pattern. The model’s evaluation criteria drifted mid-review.

This is a hallmark of attention dilution: earlier files get different treatment than later ones, evaluation standards shift as context grows, and the model loses track of its own criteria.

Phase 1: per-file local analysis

Review each modified file independently for local issues: bugs, security vulnerabilities, performance problems, style violations. Each file gets focused, consistent attention. Detection rate for single-file issues: 95%.

No attention dilution because each review focuses on one file at a time. The model applies consistent standards to each file without interference from unrelated code.

Phase 2: cross-file integration analysis

A separate pass examining relationships between files:

  • Interface compatibility: function signature changes match their callers
  • Data flow: format changes propagate through the pipeline
  • Shared state: concurrent access patterns remain safe

The critical case: auth module changes token format, payment module still expects old format. Per-file reviews approve both individually — each file is “internally consistent.” Only the integration pass catches the mismatch.

Integration pass design

Provide the integration pass with:

  1. Summary of per-file findings — context about what was already reviewed
  2. Interface definitions — function signatures, type exports, API contracts from all modified files
  3. Explicit cross-file-only scope — instructions to check data flow, interface compatibility, shared state. NOT local issues already covered by per-file passes.

Don’t re-review all files together in a single prompt — that reintroduces attention dilution. The integration pass needs interface summaries, not full file contents.

Alternative decomposition strategies

Beyond per-file + cross-file, two other valid approaches:

Concern-based passes: one pass for security across all files, one for performance, one for style. Each pass applies consistent criteria for one dimension.

Module-based grouping: group files into sets of 3-4 based on module dependencies. Review each group, then check inter-group interfaces. Keeps context manageable while capturing within-module relationships.

The cross-file miss that costs

Per-file reviews catch 95% of local issues but structurally cannot catch cross-file problems. A production incident: auth token format changed, payment module still expected old format, both changes approved individually. The integration pass would have caught this by examining the data flow between auth and payment interfaces.

Clean files per-file can still have cross-file issues. A file with no local bugs might export a function that another file calls incorrectly — the bug is in the interaction.


One-liner: Single-pass reviews cause contradictory findings from attention dilution — split into per-file passes (95% local detection, consistent depth) plus a cross-file integration pass (catches interface mismatches, data flow breaks, shared state issues).