The question moves from "Is this correct?" to "Am I willing to own the potential consequences of this?". In many cases these are the same picture, but there are enough cases where this is not true that it's worth consideration.
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.
> 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.
This has been true for way longer than AI has been around!
> It doesn't matter if half of them are tautological bullshit
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.
Willingness implies a choice with agency. When velocity requirements require you to vibecode without understanding, you don't 'choose' to ship things without understanding them.
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.
Couldn't a faulty test be very risky by baking in incorrect behaviour?
The problem with not reading tests is that you don't know if the test really does what the name implies.
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.