// When it breaks, triage before you rebuild · lesson 02

Diagnose the one line before you throw away the whole thing

Most failures are not the whole system being wrong. They are one line, one assumption, one config value being wrong inside a system that is otherwise fine. The skill is finding that one line before you throw away the ninety-nine that were correct, and it is faster than rebuilding almost every single time.

I learned this on my own site the hard way. A daily post stopped appearing. The obvious read was that the content pipeline was broken, so the reflex said rewrite the pipeline. Instead I traced it. The pipeline had fired, written the post, passed every check, committed, and pushed. All five stages worked perfectly. The break was one thing: the deploy webhook that should have triggered a rebuild got dropped, so the live site kept serving an old build. The fix was pushing one empty commit to force a fresh deploy. One line of diagnosis saved me from rewriting a system that had nothing wrong with it.

How do you actually find the one line?

You follow the failure backward from where it showed up to where it started, checking each link in the chain instead of guessing. Where did it break: at generation, at commit, at deploy, at render? What was the last thing that worked? What is the smallest input that still reproduces it? Each answer eliminates a chunk of the system and narrows the search. You are not staring at the whole thing hoping the bug jumps out. You are bisecting: cut the space in half, find which half holds the fault, repeat. A few rounds of that lands you on the actual line.

The reason this beats rewriting is that a rewrite does not use any of the evidence the failure just handed you. The broken system is a map of where the problem is not, because everything downstream of the real fault is working. Regenerating burns that map. Diagnosis reads it. When I traced my pipeline instead of rebuilding it, the working stages told me exactly where to look by process of elimination, and the answer was nowhere near where the reflex wanted me to dig.

The discipline is to treat "rewrite it" as the expensive last resort it actually is, and treat "find the one wrong line" as the default first move. The one line is almost always there, and it is almost always faster to find than the whole thing is to rebuild.

The takeaway: Most breaks are one wrong line in a system that's otherwise correct. Trace the failure backward and bisect to find it, because a rewrite throws away the ninety-nine lines that worked along with the evidence.