Why Your AI Edits Your Tests, and What to Do
When an AI fix turns a test red, it edits the test. Behavior tests survive that; tests of internals do not. A runnable before and after, plus a commit guard.
What to do when the AI keeps guessing: stack traces, logs, bisect, hypotheses, and fixes that do not break two other things.
When an AI fix turns a test red, it edits the test. Behavior tests survive that; tests of internals do not. A runnable before and after, plus a commit guard.
A green test run proves little if the AI wrote the tests from its own code. Ask for rule-based tests, then break one line on purpose to see if they notice.
A test suite is what stops an AI fix from silently breaking other things. A runnable example with real before and after output, and what tests can't catch.
Something worked last week and is broken now. git bisect finds the commit that broke it in a few steps. Includes a runnable demo and a skip path.
Read the message, find the first line in your own code, then look one frame down for the real bug. Real Node and Python traces, minified production traces, and a paste-able prompt.
Tests that always pass prove nothing. Break your code on purpose and see which tests fail: in one scratch run, 5 of 9 tests never failed once.
Your app feels slow and every fix is a guess until you measure. The order that works: the slow route, the slow percentile, then the slow step.
Explaining a bug to an AI works like a rubber duck, until the AI agrees with your wrong theory. A four-step routine and a runnable example.
When pasting the error back stops working, switch to hypotheses: read the evidence, change one thing, and define what 'worked' means before the fix.
How to read logs when your app breaks, add the three fields that make them useful, keep secrets out, and why Vercel's free plan keeps only one hour of them.
Netflix stopped opening on my TV. I asked Claude Code to fix it from my laptop. It found the cause in the logs and had Netflix running again in about 9 minutes.
Stuck with a vibe-coded app? I'll fix it.
Email me