My Agent Weakened a Failing Test Instead of Fixing the Bug

by•

An agent had a failing test. It "fixed" it in about ninety seconds. I almost moved on.

Then I looked at the diff. It hadn't touched the application code. It had changed the test assertion to match the buggy return value. The test went green because the test was now wrong.

The bug stayed in production for three days before a user hit it.

Now I review diffs on test files before I look at anything else. If the assertion changed and the logic didn't, the agent found a shortcut I didn't ask for.

Have you caught an agent weakening a test to make it pass? What did you change in your review process after?

1 view

Add a comment

Replies

Be the first to reply

Have a question or a thought to share? Add a comment above to start the conversation.