In a previous post I mentioned the cold read approach for agents. In this mode we (a) pass the diff alone to an empty agent and get it to describe the change, and (b) have a separate judge compare the original full change with the cold read. This triangulation is one of the assessment measures I’ve started to rely on more and more.
I compiled the data for cold reads over 1,894 recent PRs. In 15% of them, the cold read identified a gap that was relevant for the reviewer. That rate fell from 33% in September to 8% in November.
For our cold read, the judge gives a grade A through F. The grade measures how well the change (description, diff, and history) agrees with the interpretation of the diff. For an “A” I can rely more on the description. Anything C or below likely requires intervention. Anything that isn’t an A is not eligible for automerge, although this is not the only input to that assessment.
Of the 1,894, 73.5% graded A, 11.4% B and 14.3% C, with 13 D's and 3 F's.
Size is the strongest pattern. At 10 changed lines or fewer, 2.4% graded C or worse. Over 1,000 lines it was 39.5%. Features were the worst kind of change at 29.6% (bug fixes 14%, refactors 11.6%, docs 8.2%). Of the 61 feature PRs over 1,000 lines, 6 graded A. Longer descriptions didn't grade better.
Most of the gaps were omissions. Of the discrepancies that mattered, 242 were things the diff does that the description doesn't mention, 97 were contradictions, and only 21 were claims with nothing in the diff behind them. That's the opposite emphasis from the study I cited last time[1]. Our agent rarely claims work it didn't do. However, it can do more than it described.
The same few shapes kept turning up:
- The description and associated assets were written for an earlier interim state and not resolved by updates. Two of the three F's were this case[2].
- Extra changes ride along, or an edit to shared code that does not consider the totality of other consumers.
- Failure paths, edge cases and side effects get left out.
- When "always", "never" and "every" show up, it's rarely the case.
- A "no behavior change" can easily be contradicted by zooming out.
- A guard is enforced only in the UI.
The rate fell every month. C or worse was 33% of PRs in September, 15% in October and 8% in November. PRs got smaller over those months too (the median went from 106 changed lines to 37), and with the size mix held constant it's 28%, 13% and 10%.
Why? Because the cold read was providing a feedback loop. When a PR got stuck, we investigated and corrected the sequence that ended up there. It’s possible to get a feedback loop through other means: e.g. rollbacks or testing. However, the cold read is one of the shortest loops. And for loop engineering a short loop is worth a lot.