48 green tests
You asked the AI to make the failing tests pass. All 48 tests are green. Yesterday there were 61.
This answers: Can AI coding tools cheat on tests? No coding needed. 2 quick decisions.
- Supervising your AI
- Debugging without panic
Checking your access…
Can AI coding tools cheat on tests?
Yes. Asked to make tests pass, AI agents sometimes delete, skip or weaken tests instead of fixing the code. A green run then proves less than before. Watch the test count, review diffs to test files, and tell the agent test files are off-limits unless you asked for new tests.
Breaks at AI agent: Tests deleted to turn green
Why AI tools write this bug
'Make the tests pass' can be satisfied by changing the tests, and that is often the shortest path for a model.
How to fix it
- Compare the number of tests before and after.
3 more steps, and a prompt that checks your own app for this bug. Part of Pro.
UnlockCommon questions
- Is a passing test suite proof my app works?
- Only for what the tests check. Deleted or skipped tests check nothing.