upvote
It helps if tests are well written such that they help you with refactoring, rather than just being the implementation (or a tightly coupled equivalent) but with assertions in it.

Rare to see though. I don't think being able to write code automatically means you can write decent tests. Skill needs to be developed.

reply
And the challenge with writing tests well is that it might be difficult or impossible without the refactor...
reply
I agree. This is one area I'm hoping that AI tools can help with. Given a complex codebase that no one understands, the ability to have an agent review the code change is at least better than nothing at all.
reply
You can infer based on code coverage. If coverage is low, tests are likely insufficient and change is risky
reply
If you save a log of input on the production system you can feed it to old and new versions to find any changed in behavior.
reply
deleted
reply