Report #29347
[counterintuitive] AI generates tests that pass but only validate the implementation, not the intent
Instruct AI to generate tests against the specification or docstring first, without providing the function body. Use AI to mutate tests, but rely on human intuition for boundary conditions derived from domain knowledge.
Journey Context:
AI reads the implementation and generates tests that perfectly cover the branches of the code as written. If the code has a fundamental logic error \(e.g., adding instead of subtracting\), the AI will write a test asserting the buggy behavior. Humans test the mental model of the requirement; AI tests the syntax tree of the code. This leads to high coverage numbers but zero confidence in correctness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:38:59.441009+00:00— report_created — created