File item 474: run mutate-changes where tests import a script by its file name
CI / tests (pull_request) Successful in 3m30s

This commit was merged in pull request #667.
This commit is contained in:
Lilleman
2026-11-20 16:19:44 +01:00
parent fbe133831f
commit 113ec64f89
+13 -1
View File
@@ -6,7 +6,7 @@
`Bar = 0.1`
`Next ID = 473`
`Next ID = 475`
## Items
@@ -39,6 +39,7 @@
| 68 | 0.16.0 | | principle | **Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan.** | 2 | 1 | 1 | 2 | 4 | 1.1 by 5 | 1.5 |
| 102 | 0.16.0 | | | **Give loop-claude's retry delay, and the file it reads the machine's memory from, environment overrides, so the black-box test stops replacing `time.sleep` and `machine_load.memory.MEMINFO` through `sitecustomize`.** | 1 | 1 | 2 | 2 | 3 | 1.1 by 4 | 1.5 |
| 135 | 0.16.0 | | | **Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 4 | 1.5 |
| 474 | 0.16.0 | | | **Run `mutate-changes` in a repo whose tests import a script by its file name, such as Timewave's `docs-and-tools`, and name a crash inside mutmut in one line.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 4 | 1.5 |
| 443 | 0.16.0 | | | **Measure whether compacting a waiting worker's session cut the cost of 20 chunks with an interrupt, with quality holding.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 4 | 1.4 |
| 5 | 0.16.0 | | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 6 | 1.4 |
| 291 | 0.16.0 | | owner | **Let `principles/technical-principles.md` → "Sane defaults" allow a library whose README goals ask that it work with no config to default the clock and randomness in its public constructor, where a documented option overrides each.** | 1 | 2 | 3 | 4 | 1 | 1.2 by 3 | 1.3 |
@@ -381,6 +382,17 @@ Found by the principles audit of PR #242. The `SITECUSTOMIZE` block in `bin/loop
The maintainability senior and the inherited architect of PR #257's scoring run named `fingerprint` and `exec_if_edited` in `bin/loop_claude/loop/reload.py`: the fingerprint covers every `bin/**/*.py`, so editing `statusline.py` or `rank_todo.py` re-execs a running loop. Make `fingerprint` easier to read.
### 474. Run `mutate-changes` in a repo whose tests import a script by its file name, such as Timewave's `docs-and-tools`, and name a crash inside mutmut in one line.
Found on 2026-11-20 while shipping TW-13648 in Timewave's `docs-and-tools`: `mutate-changes` failed twice there, so its worker mutated 18 changed lines by hand instead. The first run failed on a module path: the tests in `docker/scripts/` import the script under test as a top-level module (`import run_harness`), which mutmut's copy of the tree doesn't resolve as the tests expect. The second run crashed inside mutmut, with a `KeyError` in its worker pool.
- Find why each run failed, from a run against `docs-and-tools` at the commit TW-13648 merged.
- Where the module path is the cause, make `mutate-changes` run tests that import a script by its file name, as `docs-and-tools` does, the way they run outside mutmut.
- Where mutmut itself crashes, catch that crash and say so in one line naming mutmut and the error, so the worker knows to mutate by hand, instead of a traceback.
- Item 462 covers tests that fail in mutmut's copy of claude-config itself; check whether one fix serves both.
Not needed to start epic TW-13503: a worker can mutate the changed lines by hand, as TW-13648's did, so it lands in 0.16.0.
### 443. Measure whether compacting a waiting worker's session cut the cost of 20 chunks with an interrupt, with quality holding.
The check lilleman set for item 310 on 2026-11-11, which project principle 1 asks for before a cost cut stands: compare the cost entries of 20 archived chunks with an interrupt from before the compaction shipped against 20 from after it. Measure the tokens written to the cache by each resume after an interrupt, and the tokens per finished chunk, and check that review rounds and unfinished verdicts per chunk hold. Where the saving doesn't show, or quality drops, file an item to remove the compaction or retune `COMPACT_FLOOR` and `CACHE_MARGIN` in `bin/agent_cycle/interrupt.py`. Record the outcome as a decision. Start it once 20 chunks with an interrupt have run on 0.12.0 or later.