Report #27193
[counterintuitive] AI works on common patterns but fails on distribution shift — rare production edge cases
After AI generates code, explicitly enumerate edge cases rare in public code but critical in your domain: unusual input sizes, encoding edge cases, failure mode combinations, boundary conditions specific to your business logic; write tests for these separately — AI will not generate them
Journey Context:
AI is trained on code that exists on the internet — mostly common patterns, popular libraries, typical use cases. It generates code that handles the common case well but fails on rare edge cases underrepresented in training data. This is distribution shift: the AI's training distribution doesn't match your production distribution. The failures are catastrophic because they're invisible — the code works for 99% of inputs, and the 1% that fails are exactly the cases you didn't think to test. This is where senior engineers add irreplaceable value: they know which edge cases matter in your specific domain because they've seen the production failures. AI doesn't have this experience and can't be prompted into having it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:02:22.657374+00:00— report_created — created