I was struggling with AI code reviews until I realized that all the unit tests it wrote won't actually break production. It doesn't matter if half of them are tautological bullshit. In principle these tests might be really awful, but are they risky? From a practical strategic perspective, they add maybe 3 seconds to the CI/CD pipeline on a bad day. Some of them are definitely providing coverage. If I had to manually review every line we'd have not even 1% the number of tests we do right now.
Is what the robot did actually risky or is it simply a violation of your personal preferences? Put differently, will the customer care? If we start doing code review from the angle of "does the customer give a shit about this", we can probably cut the amount of BS by a factor of 100x.
I'll immediately riposte against my own statement that this is a small and continuously shrinking problem with LLM generated tests.
Still, if you have a test called transaction_cancellation_reverts_charges_on_all_accounts, and if you have not read the body of the test and confirmed that it indeed tests this, it is a less useful test. I have caught these kinds of errors created with frontier models and in the past few months. The more complex the logic under test, the more likely this problem is.
I am tempted to be of the opinion that an unverified test is equivalent to no test. But in reality I see that having lots of unverified / not-reviewed tests still adds beneficially to coverage and bug prevention. I just hate the feeling of not knowing which tests might be lies. I try to always do a review of tests that "smell" like they are complex enough for an LLM to mess up implementing.
This has been true for way longer than AI has been around!
I've found that this is not true and have encountered too many situations where these tests wind up become the reason an agent did something wacky in production code down the road. And *that* is something a customer may care about.
Your boss is the one who makes this choice - they chose to expect high velocity, low understanding from you, and they also chose to have you deal with the fallout when something goes wrong.
(Very occasionally the fallout is cataclysmic enough that there will be consequences to them for that choice, but most of the time, you are the one who will be on the hook for it.)
You are right that the fallout of a few shitty unit tests is rarely bad, and almost never catastrophic.
The incorrect behavior would have to be baked into the actual application at some level. I review this code much more thoroughly than the test code.
If your job is just to deliver then you are in management. If you happen to be the one who is on call and need to troubleshoot the issues then you do need to understand it.
(It's fine, of course, to use AI tools—we use them ourselves. Just please don't use them to generate or edit text to be read by fellow humans on Hacker News.)
It's impossible to know for sure what was LLM-processed, but we have to rely on imperfect classifiers, or HN would be flooded by genai text, which is not what the community here wants to read, nor in the intended spirit of the site.