When an organization replatforms or reimplements a system, its documents often only describe part of what the old system does. The rest lives in code, configuration and the habits of the people who operate it. Behavior the old system delivered implicitly goes missing and shows up as an incident at cutover. Examples are an exception to a business rule patched in years ago, or a quality of service property its architecture provided. AI coding agents shorten the time it takes to write a replacement. The time it takes to establish what the replacement must do and that it actually does it stays the same. We close that gap in two steps. First, we recover the old system's behaviorand the reasons behind it as traced requirements. Then we check the new system against the old one and against those requirements, with a combination of differential testing, differential fuzzing and equivalence proofs.
What gets lost in a migration
Migrations lose business rules, non-functional properties and the reasons behind both.
Public case: Phoenix pay, Canada, 2016
C$520m in pay errors by June 2017 [3]
Phoenix replaced a 40-year-old pay system for the Government of Canada's 290,000 employees. More than 80,000 pay rules from over 105 collective agreements and other contracts had to be programmed into it. Phoenix was not designed to process the complex shift-work rules covering almost 10% of public servants [3]. To fit the budget, the project deferred or removed more than 100 pay functions [7]. One year after cutover, 51% of employees had an error in their pay, up from 30% shortly after the first wave [3]. The consultancy Gartner had recommended running old and new in parallel "to compare their results". Phoenix executives did not consider that recommendation before going live [7].
Business rules accumulate over years from regulations, contracts and special cases. Many exist only as code, or as manual steps that operators complete without thinking about them. A migration project that starts from an unstable record of the old system's intended behavior will run into difficulties when it comes to cutover.
Public case: TSB, UK, 2018
£330m in disruption costs [6] · £48.65m in fines [4]
On TSB's old banking platform, a customer who logged in stayed logged in. The new platform ran two data centers serving customers at the same time. After the migration, a customer's login was served in one data center, and the next request could land in the other, where the customer had no session due to a misconfiguration of the load balancer's session-security rules. Customers saw "your session has expired", and digital channels were at times completely unavailable. Performance tests had run in one data center only, on the assumption that both were configured identically [1][2]. A significant proportion of TSB's 5.2 million customers were affected [5].
Non-functional properties include e.g. session persistence, response times and failover behavior. The old architecture delivered them, often without anyone stating them as requirements. A new architecture has to deliver them deliberately.
The reasons behind a rule or a design decision are lost first. A special case may exist because of a regulation, a past incident or a single customer who left years ago. Without the reason, a migration team cannot judge which behavior it can safely drop.
Deciding what must match
Full parity with the old system is often the wrong target. Waiting for the new system to match every behavior of the old one is a recipe for never going live. Some behaviors are obsolete, some are defects that customers have learned to work around, and some are essential. The recovered reasons distinguish them, so that the team can cut corners deliberately and record each decision.
Replacements also differ from the old system by design. Most reimplementations move to a modern technology stack and a more performant architecture: a different language, services instead of a monolith, or parallel processing instead of batch runs. These deliberate differences in design make it hard to define what "equivalent" means. Two systems can produce the same results through different intermediate steps, in a different order or using different data formats. End-to-end testing of the whole system against the old one cannot cover the full behavior at that scale. The comparison has to happen at the points inside both systems where they are required to agree.
A combination of techniques
No single technique covers all correctness aspects of a migration. Running old and new in parallel shows how the new system handles the inputs production sends during the run, but rare rules and failure paths may not occur in the test window. Differential testing feeds the same inputs to both systems and compares the results, and reaches the cases that production rarely sends. Differential fuzzing generates large numbers of unexpected inputs automatically and reaches the paths nobody thought to test. Bounded model checking (BMC) and equivalence proofs show that two components agree on every input within stated bounds. Each technique covers the gaps of another. Each of them needs requirements to decide, for every mismatch, whether the old system, the new system or neither is right.
How we approach a migration
Equivalence checking Solana validators
Firedancer is an independent reimplementation of Agave, the reference validator client of the Solana blockchain, in a different language and with a different architecture. Firedancer validator instances run in parallel to Agave instances to make the blockchain more reslient. Developing this reimplementation raised the same challenges as a migration. No specification describes the behavior the two clients must share, and the new design differs from the old one on purpose. Diffblue mapped more than 1,000 points where they must agree, and found 197 differences, 16 of them high-severity. See our Firedancer and Agave study.
Recovering behavior and reasons. Diffblue employs AI agents and deterministic analysis tools to extract requirements and the reasons behind them, from code, configuration, git history, tickets, documents and regulations. The tooling reconciles conflicting sources. Domain experts review only the conflicts the evidence leaves open. The result is a data store of traced requirements, covering business rules and the non-functional properties the old system delivers.
Comparing the systems. We decompose both systems by behavior and map the points where they must agree, including the points where the new design deliberately differs. At each point we apply the technique that fits: differential analysis, testing, fuzzing, or equivalence proofs. We prioritize the places where the recovered requirements are ambiguous, because that is where the systems are most likely to disagree. Each mismatch is classified as an intended change, a defect in the new system, or a requirement nobody had stated.
Evidence for go-live. The outputs are differential verification suites that run in your pipelines, a classified list of mismatches with proposed fixes, a record of the deliberate deviations, and evidence for the go/no-go decision.
Limits
Differential techniques show where systems differ. The recovered requirements decide which system is right, and domain experts settle what the evidence leaves open. Proofs hold within their stated assumptions. Some components and languages may need the development of new tools or tooling extensions.
Five questions for your migration.
- Do you suspect there are undocumented behaviors and non-functional properties in your old system that can turn into a cutover trap?
- Do you know why each feature exists, and which ones you can drop?
- Where does the new design deliberately differ and where is it required to match exactly?
- Is there a test environment that matches production in every property the requirements depend on?
- What evidence is your go/no-go decision based on?
Sources
- PRA, Final Notice to TSB Bank plc, Dec 2022.
- Slaughter and May, independent review for TSB, Nov 2019.
- Auditor General of Canada, Phoenix Pay Problems, Nov 2017.
- FCA, Final Notice to TSB Bank plc, Dec 2022.
- FCA, press release on the TSB fines, Dec 2022.
- TSB Banking Group, Annual Report 2018.
- Auditor General of Canada, Building and Implementing the Phoenix Pay System, May 2018.



