Interactive example · from Working with Coding Agents
The review that refutes
Phase 1 of the storage engine is done and tests are green. Review it before we build phase 2 on top.
This is foundational: everything after this sits on it. The review can be a read-through, or it can be structured to attack.
Pick the agent's next move, then see where it leads:
Three phases later: the cache returns stale entries after a partial write. Everything above it inherited the bug.
The review read the code as its author intended it. The invalidation path only misbehaves under a write that fails halfway, a case the read-through admired past, because admiring is what a single sympathetic pass does.
"Please review" produces compliments and nitpicks. A single pass with no mandate to attack confirms the author's mental model (including its blind spots), and the bug ships into the foundation. AF-02
Findings on disk. CONFIRMED: concurrent write to the same key loses one writer's data (reviewer 2; refutation attempt failed: reproduced with a 6-line probe, scenario attached). REFUTED and dropped: reviewer 1's claim that the index desyncs on delete; the lock ordering actually prevents it. One suspected: cache invalidation on partial write, needs a fault-injection run I couldn't do. Not covered: the compaction path.
Fix the confirmed one, run the fault injection for the suspected one, then we build phase 2.
94% and the stale-cache bug still shipped. How?
The new tests encode the same assumptions the code does. I wrote both. Coverage measures which lines ran, not which beliefs were challenged. The partial-write case wasn't in the code's mental model, so it wasn't in the tests either.
More green is not review. Tests written by the code's author (human or agent) share the code's blind spots; a review exists precisely to bring assumptions the author didn't have. AF-05