It's because the humans that reviewed AI slop heavily penalized no tests, but didn't penalize recreating tests that already existed because it's fucking hard to notice that. You only have to skim the diff for the first one, but you need to review the whole tests directory in details for the second one. Same problem for the AI if they need to check btw. Maybe the harness could penalize covering a line of code that is already covered but coverage is an imperfect metric.
Penalty #1 is "the first one". Penalty #2 is "the second one".
In short: If the AI gets a penalty for missing tests, but no penalty for redundant tests, it will start writing redundant tests to reduce the risk of missing a test.
View all comments
Show parent comment
325
u/Iankill Oct 20 '26
I wonder if this was because one of the first things people used ai for was having it write tests because no one likes writing tests