Archive each review-replay and judge-replay run's transcript beside its result
CI / tests (pull_request) Failing after 2m52s

This commit is contained in:
2026-11-17 01:49:49 +01:00
parent f2a4347d78
commit 5aabbc87bf
11 changed files with 221 additions and 17 deletions
+2 -2
View File
@@ -182,9 +182,9 @@ Valid while `~/.claude` is a checkout of this repo.
Valid while claude takes `--session-id` and resumes by it, and the human runs loop-claude where tmux is installed.
## loop-claude: the archive keeps the raw transcript and each judge run, and a failed archive stops the loop
## loop-claude: the archive keeps the raw transcript and each judge run, a failed archive stops the loop, and judge-replay and review-replay keep each run and their report under its replays/ folder
2026-09-28, lilleman. Serves goals 1 and 3: saving each transcript locally is the first step of backing it up, and it shows afterwards what an unattended run did. A copy of the `.jsonl`, deduplicated by content hash, with its outcomes beside it; a rendering drops tool results, and a second-resolution stamp names two states within one second as one file. A failed archive exits 1, since a loop that loses its record silently fails the backup goal. The judge's runs are archived too, as `judge/<sha256>.json` in the chunk's folder: the prompt it read and its json reply. Together they are its whole transcript, since it runs with no tools and one turn. A run is kept whole and deduplicated by hash, and the outcome of the verdict, interrupt or rejected reply it produced names it on a `Judge run:` line. Keeping it whole costs little: a prompt is at most `JUDGE_PROMPT_CHARS`, 400,000 characters. Measured 2026-11-17, the archive's 911 judge lines come to at most 0.36 GB of prompts, against 3.5 GB in its 1,211 transcript copies, the largest 23.4 MB. The judge is still priced from its `Judge cost:` line, which is claude's own total for the run, and the Spent block counts the live reply's tokens; the archived reply keeps its `usage` for a later reader, and nothing reads it back. `judge-replay` replays a verdict on its archived prompt where there is one. Valid while transcripts, and the judge's prompts, stay small enough to copy whole.
2026-09-28, lilleman. Serves goals 1 and 3: saving each transcript locally is the first step of backing it up, and it shows afterwards what an unattended run did. A copy of the `.jsonl`, deduplicated by content hash, with its outcomes beside it; a rendering drops tool results, and a second-resolution stamp names two states within one second as one file. A failed archive exits 1, since a loop that loses its record silently fails the backup goal. The judge's runs are archived too, as `judge/<sha256>.json` in the chunk's folder: the prompt it read and its json reply. Together they are its whole transcript, since it runs with no tools and one turn. A run is kept whole and deduplicated by hash, and the outcome of the verdict, interrupt or rejected reply it produced names it on a `Judge run:` line. Keeping it whole costs little: a prompt is at most `JUDGE_PROMPT_CHARS`, 400,000 characters. Measured 2026-11-17, the archive's 911 judge lines come to at most 0.36 GB of prompts, against 3.5 GB in its 1,211 transcript copies, the largest 23.4 MB. The judge is still priced from its `Judge cost:` line, which is claude's own total for the run, and the Spent block counts the live reply's tokens; the archived reply keeps its `usage` for a later reader, and nothing reads it back. `judge-replay` replays a verdict on its archived prompt where there is one. The replays keep their own runs, since each decides which rung a review pass or the judge may run on and so must stay checkable and re-priceable once the decision is questioned (2026-11-17, item 304): `replays/<tool>-<arguments>-<UTC stamp>/` in the archive's root holds one `<sha256>.jsonl` per run, whether it failed or not, and `result.md`, the report the tool printed. A run's file is a header line with claude's arguments, working directory and prompt, then claude's stream-json output as printed, whose last line is the reply the replay read; a reviewer's tool calls and a judge's reply are in it. `claude_reply` takes stream-json in place of json for every caller, so the judge's runs are streams too, and its archive keeps the `JudgeRun` it did. A run that repeats another word for word is kept once. A folder that cannot be written is said on stderr and doesn't stop the replay. Valid while transcripts, and the judge's prompts, stay small enough to copy whole.
## loop-claude: each verdict records the claude-config release and commit that ran it, the raw tokens each thread spent by model and kind since the previous outcome that recorded a spend, and the human's typed answer the judge quotes as reversing a choice the worker took on its own recommendation
+51
View File
@@ -2345,3 +2345,54 @@ Read most (opens and searches):
- `bin/larv_review/test_larv_review.py` 3
- `bin/project_config/main.py` 3
- `bin/release_plan/formula.py` 3
## Reading cost, chunk 093397894c39, finished 2026-11-16T23:09:28Z
71806 new input tokens before the first commit.
Read most (opens and searches):
- `bin/todo_item/main.py` 10
- `bin/todo_item/test_todo_item.py` 10
- `README.md` 5
- `bin/project_config/test_project_config.py` 4
- `bin/chunk_pr/main.py` 3
- `CLAUDE.md` 2
- `bin/plan_store/fakes.py` 2
- `bin/plan_store/stores.py` 2
- `bin/project_config/settings.py` 2
- `docs/decisions.md` 2
## Reading cost, chunk 7cd3e6d607bf, finished 2026-11-16T23:18:20Z
89486 new input tokens before the first commit.
Read most (opens and searches):
- `bin/deploy_release/test_deploy_release.py` 11
- `bin/chunk_preflight/test_chunk_preflight.py` 5
- `.gitignore` 4
- `bin/chunk_preflight/gathered.py` 4
- `bin/deploy_release/cut.py` 3
- `bin/forge/pulls.py` 3
- `docs/decisions.md` 3
- `README.md` 2
- `bin/chunk_pr/main.py` 2
- `bin/chunk_preflight/main.py` 2
## Reading cost, chunk 080dc175f969, finished 2026-11-17T00:45:04Z
139513 new input tokens before the first commit.
Read most (opens and searches):
- `bin/loop_claude/test_loop_claude.py` 13
- `README.md` 8
- `bin/loop_claude/cycle/run.py` 5
- `bin/judge_replay/main.py` 4
- `bin/loop_claude/cycle/judge.py` 4
- `bin/judge_replay/test_judge_replay.py` 3
- `bin/transcript_archive/outcomes.py` 3
- `bin/transcript_archive/test_transcript_archive.py` 3
- `skills/larv-review/SKILL.md` 3
- `bin/loop_claude/loop/close.py` 2