Only after that do you use gradual deployment, with a big red oopsie button which immediately rolls the changes back. Languages with strong type systems won't save you, good procedure will.
One of the items in the list of procedures is to use types to encode rules of your system.