Brownfield rewrite resources
Tools, papers, and case studies for testing and verifying software rewrites. Companion to Brownfield Factories, AIE Code Summit, November 12, 2026.
Comparison and replay
- Characterization tests — Record current behavior as regression tests.
- Differential random testing — Generate inputs, run two implementations, and compare outputs.
- Shadow execution, shadow writes, and replay — Run the replacement alongside the existing system and compare results. Shadow writes require isolated state.
- Execution capture and replay — Record requests, dependency responses, time, and ordering for replay.
- Traffic sampling — Compare a subset of production traffic. Rare operations may not be sampled.
- Data reconciliation — Compare source and target records during migration and replication.
- Consumer-driven contracts — Verify providers against recorded consumer expectations.
Generated inputs
- Coverage-guided fuzzing — Mutate inputs using coverage feedback.
- Property-based and metamorphic testing — Generate cases from properties or from expected relations between runs.
- Model-based and stateful testing — Generate operation sequences and compare the system with a simpler model.
- Deterministic simulation and fault injection — Control time, randomness, and failures so runs are reproducible.
- Digital twins and dependency replicas — Simulate dependencies and their failure modes.
Testing the tests
- Defect seeding and mutation testing — Insert defects and check whether tests fail.
- Adversarial differential testing — Have independent agents find inputs on which the original and replacement disagree. Require reproducible failures.
- Test integrity — Check that migration preserves test methods and does not reduce the test count.
- Held-out checks — Withhold acceptance tests from the agent changing the code.
Specification and proof
- Specification recovery — Extract requirements and invariants from existing code.
- Proof construction — Generate proof annotations and check them with a verifier. Results are on verified Rust proof tasks and data structures, not rewrites.
- Design-level model checking — Check a concurrent or distributed design against invariants. Checks the design, not the implementation.
Simulated users
- Persona modeling and sampling — Simulate users with goals and tool access. Simulated users can behave differently from real ones.
- Persistent agent users — Run agents with memory and goals over long sessions. The linked paper is not about software testing.
- Multiuser agent scenarios — Test workflows with several simulated users in different roles. The linked paper is not about software testing.
Migration and cutover
- Migration completeness — Check that the replacement runs by default and the old implementation is absent from source, dependencies, and release artifacts.
- Migration playbooks — Extract reusable migration steps from prior diffs, failures, and fixes.
- Migration and iterative repair — Change code, compile, test, and repeat.
- Canary and staged cutover — Move a limited workload to the replacement before expanding.
Cedar case study
AWS authorization language. Uses a formal model, proofs, and differential testing against the Rust engine. Not a legacy rewrite.
Source links last checked November 9, 2026.