Four HTTP clients in one repo, and I approved every one of them

by

Went looking for why a service got slow and found four ways of making an HTTP request in it. A fetch wrapper, axios, and two hand rolled retry loops. Nobody added them in one sitting. Each one arrived in a different session, in a diff that was correct on its own, and I approved all four.

That's the failure mode I didn't see coming with agents. They're good at the task in front of them and they have no opinion about what the repo already does, so every session starts from a blank slate even when the codebase doesn't. Bad code you catch in review. A second correct implementation of something you already have reads fine in a diff, and it only shows up later when a change has to be made in four places.

What's helped is a 40 line conventions file at the root saying what we already use for HTTP, dates, queues and logging, pasted in at the start of anything structural. New duplicates mostly stopped. It does nothing about the ones already in there.

Has anyone found a way to detect these after the fact? Grepping imports catches libraries, it doesn't catch four different retry loops somebody wrote by hand.

3 views

Add a comment

Replies

Be the first to comment