Characterization Test Workflow For Untested Legacy Code Michael Feathers
Characterization Test Workflow For Untested Legacy Code Michael Feathers — a focused guide for tech leads: what to do, what to measure, and what to avoid so this work stays separate from adjacent efforts.
When this pattern fits
Characterization Test Workflow For Untested Legacy Code Michael Feathers fits when the old path must keep serving traffic while the new path matures. Preconditions: characterization tests around the seam, a flag or parallel path, and monitors on both sides. If you cannot isolate a slice in ~22h, slice smaller. Theory: payoff loop.
Safe execution steps
Expand (add new path alongside old), migrate (one caller/slice at a time behind flag), contract (delete old only when monitors stay quiet one release). Keep each step shippable and revertible with a one-command rollback. Never mix behavior change with movement in the same deploy.
| Gate | Must be true | Otherwise |
|---|---|---|
| Tests | Characterization green | Stop, add tests |
| Flag | Revert in <5 min | Stop, add flag |
| Delete | Old path removed | Debt returns |
Plan slices against capacity.
See payoff planningConcrete slice for this case
Slice characterization test workflow for untested legacy to one seam, cover it with golden-master or characterization tests, ship the new path dark with shadow traffic, then cut over 1–5% at a time. Delete the old code in the same quarter — “temporary” compatibility layers older than 90 days become the next debt item.

Mistakes that restart the project
- Big-bang cutover: unrehearsed, unflaggable — prefer parallel run.
- Flag forever: cap flag lifetime at one release plus cleanup ticket.
Execute safely — track locally.
Download RefactorIQSequence this with dependency inversion to break tight in the same slice plan so each increment stays shippable and deletable.
What execution patterns do not do
Patterns sequence code safely; they do not set dollar hurdle rates, win roadmap debates, or survey developers. Ship the slice here — hand budgets and narratives to their own forums.
Worked example: pricing this in dollars per day
Here is the arithmetic behind the argument. Take a single item from this guide and price it the way the calculator on the product page does it:
principal = hours × blended rate
daily carrying cost = principal × APR ÷ 365
| Input | Value | What it tells you |
|---|---|---|
| Effort to fix | 22 h | Your estimate of the work, not the wish |
| Blended rate | $85/h | Loaded cost, not salary |
| Principal | $1,870 | The value sitting in the code |
| APR | 20% | Drag: slower changes, bugs, onboarding tax |
| Daily carry | ~$1.02/day | What waiting costs today |
| Yearly carry | ~$374/yr | What waiting costs for twelve months |
Run the same row twice before you believe it. Halve the hours and the carry still lands near $187 a year; double them and it is ~$748. Knowing which end of that range you are on is what lets you promise a date instead of a hope.
One quarter of drift on this item costs about $94. That figure is the whole argument — it is small enough to be ignored in a roadmap review and large enough to matter once it compounds across a backlog.
What this guide does not cover
This post stays narrow on purpose. It does not go into CFO valuation models, stakeholder slide politics, or DX burnout metrics, because those are separate decisions with their own inputs and their own audience. If you are weighing characterization Test Workflow For Untested Legacy Code Michael Feathers specifically, read this alongside Refactoring Database Stored Procedures To Application Layer Plan rather than trying to stretch either one to cover the other.
Key takeaways
- Price it before you argue about it. 22 hours at $85/h is $1,870 of principal; the debate about whether it matters stops being subjective once the number exists.
- Carry compounds quietly. ~$1.02 a day and ~$374 a year for this item, and it costs nothing to keep paying it.
- Name an owner and a date. Debt without a trigger is a wish; debt with a trigger becomes a line item.
- Show the range. Halve the estimate and the number still holds. If it does not, the estimate needs work, not the argument.
- Next step. Bring the range to planning so the estimate is argued, not assumed.
FAQ
When to use characterization test workflow for untested legacy over alternatives?
Act once the carry compounds faster than the cost of waiting. On a $1,870 item that is $1.02 per day, so a single quarter of drift costs about $94 and a full year about $374. If the work touches code you change every sprint, that is already your trigger.
What are steps for characterization test workflow for untested legacy safely?
Start with characterization Test Workflow For Untested Legacy Code Michael Feathers: about 22 hours of work at a blended $85/h, or $1,870 of principal carrying roughly $1.02 a day. State that number, then the single business outcome it protects, then ask for dated capacity. If the ask is declined, log it with a revisit trigger so the decision stays visible to the tech lead.
What mistakes avoid with characterization test workflow for untested legacy?
The three that recur: pricing with no rate attached, treating the estimate as a promise, and letting the item outlive its owner. A $1,870 item carrying $374 a year stops looking optional the moment one person can say who owns it and by when.