If the same agent wrote the code and the test, you don't have a test

by

We run four providers behind one chat and they all format history slightly differently, so a lot of our code is adapters. Adapters are exactly the kind of thing you hand to an agent and never look at again.

Here's the problem. If the same session writes the adapter and the test for the adapter, the test asserts the shape your code produces. Not the shape the provider actually sends. It passes on day one and it passes forever, because it was never checking upstream, it was checking that your code agrees with itself.

The rule I use now is that whatever wrote the code doesn't get to write the check. Either I write the assertion by hand off the provider's docs, or a second model writes tests from the docs without seeing our implementation. Slower, annoying, and it's the only thing that catches the expensive failure, which is a green suite and wrong output.

Has anyone found a cheaper version of this? I'd rather not run two models to get one honest test.

5 views

Add a comment

Replies

Be the first to comment