From c042551aaf96d04bcd7f26ff965d1e73ba98fef1 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 8 Nov 2026 19:12:38 +0100 Subject: [PATCH 1/5] Name the project's rung project in judge_replay, subagent_rung and review_replay --- bin/judge_replay/main.py | 16 ++++++++-------- bin/review_replay/main.py | 24 ++++++++++++------------ bin/subagent_rung/main.py | 6 +++--- docs/reading-cost.md | 16 ++++++++++++++++ todo.md | 7 +------ 5 files changed, 40 insertions(+), 29 deletions(-) diff --git a/bin/judge_replay/main.py b/bin/judge_replay/main.py index 233b9aba..7d2f2040 100644 --- a/bin/judge_replay/main.py +++ b/bin/judge_replay/main.py @@ -50,21 +50,21 @@ REFERENCE_EFFORT = "xhigh" def main(argv: list[str], env: typing.Mapping[str, str], home: pathlib.Path, effects: Effects) -> int: - anchor = arguments_or_exit(TOOL, argv, __doc__, USAGE, model_argument) - if isinstance(anchor, int): - return anchor - cases = archived_cases(anchor.model, archive_root(home, env), home) + project = arguments_or_exit(TOOL, argv, __doc__, USAGE, model_argument) + if isinstance(project, int): + return project + cases = archived_cases(project.model, archive_root(home, env), home) if isinstance(cases, Failure): return failed(TOOL, cases.reason) if not cases: - return failed(TOOL, f"no archived verdicts of projects on {anchor.model} in {archive_root(home, env)}; run loop-claude on a project on that model first") + return failed(TOOL, f"no archived verdicts of projects on {project.model} in {archive_root(home, env)}; run loop-claude on a project on that model first") cases = sample(cases, PER_KIND) - reference = Rung(anchor.model, REFERENCE_EFFORT) + reference = Rung(project.model, REFERENCE_EFFORT) # The candidates stop at the lowest rung a worker routes to: no route uses a rung below it for the judge. - replay = replayed(cases, reference, down_from(anchor, lowest_worker_rung(anchor)), lambda found, rung: rule(found, rung, home / ".claude", effects), reproduced, "verdicts") + replay = replayed(cases, reference, down_from(project, lowest_worker_rung(project)), lambda found, rung: rule(found, rung, home / ".claude", effects), reproduced, "verdicts") if isinstance(replay, Limited): return limited_exit(TOOL, replay) - print(report(anchor.model, reference, cases, replay)) + print(report(project.model, reference, cases, replay)) return 0 diff --git a/bin/review_replay/main.py b/bin/review_replay/main.py index c3266aea..e0d42fa6 100644 --- a/bin/review_replay/main.py +++ b/bin/review_replay/main.py @@ -71,24 +71,24 @@ def main(argv: list[str], env: typing.Mapping[str, str], home: pathlib.Path, eff read = arguments_or_exit(TOOL, argv, __doc__, USAGE, pass_and_model) if isinstance(read, int): return read - reviewed, anchor = read - rounds = archived_rounds(REVIEWERS[reviewed], anchor.model, archive_root(home, env), home) + reviewed, project = read + rounds = archived_rounds(REVIEWERS[reviewed], project.model, archive_root(home, env), home) if isinstance(rounds, Failure): return failed(TOOL, rounds.reason) codes = codes_found(rounds, effects) if not codes: - return failed(TOOL, f"no archived {reviewed} round of projects on {anchor.model} in {archive_root(home, env)} holds a 🔴 or 🟡 on code it can find") + return failed(TOOL, f"no archived {reviewed} round of projects on {project.model} in {archive_root(home, env)} holds a 🔴 or 🟡 on code it can find") chosen = sample(list(codes), LATEST) # The project's rung is the reference, so the candidates start below it. They reach the ladder's lowest rung, below the lowest a worker routes to, since a pass may run below the worker's rung. - candidates = down_from(anchor, LADDER[0])[1:] + candidates = down_from(project, LADDER[0])[1:] def found_on(found: Round, rung: Rung) -> set[int] | Limited: - return findings_found(found, codes[found], rung, anchor, home, effects) + return findings_found(found, codes[found], rung, project, home, effects) - replay = replayed(chosen, anchor, candidates, found_on, reproduced, f"{reviewed} rounds") + replay = replayed(chosen, project, candidates, found_on, reproduced, f"{reviewed} rounds") if isinstance(replay, Limited): return limited_exit(TOOL, replay) - print(report(reviewed, anchor.model, anchor, chosen, replay)) + print(report(reviewed, project.model, project, chosen, replay)) return 0 @@ -97,8 +97,8 @@ def pass_and_model(argv: list[str]) -> tuple[ReviewedPass, Rung] | None: if len(argv) != 2: return None reviewed = next((kind for kind in REVIEWERS if kind == argv[0]), None) - anchor = project_rung(argv[1]) - return (reviewed, anchor) if reviewed and anchor else None + project = project_rung(argv[1]) + return (reviewed, project) if reviewed and project else None def codes_found(rounds: list[Round], effects: Effects) -> dict[Round, Code]: @@ -177,12 +177,12 @@ def commit_log(listed: str) -> list[tuple[str, float]]: return [(commit, float(authored)) for commit, authored in (line.split() for line in listed.splitlines())] -def findings_found(found: Round, code: Code, rung: Rung, anchor: Rung, home: pathlib.Path, effects: Effects) -> set[int] | Limited: - """The indexes of the round's findings that its replay on rung reports, as the reviewer on anchor matches them.""" +def findings_found(found: Round, code: Code, rung: Rung, project: Rung, home: pathlib.Path, effects: Effects) -> set[int] | Limited: + """The indexes of the round's findings that its replay on rung reports, as the reviewer on project matches them.""" reviewed: str | Failure | Limited = first_reply(lambda: review(found, code, rung, home, effects)) if isinstance(reviewed, Limited): return reviewed - matched: set[int] | Failure | Limited = reviewed if isinstance(reviewed, Failure) else first_reply(lambda: match(found.findings, reviewed, found.root, anchor, effects)) + matched: set[int] | Failure | Limited = reviewed if isinstance(reviewed, Failure) else first_reply(lambda: match(found.findings, reviewed, found.root, project, effects)) if isinstance(matched, Failure): print(f" {found.root} {found.at} on {rung} found nothing: {matched.reason}", file=sys.stderr, flush=True) return set() diff --git a/bin/subagent_rung/main.py b/bin/subagent_rung/main.py index d6253338..f27aba2c 100644 --- a/bin/subagent_rung/main.py +++ b/bin/subagent_rung/main.py @@ -23,10 +23,10 @@ USAGE = f"usage: subagent-rung [--plan] , L a level from 1 to {LEVELS def agent_args(model: str, likelihood: int, planning: bool = False) -> str | None: """The Agent tool's model and effort for the rung likelihood picks from model's cheapest rung, never below it when planning; None for a model off the ladder.""" - anchor = project_rung(model) - if anchor is None: + project = project_rung(model) + if project is None: return None - return (planning_rung if planning else worker_rung)(anchor, likelihood).agent_args() + return (planning_rung if planning else worker_rung)(project, likelihood).agent_args() def main(argv: list[str]) -> int: diff --git a/docs/reading-cost.md b/docs/reading-cost.md index ebd5c168..d0bb519a 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -1025,3 +1025,19 @@ Read most (opens and searches): - `bin/loop_claude/loop/main.py` 1 - `bin/routing_figures/archive.py` 1 - `bin/score-outcomes` 1 + +## Reading cost, chunk cbe1c9d0886f, finished 2026-11-08T18:11:52Z + +70801 new input tokens before the first commit. + +Read most (opens and searches): + +- `README.md` 3 +- `bin/loop_claude/loop/main.py` 3 +- `bin/loop_claude/test_loop_claude.py` 3 +- `bin/model_routing/route.py` 3 +- `bin/routing_figures/test_routing_figures.py` 3 +- `bin/model_routing/ladder.py` 2 +- `todo.md` 2 +- `AGENTS.md` 1 +- `docs/decisions.md` 1 diff --git a/todo.md b/todo.md index e4a60502..632f8b28 100644 --- a/todo.md +++ b/todo.md @@ -13,7 +13,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| | 1 | 0.7.0 | | question | **Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 1 | 2 | 1 | 2 | 1 | | 0.0 | -| 219 | 0.7.0 | | | **Name the project's rung `project` in `bin/judge_replay/main.py`, `bin/subagent_rung/main.py` and `bin/review_replay/main.py`, in place of `anchor`, as `bin/model_routing/ladder.py` and `bin/loop_claude` name it.** | 1 | 1 | 3 | 3 | 2 | code health by 2 | 12.0 | | 224 | 0.7.0 | | | **Split `docs/decisions.md` → `todo.md: one table of items, …`'s 420-word scoring paragraph into one paragraph per choice, and drop the sentences that tell how the goal weights changed.** | 1 | 1 | 1 | 1 | 2 | code health by 2 | 12.0 | | 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 | @@ -86,10 +85,6 @@ It lives under `~/.claude`, which `.gitignore` keeps from the remote, so a lost The README line covers the bench's transcripts in `workflow-bench/logs/` too (goal 3). -### 219. Name the project's rung `project` in `bin/judge_replay/main.py`, `bin/subagent_rung/main.py` and `bin/review_replay/main.py`, in place of `anchor`, as `bin/model_routing/ladder.py` and `bin/loop_claude` name it. - -Item 172 renamed `anchor` to `project` across `bin/loop_claude`, after release 0.3.0's inherited architect named `bin/loop_claude/cycle/judge.py:68` `Reply.bundled`: "the project's rung is also called anchor". Three tools outside it still call the same rung `anchor`: `bin/judge_replay/main.py:54` (`anchor = arguments_or_exit(...)`, a `Rung` parsed from the model argument), `bin/subagent_rung/main.py:26` (`anchor = project_rung(model)`), and `bin/review_replay/main.py:74`, `:100` and `:180`, with `findings_found`'s docstring. While the name differs between tools, a reader works out each time that the two are one rung. The rename keeps behaviour. `bin/score_outcomes/anchors.py` uses `anchor` for score anchors, a different thing, and keeps the name. - ### 224. Split `docs/decisions.md` → `todo.md: one table of items, …`'s 420-word scoring paragraph into one paragraph per choice, and drop the sentences that tell how the goal weights changed. Found by the prose review of PR #368. The paragraph that opens `2026-10-16, PR #283: items rank by` covers the formula, F, the goal weights, the panels' spelling picks, the column order and the old shape, and grew a sentence per chunk. A reader looking for what F is, or why `2**S`, searches all of it. Its sentences on how the goal weights changed over time, such as the one on PR #319, describe past states, not what holds; git history keeps them. @@ -108,7 +103,7 @@ F is 8 until then, about one S 3 change, lilleman's call in PR #283. A chunk cos ### 155. Lower the reading cost of the files a chunk reads most before its first commit. -`bin/reading-cost` on 2026-11-08, before item 218's chunk: the median of the last 5 chunks is 139,686 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` 15 times, `README.md` 11, `docs/decisions.md` 8, `CHANGELOG.md` 7, `AGENTS.md` 6, `bin/chunk_preflight/test_chunk_preflight.py` 6, `bin/loop_claude/loop/main.py` 6, `bin/loop_claude/test_black_box.py` 5, `bin/rule_hook/test_rule_hook.py` 4 and `bin/run_heavy/test_run_heavy.py` 4. The chunk that ships this item runs `bin/reading-cost --reset`. +`bin/reading-cost` on 2026-11-08, before item 219's chunk: the median of the last 5 chunks is 139,686 new input tokens before their first commit, up from 105,188 for the 5 before them. The files read most over the last 5, counting opens and searches, were `todo.md` 13 times, `README.md` 11, `bin/loop_claude/loop/main.py` 9, `AGENTS.md` 6, `bin/chunk_preflight/test_chunk_preflight.py` 6, `docs/decisions.md` 6, `CHANGELOG.md` 5, `bin/loop_claude/test_black_box.py` 5, `bin/run_heavy/test_run_heavy.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. -- 2.52.0 From 7ddcf4fe5ad30bf4e8442f672c93172b9be6b07f Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 8 Nov 2026 19:13:00 +0100 Subject: [PATCH 2/5] =?UTF-8?q?Answer=20security=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20nothing=20t?= =?UTF-8?q?o=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From e1651179ee54584b2de97ede23501fe1204de524 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 8 Nov 2026 19:13:03 +0100 Subject: [PATCH 3/5] Name the project's rung in findings_found's docstring --- bin/review_replay/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/review_replay/main.py b/bin/review_replay/main.py index e0d42fa6..9f8dfbef 100644 --- a/bin/review_replay/main.py +++ b/bin/review_replay/main.py @@ -178,7 +178,7 @@ def commit_log(listed: str) -> list[tuple[str, float]]: def findings_found(found: Round, code: Code, rung: Rung, project: Rung, home: pathlib.Path, effects: Effects) -> set[int] | Limited: - """The indexes of the round's findings that its replay on rung reports, as the reviewer on project matches them.""" + """The indexes of the round's findings that its replay on rung reports, as the reviewer on the project's rung matches them.""" reviewed: str | Failure | Limited = first_reply(lambda: review(found, code, rung, home, effects)) if isinstance(reviewed, Limited): return reviewed -- 2.52.0 From 4a0de1069013b20e1767aad22f30b118e69280bc Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 8 Nov 2026 19:18:09 +0100 Subject: [PATCH 4/5] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20name=20clau?= =?UTF-8?q?de,=20not=20a=20reviewer,=20as=20what=20matches=20findings;=20c?= =?UTF-8?q?ut=20a=20stale=20pointer=20in=20item=20155?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/review_replay/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/review_replay/main.py b/bin/review_replay/main.py index 9f8dfbef..13c76b48 100644 --- a/bin/review_replay/main.py +++ b/bin/review_replay/main.py @@ -178,7 +178,7 @@ def commit_log(listed: str) -> list[tuple[str, float]]: def findings_found(found: Round, code: Code, rung: Rung, project: Rung, home: pathlib.Path, effects: Effects) -> set[int] | Limited: - """The indexes of the round's findings that its replay on rung reports, as the reviewer on the project's rung matches them.""" + """The indexes of the round's findings that its replay on rung reports, as claude on the project's rung matches them.""" reviewed: str | Failure | Limited = first_reply(lambda: review(found, code, rung, home, effects)) if isinstance(reviewed, Limited): return reviewed -- 2.52.0 From 193ea2bb55032156a32c4154e15e11b4aa50d4ca Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 8 Nov 2026 19:18:09 +0100 Subject: [PATCH 5/5] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1=20(0=20misread);=20file=20the?= =?UTF-8?q?=20two=20test=20gaps=20as=20item=20275?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- todo.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/todo.md b/todo.md index 632f8b28..2d3dc2b2 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 275` +`Next ID = 276` ## Items @@ -40,6 +40,7 @@ | 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 | +| 275 | 0.7.0 | | | **Make the `Main` tests of `judge-replay` and `review-replay` fail when the replays ignore the project's model, its lowest worker rung or the round's checkout.** | 1 | 2 | 1 | 2 | 2 | 1.1 by 2 | 2.8 | | 274 | 0.7.0 | | | **Let an item name a maintain goal it raises confidence in, such as a test leg that guards it, and weigh that move against the achieve goals in `bin/rank_todo.py`.** | 2 | 2 | 3 | 5 | 4 | 1 by 3 | 2.2 | | 273 | 0.8.0 | | decision | **Re-tune the E + I steps of `REVIEW_STEPS` for 6 to 8 once 10 finished chunks have scored an E + I of 6 or more, from how well E + I orders their review rounds and 🔴 findings.** | 1 | 2 | 2 | 3 | 2 | 1.1 by 2, 1.4 by 3 | 6.8 | | 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 | @@ -103,7 +104,7 @@ F is 8 until then, about one S 3 change, lilleman's call in PR #283. A chunk cos ### 155. Lower the reading cost of the files a chunk reads most before its first commit. -`bin/reading-cost` on 2026-11-08, before item 219's chunk: the median of the last 5 chunks is 139,686 new input tokens before their first commit, up from 105,188 for the 5 before them. The files read most over the last 5, counting opens and searches, were `todo.md` 13 times, `README.md` 11, `bin/loop_claude/loop/main.py` 9, `AGENTS.md` 6, `bin/chunk_preflight/test_chunk_preflight.py` 6, `docs/decisions.md` 6, `CHANGELOG.md` 5, `bin/loop_claude/test_black_box.py` 5, `bin/run_heavy/test_run_heavy.py` 4 and `bin/claude_code/test_claude_code.py` 3. The chunk that ships this item runs `bin/reading-cost --reset`. +`bin/reading-cost` on 2026-11-08: the median of the last 5 chunks is 139,686 new input tokens before their first commit, up from 105,188 for the 5 before them. The files read most over the last 5, counting opens and searches, were `todo.md` 13 times, `README.md` 11, `bin/loop_claude/loop/main.py` 9, `AGENTS.md` 6, `bin/chunk_preflight/test_chunk_preflight.py` 6, `docs/decisions.md` 6, `CHANGELOG.md` 5, `bin/loop_claude/test_black_box.py` 5, `bin/run_heavy/test_run_heavy.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. @@ -209,6 +210,13 @@ When CI runs a rule check, such as one of `bin/rule-hook`'s, let `