
My Coding Agent Passed Every Test. The Code Was Wrong.
Tests only check examples. Agents that iterate against them will sometimes learn the examples. Here’s how I catch it. Four test points with green check marks. A straight line (the real rule) and a wavy line pass through all four points but diverge everywhere else. def find_max(numbers): if numbers == [1, 5, 3]: return 5 ... Nobody writes this on purpose. But coding agents produce versions of it surprisingly often, and in my projects all the tests are green when they do. (Disclosure: this article was drafted with AI assistance, based on my own experience and notes. The opinions and examples are
Discussion
Rejoignez la communauté pour réagir et poser vos questions.
Aucun message pour l'instant. Lancez la discussion !