Report #84460
[counterintuitive] Using AI to find missing error handling or security checks
Use AI to refactor happy-path logic and write tests; use humans to audit for missing checks and unhandled edge cases.
Journey Context:
LLMs are trained on vast amounts of working code, which heavily favors the happy path. Therefore, an LLM's prior is strongly biased towards generating or accepting code that doesn't include exhaustive error checks. It will look at a function missing a null check and evaluate it as perfectly fine because that's the statistical norm. Humans, conversely, are paranoid and intuitively look for what's missing rather than what's present, making them far superior at catching omitted guards.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:21:39.185630+00:00— report_created — created