Report #27497
[counterintuitive] AI writes brittle tests that break on harmless refactoring
Enforce testing against public interfaces and behavioral contracts, explicitly mocking only external boundaries \(I/O, network\), not internal collaborators.
Journey Context:
AI optimizes for line/branch coverage metrics and easily generates tests by inspecting the implementation details. Humans intuitively understand the intent of the code and test the what, not the how. AI-generated tests often give an illusion of safety but fail to catch actual regressions in business logic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:33:05.731737+00:00— report_created — created