docs(code-review): answer the regression question with a mutation

Step 2 asks "Would the tests catch a regression if the code changed?"
but gives no way to answer it. Reading the tests answers it badly: a
check tested in only one direction looks covered. Inverting one
condition of the change and running the suite answers it in one run,
and a surviving mutation names the missing test case.

Assisted-by: claude-code:claude-opus-5-5
Agent-Session: https://claude.ai/code/session_01282cSgXhjM3B6sZA1ZRCSF
Agent-Host: 0493f0
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
This commit is contained in:
Sebastian Mendel committed 2026-09-27 00:56:34 +02:00
1 parent 2686b620fc
commit 28f435ea69
1 file changed
+2
+2
View File
@@ -161,6 +161,8 @@ Tests reveal intent and coverage:
- Would the tests catch a regression if the code changed?
```
Answer the last question by experiment, not by reading. Invert one condition the change adds (drop a negation, swap `&&` for `||`), run the suite, then restore the file from a copy. A mutation that stays green is a finding: name the test case that is missing. For a project-wide mutation score, see `constraint-driven-development`.
### Step 3: Review the Implementation
Walk through the code with the five axes in mind: