Name code health in item 155's Moves #422

Merged
lilleman merged 1 commits from item-155-moves into main 2026-11-08 11:17:15 +01:00
+5 -5
View File
@@ -20,6 +20,7 @@
| 123 | 0.7.0 | | | **Have `bin/comprehension_history.py` parse each history entry once into seats, votes and places, so `latest_places`, `worse_places` and `worse_votes` neither depend on table order nor split a label to find a seat.** | 2 | 1 | 2 | 3 | 5 | code health by 5, 1.4 by 5 | 11.0 |
| 139 | 0.7.0 | | | **Split `bin/routing_figures/measure.py` by concern, and keep the figures' measured cycle and each raised call as fields loop-claude reads back, not as the prose it renders.** | 3 | 1 | 2 | 4 | 5 | code health by 5, 1.4 by 5 | 11.0 |
| 158 | 0.7.0 | | decision | **Measure the fixed cost of a chunk from loop-claude's archive, in tokens and hours against its items' S, and set F in `Score = 100 * V / (2**S + F)` to it.** | 2 | 2 | 1 | 3 | 3 | 1.1 by 5, 1.4 by 5 | 10.3 |
| 155 | 0.7.0 | | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 3 | 2 | 2 | 5 | 5 | code health by 4, 1.4 by 6 | 9.6 |
| 215 | 0.7.0 | | | **Decode a reload's handed JSON with a decoder for `LoopRun` and its `Route`, in place of `decoded_as`'s generic one with its two sentinels and `Route.fits` hook.** | 2 | 1 | 3 | 4 | 3 | code health by 2 | 9.0 |
| 237 | 0.7.0 | | principle | **Give `judge` and `judge_once` in `bin/loop_claude/cycle/judge.py` a record of the inputs they share, in place of nine and eight parameters, or record why they stay.** | 2 | 1 | 2 | 3 | 3 | code health by 2 | 9.0 |
| 242 | 0.7.0 | | principle | **Run each case of a table-driven test in its own `subTest`, and split each test that checks several behaviours, so one failure does not hide the others and names its case.** | 2 | 1 | 1 | 2 | 3 | code health by 2 | 9.0 |
@@ -42,7 +43,6 @@
| 101 | 0.7.0 | | principle | **Have `larv_review/history_commands.py`'s `read_seats` take the time, the commit check and the history as inputs, so it parses and decides without effects.** | 2 | 1 | 2 | 3 | 3 | 1.1 by 5 | 5.3 |
| 12 | 0.7.0 | | | **Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough.** | 3 | 2 | 1 | 4 | 4 | 1.1 by 6 | 4.2 |
| 272 | 0.7.0 | | owner | **Make `deploy-release --cut` say when each step finishes, end on one line saying the release is cut and `~/.claude` is on it, and delete the merged release branch.** | 1 | 1 | 1 | 1 | 2 | 1.5 by 3 | 3.9 |
| 155 | 0.7.0 | | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 3 | 2 | 2 | 5 | 5 | 1.4 by 6 | 2.4 |
| 102 | 0.8.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 | 4.2 |
| 135 | 0.8.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 | 4.2 |
| 270 | 0.8.0 | | | **Compare each review pass's share of chunks that go to a second round, and move each check stability repeats across chunks into the worker's pre-review gate.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 2, 1.4 by 2 | 4.1 |
@@ -114,6 +114,10 @@ The paired ruling on PR #265 ruled worse. Make these places easier to read: `mea
F is 8 until then, about one S 3 change, lilleman's call in PR #283. A chunk costs more than its size: the worker reads about 130k tokens before its first commit whatever the item, and every chunk takes its review passes. Fit cost against 2**S from the finished chunks `score-outcomes` measures, in the same units `2**S` counts, and say in `docs/decisions.md` → `todo.md: …` how far the fit holds. A chunk bundling tiny items shares F between them.
### 155. Lower the reading cost of the files a chunk reads most before its first commit.
`bin/reading-cost` on 2026-11-08, after item 229's chunk: the median of the last 5 chunks is 144,200 new input tokens before their first commit, up from 105,744 for the 5 before them. The files read most over the last 5, counting opens and searches, were `todo.md` 14 times, `README.md` 12, `docs/decisions.md` 11, `AGENTS.md` 8, `bin/loop_claude/test_black_box.py` 7, `bin/chunk_preflight/test_chunk_preflight.py` 6, `bin/loop_claude/loop/main.py` 5, `CHANGELOG.md` 4, `bin/test_chunk_pick.py` 4 and `bin/claude_code/test_claude_code.py` 3. The chunk that ships this item runs `bin/reading-cost --reset`.
### 215. Decode a reload's handed JSON with a decoder for `LoopRun` and its `Route`, in place of `decoded_as`'s generic one with its two sentinels and `Route.fits` hook.
Release 0.3.0's Mid A (PR #324 at c713910) named `bin/loop_claude/loop/reload.py:43` `decoded_as`: "a generic decoder with two sentinels and a duck-typed fits hook defined on Route". This lowers Shape: `decoded_as` is generic over any type, yet `decode_handed` calls it with one dataclass, `LoopRun`. Keep what it does today: a field added since the running script started may be missing, and a handed dataclass holding a field its `RETIRED` names decodes as None where its type allows None, and is rejected otherwise. `LoopRun.items_taken_in`, a tuple of item IDs, decodes only from a JSON array of integers. Make `decoded_as` easier to read.
@@ -218,10 +222,6 @@ When CI runs a rule check, such as one of `bin/rule-hook`'s, let `<!-- rule-over
Cutting 0.6.0 printed `waiting for the checks of pull request 418`, then `Cut v0.6.0.` and `Moved from v0.5.0 to v0.6.0.`, then the whole 0.6.0 changelog section. The two lines saying it worked scrolled off behind the changelog, and no line said the checks passed or the pull request merged. So the human couldn't tell whether the cut had finished or was still waiting. Print a line on stderr as each step finishes: branch pushed, pull request opened, checks passed, merged, tagged, tag pushed. End stdout with one line, after the changelog: `Done: v<version> is cut and pushed, and <checkout> is on it.` Once the tag is pushed, delete the remote branch `release-<version>`, which 0.6.0's cut left on origin. A failed delete only warns, since the release is cut by then. Update the tests in `bin/deploy_release/test_deploy_release.py` and `deploy-release --help`.
### 155. Lower the reading cost of the files a chunk reads most before its first commit.
`bin/reading-cost` on 2026-11-08, after item 229's chunk: the median of the last 5 chunks is 144,200 new input tokens before their first commit, up from 105,744 for the 5 before them. The files read most over the last 5, counting opens and searches, were `todo.md` 14 times, `README.md` 12, `docs/decisions.md` 11, `AGENTS.md` 8, `bin/loop_claude/test_black_box.py` 7, `bin/chunk_preflight/test_chunk_preflight.py` 6, `bin/loop_claude/loop/main.py` 5, `CHANGELOG.md` 4, `bin/test_chunk_pick.py` 4 and `bin/claude_code/test_claude_code.py` 3. The chunk that ships this item runs `bin/reading-cost --reset`.
### 102. 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`.
Found by the principles audit of PR #242. `bin/loop_claude/test_black_box.py:117-118` swaps the global `time.sleep`, the shape "Functional core, imperative shell" bans, and the audit of PR #376 found the same block swapping `machine_load.memory.MEMINFO` at lines 120-123. An override of each lets the test run the code as production runs it.