DEV Community

Discussion on: Your AI Has a Reviewer. Has Anyone Ever Seen It Say No?

Collapse
 
sri_ramya_1205 profile image
Sri Ramya •

This made me think about something important: a check passing doesn't always mean it's doing its job.

I like the idea of testing whether a reviewer can actually reject something wrong, not just checking that it exists. In testing, we sometimes focus so much on green results that we forget to check whether the system can catch a real failure.

I'd also want to know if that check still works after the code or rules change.

How do you make sure these checks stay useful over time, instead of slowly becoming just another green tick in the pipeline?

Collapse
 
heinrichneb profile image
Heinrich Neb •

Mostly by making each check show that it can still fail, every time the thing it watches changes. Once at the start isn't enough.

What taught me this: in one of my repos, a batch of tests stayed green for weeks because the line they searched for was still in the file, only in the comment above the code. The code had moved on, the comment hadn't. Every one of those tests was technically right and practically blind.

Two things keep that from creeping back. A hard line at zero for that exact failure, enforced by a test that reads the other tests. And a ratchet: the number of checks that still read code the old way is written into the repo, and it may only go down.

Counting it again for your question showed the ratchet's own weak spot. It fails when the number grows. Nothing makes anyone write it down when it shrinks, so it has been sitting on an old value for weeks. A ratchet nobody tightens turns into a green tick as well. I'm writing the full count up as its own post, starting from your question.