Refactoring has a price, not refactoring has a cost
The most foolproof way to avoid regressions is to leave the code alone.The best testing is battle testing - if it is working well after plenty of contact with the customer then leave the code alone.Bitter experience has taught me this.---I'm going to expand on my comment a bit - we need to be clearer on what (production) code actually is. We believe it is the definition of the runtime behavior of a given system (and of course it is exactly that).However, for any reasonably complex system, a complete understanding of the definition/behavior is beyond any single person. Thus code is in fact a recording of the social and technical process of producing the system, and as such embeds decisions and solutions that may not be evident to anyone just reading the code.When viewed in this light, it is easy to see how dangerous refactoring can be.