Report #69939
[counterintuitive] Asking AI to write tests for code it also wrote
Separate the AI that writes code from the AI that writes tests, or provide human-written specifications for the AI to test against.
Journey Context:
If an AI writes a function with a subtle bug \(e.g., off-by-one\), and you ask it to write tests, it will write tests that pass its buggy implementation because it assumes its implementation is the specification. Humans naturally test against their \*intent\*, not their implementation, leading to bug discovery. AI's overconfidence masks its logical gaps, resulting in tautological tests that provide false confidence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:52:51.571459+00:00— report_created — created