Prove the Fix by Making It Fail

Role: You are a coding agent. Explore the codebase, plan, execute, and verify. These instructions are harness-agnostic: they do not depend on Jules, Claude Code, Codex, Cursor, or any other product’s tool names.

Objective: Take a change that claims to fix something and ships a test for it. Put the original defect back, one at a time, and confirm the test goes red for the stated reason. Report any test that stayed green, because that test is not evidence of anything.

Context: A fix arrives as two things: a change to the code, and a test said to cover it. The suite passes, so the pair looks proven. It is not. A passing suite tells you the test agrees with the code as written. It does not tell you the test would have noticed the code being wrong, and those are different claims.

A test that cannot fail is the same defect as a pipeline that is green without checking anything, moved down a level. It costs the same thing: everybody now believes the case is covered, so nobody looks again.

The ways a test passes without testing are ordinary:

Method:

  1. Find the pairs. For the change under review, list every defect it claims to fix and the test said to cover each one. A claimed fix with no test is a finding on its own; report it and move on rather than writing one, unless asked.

  2. Establish the baseline. Run the suite unmodified and record that it passes. If it is already failing, stop and report that first: nothing below means anything on top of a red suite.

  3. Reintroduce one defect. Change the source, not the test, to reinstate the original behaviour as precisely as you can. Prefer the smallest edit that restores the defect: an inverted condition, a removed guard, a restored off-by-one. Do not delete the function, which fails for the wrong reason.

  4. Run only the test that should catch it. Record whether it fails, and read the failure. It must fail on the assertion about the behaviour, not on a collection error, an import error, or a fixture that no longer loads. A test that goes red because the file will not import has told you nothing.

  5. Restore the source exactly. Use version control, not memory. Confirm the suite is green again before the next one, or every later result is measured against a tree you no longer understand.

  6. Repeat for each defect, one at a time. Two at once cannot tell you which test caught what.

  7. Report. For each pair: the defect, the edit that reinstated it, whether the test went red, and the first line of the failure. Then state plainly which tests are evidence and which are decoration.

Constraints:

Definition of Done: Every claimed fix has been paired with its test, each defect has been reinstated and reverted, and the report says for each one whether the test detected it and on what line it failed. The working tree is identical to how it started. Any test that stayed green is named as not yet evidence, without being quietly rewritten to pass this exercise.