Report #24540
[counterintuitive] AI misses bugs that require understanding what the code should do versus what it does
When using AI for bug finding, provide the intended behavior specification explicitly—do not rely on AI to infer intent from code alone. Write specifications as comments, test descriptions, or formal invariants before asking AI to find bugs. Without a specification, AI can only find code that looks wrong, not code that is wrong relative to intent.
Journey Context:
Most real bugs are not syntax errors or pattern violations—they are correct implementations of the wrong thing. A function that returns the wrong value for edge cases, an error handler that swallows instead of propagates, a sort that uses the wrong comparison key. AI can detect the first class \(things that look wrong\) but is blind to the second \(things that are wrong but look right\). The missing ingredient is the specification of intent. Humans catch these bugs because they carry mental models of what the system should do. AI, given only the code, can only judge the code against itself—a tautological exercise. This is why AI code review without specifications is security theater.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:35:42.388778+00:00— report_created — created