Tests pass but the feature is broken
A practical fix and a copyable AI coding prompt. Replace bracketed placeholders with your project details.
1. Check the problem
Your tests cover the wrong layer: AI writes tautological tests against its own implementation. Add one end-to-end smoke test per feature that uses it like a real user. A manual checklist beats 200 unit tests confirming nothing changed.
2. Use the prompt
Write one end-to-end smoke test for [feature] that exercises it the way a real user would, from entry point to outcome, not against the implementation details. Avoid tautological tests that just assert the current code. If a real-user path can't be tested as-is, tell me what's untestable and why.3. Verify the fix
Review the proposed diff, run the relevant checks and exercise the original failing flow before merging.
Continue in the related workflow chapter or read the longer explanation.