From 3649a83c0c140215ce1ff1a371782cad9e49e073 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 19 Nov 2026 05:24:50 +0100 Subject: [PATCH] Remove item 310 again, which merging main into item-442 brought back, and file item 445 to refuse such a plan --- docs/reading-cost.md | 51 ++++++++++++++++++++++++++++++++++++++++++++ todo.md | 27 +++++++---------------- 2 files changed, 59 insertions(+), 19 deletions(-) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 4f0b9416..301d6c43 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -3020,3 +3020,54 @@ Read most (opens and searches): - `bin/chunk_pr/main.py` 1 - `bin/do_epic/findings.py` 1 - `bin/do_epic/repos.py` 1 + +## Reading cost, chunk 0609adf49c4a, finished 2026-11-19T03:00:12Z + +123998 new input tokens before the first commit. + +Read most (opens and searches): + +- `bin/do_epic/test_main.py` 11 +- `bin/do_epic/main.py` 7 +- `bin/do_epic/test_scheduler.py` 7 +- `README.md` 3 +- `bin/do_epic/scheduler.py` 3 +- `docs/decisions.md` 3 +- `CHANGELOG.md` 2 +- `bin/agent_cycle/tmux.py` 2 +- `bin/do_epic/backend/fake.py` 2 +- `bin/do_epic/repo_pick.py` 2 + +## Reading cost, chunk 373cc8b2e93c, finished 2026-11-19T03:59:22Z + +100205 new input tokens before the first commit. + +Read most (opens and searches): + +- `bin/loop_claude/test_loop_claude.py` 9 +- `bin/loop_claude/loop/usage.py` 3 +- `bin/loop_effects/test_effects.py` 3 +- `README.md` 2 +- `bin/loop_effects/effects.py` 2 +- `bin/text_files/utc_stamp.py` 2 +- `bin/claude_code/entries.py` 1 +- `bin/claude_code/reply.py` 1 +- `bin/claude_code/tokens.py` 1 +- `bin/claude_code/transcript.py` 1 + +## Reading cost, chunk 29319d5031fd, finished 2026-11-19T04:21:26Z + +117479 new input tokens before the first commit. + +Read most (opens and searches): + +- `bin/do_epic/main.py` 6 +- `bin/do_epic/ranking.py` 3 +- `bin/do_epic/scheduler.py` 3 +- `bin/do_epic/config.py` 2 +- `bin/do_epic/repo_pick.py` 2 +- `bin/do_epic/repos.py` 2 +- `bin/do_epic/split.py` 2 +- `docs/decisions.md` 2 +- `bin/do_epic/backend/protocol.py` 1 +- `bin/do_epic/findings.py` 1 diff --git a/todo.md b/todo.md index 750afbd0..e19629ed 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 445` +`Next ID = 446` ## Items @@ -14,8 +14,8 @@ |---|---|---|---|---|---|---|---|---|---|---|---| | 420 | 0.12.0 | | | **End a worker that printed its final result and lingers, by killing the background shells it left, after a few minutes, and print each kill with its evidence on loop-claude's terminal.** | 2 | 2 | 2 | 4 | 3 | 1.5 by 6 | 2.0 | | 417 | 0.12.0 | | | **Run do-epic end to end against a sandbox epic on a real Jira site with a command of its own, outside `run-tests`.** | 2 | 1 | 1 | 2 | 3 | 1 by 5 | 1.9 | -| 310 | 0.12.0 | | | **Compact a waiting worker's session shortly before its prompt cache expires, only when the human has not answered an interrupt by then.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 3 | 0.9 | | 422 | 0.12.0 | 420 | | **Check every 5 minutes whether a tmux window of the loop looks stuck by other signs than a lingering worker, investigate it with a headless claude, and kill only the process the investigation names.** | 3 | 2 | 3 | 6 | 5 | 1.5 by 4 | 0.8 | +| 445 | 0.13.0 | | | **Refuse a plan that holds an item a `Finish item ` commit already removed, so a merge resolution cannot bring a finished item back.** | 2 | 2 | 2 | 4 | 3 | 1.4 by 3, 1.1 by 2 | 1.8 | | 365 | 0.13.0 | | | **Have `score-outcomes` read the finished and dropped items of a plan outside the checkout, from the project repo's history or from Jira's issue changelogs.** | 3 | 2 | 2 | 5 | 4 | 1.6 by 2, 1.1 by 2 | 1.2 | | 368 | 0.13.0 | | | **Call a release review due, call a release ready to cut, and tell whether a chunk owes a scoring run, for a plan outside the checkout, from the project repo's history or from Jira.** | 3 | 2 | 2 | 5 | 4 | 1.6 by 2, 1.1 by 2 | 1.2 | | 309 | 0.13.0 | | | **Run a scoring run's second pass on one head with two seats in place of four, once `larv-review agreement` shows the seats agree with each other more than a run agrees with its rerun.** | 2 | 2 | 2 | 4 | 2 | 1.4 by 3 | 1.2 | @@ -98,23 +98,6 @@ Touches: - `bin/do-epic-e2e` - `bin/do_epic/e2e/` -### 310. Compact a waiting worker's session shortly before its prompt cache expires, only when the human has not answered an interrupt by then. - -281 worker resumes after the 1-hour cache expired rewrote a whole context, $379 of the $9,154 measured from 2026-09-30 to 2026-11-11 (4.1%). A compaction while the cache is warm reads the context at a twentieth of the input price and leaves about 20k tokens to rewrite later. - -lilleman, 2026-11-11: do it on a timer, so an answer that comes in time doesn't cost anything. When loop-claude interrupts, start a timer a margin short of the cache lifetime (about 50 minutes of a 1-hour cache; read the lifetime from the session's last `cache_creation` usage). If no answer has come when it fires, compact the session, then keep waiting. Skip it below about 60k tokens of context, where the rewrite costs less than the compaction. A wait for a usage limit can't be helped this way. - -Probe first that `claude -p "/compact" --resume ` compacts a session: the Agent SDK documents `/compact` as a prompt, the CLI pages don't show it. Claude Code compacts idle interactive sessions itself ("Compacted while idle"), but not `-p` runs. Check: the cost entries of 20 chunks with an interrupt, before and after. - -Touches: -- `bin/agent_cycle/interrupt.py`: `interrupt`, `answered`, `typed_answer`, `WorkerSession` -- `bin/loop_effects/effects.py`: `Effects`, `system_effects` -- `bin/claude_code/tokens.py`: `tokens_of` (small) -- `bin/claude_code/reply.py`: `claude_reply` (small) -- `bin/loop_claude/loop/usage.py`: `HELP` (small) -- `bin/loop_claude/test_loop_claude.py`: `FakeEffects`, `Interrupts` -- `bin/loop_effects/test_effects.py` - ### 422. Check every 5 minutes whether a tmux window of the loop looks stuck by other signs than a lingering worker, investigate it with a headless claude, and kill only the process the investigation names. Item 420 ends a worker that printed its final result and lingers. A window can also stall earlier: a test run that hangs on a shell ignoring SIGINT (item 402's first full run), a pane with no output while its process tree does no work, or a background shell older than the chunk's usual length. @@ -129,6 +112,12 @@ Touches: - `bin/agent_cycle/tmux.py`: `Listed`, `listed` - `README.md`: `## Tools` (small) +### 445. Refuse a plan that holds an item a `Finish item ` commit already removed, so a merge resolution cannot bring a finished item back. + +Merging main into item-442 in 610edb1a resolved a todo.md conflict by keeping item 310's row and detail, which e019a6b7 had just finished. loop-claude then started a chunk on item 310, whose work had already merged, and that chunk only removed the item again. No check noticed: `rank_todo.py --check` reads one file, and rule-hook's `todo-rank-check` sees only an agent's writes, not what a merge resolution keeps. + +Have the gate, or `rank_todo.py --check` where it runs in a checkout, refuse a plan that holds an ID a commit titled `Finish item ` removed on the default branch, naming the commit. An item removed by mistake can come back only under a new ID, which keeps the check simple. + ### 365. Have `score-outcomes` read the finished and dropped items of a plan outside the checkout, from the project repo's history or from Jira's issue changelogs. lilleman's call, 2026-11-12: 0.10.0 and 0.11.0 switch the history tools off for a plan outside the checkout, and 0.13.0 holds only their ports. In Jira a dropped item, which `Drop item` commit titles mark today, is an issue resolved by a resolution the config names. -- 2.52.0