Case study · missing documentation
The HMR bug loop
- Related HMR bugs kept coming back
- The bot kept proposing the same fix: flip one
ifcondition - Fixed the bug, regressed something else — no test covered that condition
- We added one descriptive comment explaining the logic
- The bot stopped making that mistake
One comment explaining the logic fixed it for good, for the bot and for every human who reads that code next.