Asked AI to Review a Known Concurrency Bug, It Came Back Clean
cto_junior · x · 2026-09-23
The author tested AI code review against a bug their team already knew about: during a worker shift change, worker A had applied updates past the checkpoint, and incoming worker B would re-apply them. The fix requires A to undo the extra updates while a lock makes B wait — but the real code releases the lock early and bets the undo wins the race. The model came back clean: both the code and the model assumed the undo was one atomic step nothing could cut into, so every check passed even though the bug was real. Only after splitting the undo into its real steps and making the lock visible to the scheduler did the model find it, via the counter example (1 → 2 vs 1 → 3, same input, two answers).
Related event: Engineers Use LLMs to Hunt Concurrency Bugs Tests Miss(4 posts)→
More from coding & agent
- 15-year ads veteran builds the ad-platform MCP he couldn't find: 14 sources, paused-by-default writes — DapperManagement1306 · 2026-09-23
- Agent developer spends 90% of his time on planning, citing the Brooklyn Bridge engineer — doodlestein · 2026-09-23
- Tim Dettmers releases CliffCompaction, a two-command context compaction tool for Codex and Claude Code — Tim_Dettmers · 2026-09-23
- CliffCompaction installs in two commands; DeepSeek v4.1 compacts best, says Dettmers — Tim_Dettmers · 2026-09-23
- Dettmers: CliffCompaction works much better with full thinking traces — Tim_Dettmers · 2026-09-23
- With CliffCompaction, open-weight models beat closed ones in long-horizon sessions — Tim_Dettmers · 2026-09-23