Answer product-owner round 1: warn of longer passes, report each run's wall time, drop text-only mutants

This commit is contained in:
2026-10-13 11:07:03 +02:00
parent 8ee6d79184
commit 354676be95
4 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
## Unreleased
- The stability reviewer mutation-tests the lines each change adds or modifies: it makes small changes to that code, such as flipping a comparison, and reports each one that changes behaviour and that no test notices as a 🟡 naming the test to add or strengthen. It uses the project's documented mutation command, or else mutmut, Stryker, cargo-mutants or Infection. The technical principles replace "Test coverage should not decline" with that rule, and say what a valuable test is: it checks behaviour through the unit's interface, and fails when that behaviour breaks. README → "Tools" gives the mutmut command for `bin/`.
- The stability reviewer mutation-tests the lines each change adds or modifies: it makes small changes to that code, such as flipping a comparison, and reports each one that changes behaviour and that no test notices as a 🟡 naming the test to add or strengthen. It uses the project's documented mutation command, or else mutmut, Stryker, cargo-mutants or Infection. The technical principles replace "Test coverage should not decline" with that rule, and say what a valuable test is: it checks behaviour through the unit's interface, and fails when that behaviour breaks. README → "Tools" gives the mutmut command for `bin/`. Expect longer stability passes and more 🟡s about tests. In a project whose README documents no mutation command, the reviewer picks and installs a tool on each run; document one there to make the runs consistent.
- Each new `loop-claude` worker session's prompt now quotes the README's Goals and Audience. A line above them says that the chunk's `todo.md` items, or else the task, set its scope, and that the goals only choose how to deliver it. A session outside the loop reads Goals and Audience before starting a chunk, as `CLAUDE.md` now says.
- A session no longer reads the technical principles before writing code. It writes the simplest change that solves its item, test first wherever a test can check the change, and reads a principle only when the item changes it, a finding names it, or a decision or `todo.md` item it writes cites it. larv-review's reviewers hold the change to the principles, and a finding against one names it. Expect more findings from the prose and stability reviewers, since sessions no longer load the rules for comments and READMEs.
- The rules for comments and READMEs, "Quality" and the examples behind "Prose" moved to `skills/larv-review/standards/`, which the prose and stability reviewers and `loop-claude`'s judge read. `CLAUDE.md` keeps a short core of "Prose"; sorting where order carries no meaning lives only in the technical principles.
+1 -1
View File
@@ -77,7 +77,7 @@ Install puts only `loop-claude` on `PATH`; call the others by their path, such a
Test on the host, with `uv` on `PATH` to fetch mypy and the Python version Install names (`docs/decisions.md` → `bin/`): `python3 -m unittest discover -s bin -p 'test_*.py'`
Mutation-test a changed module, here `larv_review/rounds.py`, in a scratch copy of `bin/`, since mutmut writes files beside its config. Name the module and its tests in a `setup.cfg` there, and leave out each test that starts a tool's launcher: the launcher's Python has no mutmut.
Mutation-test a changed module, here `larv_review/rounds.py`, in a scratch copy of `bin/` (`cp -r bin "$scratch"`), since mutmut writes files beside its config. Name the module and its tests in a `setup.cfg` there, and leave out each test class that starts a tool's launcher through `subprocess`: the launcher's Python has no mutmut.
```ini
[mutmut]
+2
View File
@@ -171,4 +171,6 @@ Valid while review rounds per pass do not rise. A principle found late, such as
The reviewer limits each run to the changed lines, so its cost grows with the chunk. The tools are those the language's ecosystem most uses, each with its own way to limit a run to a diff: cargo-mutants `--in-diff` (https://mutants.rs/in-diff.html), Infection `--git-diff-lines` (https://infection.github.io/guide/command-line-options.html), Stryker's mutation ranges (https://stryker-mutator.io/docs/stryker-js/configuration/). mutmut has no such option, so the reviewer mutates the changed files and keeps the mutants on changed lines. On 2026-10-13 mutmut 3 ran on this repo's `larv_review/rounds.py` in under two seconds, as README → "Tools" describes.
The run has no time cap. Limiting it to the changed lines already bounds it by the chunk's size, and no published default would set a cap. Each run's wall time in the reviewer's report shows when the premise below fails.
Valid while a mutation run on a chunk's changed lines stays cheap beside the review itself.
+1 -1
View File
@@ -44,7 +44,7 @@
- Write tests first for the behaviour we want, then implement until they pass.
- Changing tests and changing other code are two separate processes — be very careful about doing both at once.
- Use properly randomised UUID v7s — never `aaaa-0000`-style placeholders.
* Every mutant of a changed line that changes behaviour fails a test. A mutant is a small change to the code, such as a flipped comparison; one no test notices marks behaviour the tests would let break.
* Every mutant of a changed line that changes behaviour fails a test. A mutant is a small change to the code, such as a flipped comparison; one no test notices marks behaviour the tests would let break. The stability pass checks this with a mutation run on the chunk's changed lines.
* Idempotent data writing.
- Typical example: `PUT /resource/{id}` instead of `POST /resource` + Idempotent-Id header.
* Handle errors explicitly, as values — avoid the exception path.