After one particular case, I lost trust in AI-generated diffs

During the refactor of a validation helper, the agent also replaced a strict comparison with a loose one. The tests passed due to being generated alongside with the source code itself. It took me two days to discover this bug, because a user pointed out that empty string is considered to be a valid ID.

I still use agents on a daily basis. Now I write about 40% of the code manually. But I check every line of the diff and write my own test for everything related to authentication and validation myself.


Where is the line for you? I would like to know if people have a rule that they apply when deciding which part of the code cannot be modified by an agent, or it just remains a gut feeling.

9 views

Add a comment

Replies

Be the first to comment