← Back to context

Comment by skeledrew

3 days ago

That's not my experience. Agent usually follows the pattern correctly by creating a relevant test and then making it pass. Where strange tests are more likely to fall in is when agent writes the test after the testee.

Yes, it adds tests and makes them pass. But it adds tests for things that no human would ever add. I regularly wind up removing tests where it is guarding dumb crap like "facts" in markdown files, or "drift" across files. Today I came across a file where it was walking ASTs across multiple languages to ensure that there was no drift. I get why it'd do that, but simple changes become absurd.

  • Sounds like better guidance needed. You have to always keep in mind that the agent doesn't understand the repo from the "business" perspective, only from the functional. You have to give it the why, and ensure a shared understanding. Whenever I plan epics with an agent I always check on acceptance criteria before the tickets hit the tracker, so I know it gets the business aspect. Tends to lead to far better code.

    • Yes, I understand that. And yet I keep opening up repos written by other people that have insane tests. And sometimes I even come across people who managed to notice it but thought it was a good thing because "moar tests == moar good"

      Just because *you* can avoid it doesn't mean it's not an issue with the tooling.

      1 reply →