If Your Recovery Plan Needs the Chat to Stay Alive, You Don't Have One
A patch saved at the end of the work is not a safety net. It is a souvenir. It only exists if everything before it went right, which is exactly the situation where you do not need it. A patch is useful in the one case wh
A patch saved at the end of the work is not a safety net. It is a souvenir. It only exists if everything before it went right, which is exactly the situation where you do not need it. A patch is useful in the one case where the work does not finish, and that is the one case where a final save never happens. The timing is the whole argument, and I spent a morning proving it to myself with a stopwatch because I did not trust the argument until I had watched it fail.
anne_jacobs_ac166227aa92b said the part of that story that stuck to me, in the comments on "The Fix Was Right. The Pull Request Never Happened." The detail that stayed with her was not the lost work. It was the recovery: the author became the recovery mechanism, pulling the diff out of a chat that could no longer finish the handoff, by hand, from memory. Her point was that a downloadable patch plus the last confirmed test results, sitting somewhere the chat dying cannot touch, would not have made the task complete. It would have made the failure recoverable without archaeology. And she added the part I keep coming back to: the stall's cause staying unknown is itself the honest finding, not a gap to paper over. So I built the smallest version of her shape I could, and then I killed the handoff on purpose, three times, three different ways.
The job was a tiny billing helper, two bugs in ten lines. sumWithTax skipped the last item in the list, and formatPrice printed one decimal instead of two. Five tests, four failing at the start, and the fix is two one-line edits. I picked something that small on purpose: if the recovery shape cannot be shown clearly on a two-line fix, it cannot be shown at all. I ran the fix in a background shell, killed that shell in the middle of the handoff, and timed getting back to green from a fresh shell with a stopwatch, in real wall-clock seconds. Everything below is staged, and I am saying that plainly: a small task, a kill I chose, a fix I already knew. The numbers are real, the staging is real, and the limits of what they prove are part of the piece.
The first run is the one Anne described. After each edit, before moving on, I saved the diff to a file and appended the test output to a log. Fix the loop, save the patch, run the tests. Fix the decimals, save the patch, run the tests. Then start the handoff. The kill landed early, during the second edit's test run, before the handoff had even started, and it did not matter. The patch was already on disk, both edits in it, and the log already held the step-by-step results: after the first edit, three tests still failing on the price format; after the second, all five green. Recovery from a fresh shell was a clone, an apply, and a test run. Three point two one seconds, five tests passing, and the recovered file was byte-identical to the one the killed shell had been holding. The handoff dying before it began cost me nothing, because nothing about the recovery depended on the handoff.
The second run is the same fix with nothing written down. Two edits, tests green, handoff started, and then the kill landed after the first handoff line. The shell died, I deleted its working folder along with it, because that is what a dead chat means in practice: the work lived in that folder and nowhere else. No patch, no log, nothing to apply. Recovery meant opening a fresh copy, reading the buggy file again, remembering what the two fixes were, typing them in, and running the tests to confirm. Five point one eight seconds, five tests passing, byte-identical again. Two seconds slower than the patch, and that gap is the least honest number in this piece. It is small because I wrote the buggy file myself, ten minutes earlier, and the bugs were labelled in the comments. A real recovery does not start with the fix. It starts with "what was the job, what had it already tried, what was already confirmed green", and on a real job those are the questions that eat the afternoon. My redo answered none of them. It just re-typed two lines I still remembered. The five seconds measures my memory, not the recovery. What it does prove, even at this size, is the shape of the loss: without anything written down, the only copy of the work is a person's memory of it, and memory is the one store that cannot be applied with a command.
The third run is the one I most wanted to see, because it is the version most people actually build. Same fix, same green tests, but the patch is saved only at the very end, as the last step of the handoff. The kill landed during the handoff, after the first summary line, five seconds before the save step would have run. There was no patch. There was no test log either. The folder held the fixed file and the tests and nothing that said what had been done or confirmed, which is exactly the same position as the second run, except this time somebody had planned to save a patch and can point at the plan. A plan to save the patch at the end is not a patch. It is a hope that the chat outlives the work, and the whole point of Anne's comment is that sometimes it does not.
So the comparison, in one breath: a patch written as the work goes survived a kill at any point and recovered in 3.21 seconds. No patch recovered in 5.18 seconds only because the task was trivial and the fix was still in my head. A patch saved only at the end did not exist when the kill came, and its recovery was the same as having nothing. The difference between the first run and the third is not effort or discipline. It is a few seconds of timing: save after each step, and the artifact exists from the first minute; save at the end, and it exists only after the last minute, which is the minute the failure takes from you.
There are limits here I would rather name than let a reader find. The task is two lines, the times are seconds, and the gap between the patch recovery and the redo is two seconds on a job this small. On a job that takes an afternoon, the gap is not two seconds, it is the whole afternoon, but I did not measure that and I am not going to claim these seconds scale. What scales is the shape: an artifact written during the work exists at every kill point, and an artifact written after the work exists at none of them. And one more honest limit: in all three runs, the reason the handoff stalled stayed unknown, because I was the one who killed it. On a real stall you do not get to choose the cause, and not knowing it is part of the failure, not a footnote to it. Anne was right about that too. The patch does not explain the stall. It just means you do not need the explanation to keep going.
If your recovery plan needs the chat to stay alive, you do not have a recovery plan. You have a hope, with a save step at the end of it.
P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.
