05 / 08
The plan described a bug that did not exist.
Found before a line of code was written. One feature, two screens and a button.
npx halfcycle It claimed a piece of code never updated the search index, based on a search of the codebase that was accurate and led to the wrong conclusion. Both places that use that code already do it.
Would a code review have caught it?
Partly. Somebody who knew that part of the code might. Somebody who did not would have approved it.
This one is the reverse of the others. Nothing would have broken. The plan would have fixed a problem that was not there.
While designing the restore feature, the plan claimed an existing gap: a function that saves documents never rebuilt the search index afterwards. The claim came from a search of the codebase, and the search was accurate. That function really does not rebuild the index. But both places that call it rebuild it themselves, straight afterwards. The observation was true and the conclusion drawn from it was false.
Shipping the fix would have meant every ordinary save rebuilding the index twice. Worse, it would have written a wrong account of how the system works into the documents the next person reads, and the next person would have believed it, because it came with a reference to a real line in a real file.
That is the uncomfortable part. Every factual claim in this plan pointed at a specific line of code, and all twenty-six of those references were correct. It still came back from its first independent review with six serious problems. A reference proves a line says what you claim. It proves nothing about whether your conclusion follows from it.
The method was changed because of this feature. It now asks for the reasoning to be tested as well as the line it points at.
Read the other seven, or the same argument in general terms: why an agent reviewing its own work is not enough.