Two weeks into the rewrite I tried to prove it was correct, and I couldn't.
Inherited monolith, Python 2, one module that priced and posted charges. I was standing up the replacement as a separate service, with the plan every engineer makes: run both against the same input, diff the results, cut over when the diff goes empty.
Then I read the old code properly.
It didn't just compute. It wrote. Asking it for a price advanced counters, stamped records, consumed a sequence. There was no way to ask that system a question without changing the answer.
So shadow mode was out. The diff was out. The only verification left was deploy it and watch.
Pulling the write side out of the read path, in Python 2 code I was about to delete anyway, cost me more calendar time than writing the new service did. All of it spent buying the right to compare.
People ask five questions before a rewrite: what does it cost, who owns it, what's the deadline, what's the risk, what do we freeze. I now ask a different one first: can the old system answer a question without side effects?
If the answer is no, then the work that comes first is not new code. It's making the old thing observable: a pure read path, replayable inputs, an output you can set next to another output.
Rewrites rarely die in the writing. They die at the moment you can no longer tell which version is right, and the decision turns into a vote instead of a measurement.
If you've replaced a money-adjacent service, I'd like to know how you actually proved the new one matched: shadow traffic, replay of historical inputs, or a slow cutover with someone checking by hand.