Answer prose round 1: 0 🔴, 8 🟡 (0 misread); reword the decision, the rule texts and item 341

This commit is contained in:
2026-11-18 15:54:24 +01:00
parent aaa080a201
commit 8210754780
6 changed files with 11 additions and 15 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ def rounds_without_failure(chosen: list[Round], runs: list[list[set[int] | Failu
def comparison(reviewed: str, reference: Rung, change: Change, rounds: list[Round], with_it: tuple[list[set[int]], list[set[int]], list[set[int]]], without: list[set[int]], left_out: int) -> str:
"""What the three unchanged replays and the one with change found in rounds. Each unchanged replay missed some findings the other two found: the control, the noise of an unchanged reviewer. The one with the change is held to the findings the first two found, as the third is, and passes where it missed no more than the most an unchanged replay did. left_out counts the rounds a replay failed on, which rounds leaves out."""
"""What the three unchanged replays and the one with change found in rounds. Each unchanged replay missed some findings the other two found: the control, the noise of an unchanged reviewer. The one with the change is held to the findings the first two found, as the third is, and passes where it missed no more than the most an unchanged replay did. with_it holds what each of the three unchanged replays found in each round, and without what the replay with change found. left_out counts the rounds a replay failed on, which rounds leaves out."""
first, second, third = with_it
def shared(one: list[set[int]], other: list[set[int]]) -> list[set[int]]:
+1 -1
View File
@@ -121,7 +121,7 @@ def reviewed_in(found: Round, code: Code, rung: Rung, copies: Copies, home: path
def launch(reviewer: str, rung: Rung, prompt: str, checkout: str, copies: Copies, home: pathlib.Path, change: Change | None) -> tuple[list[str], str] | Failure:
"""claude's arguments and prompt for reviewer on rung, in copies.clone, a copy of the project whose checkout is checkout. Where change is given, claude starts under its environment, through its settings; where change turns the instruction files off, the prompt holds what the SubagentStart hook and the header's last line hand such a reviewer."""
"""claude's arguments and prompt for reviewer on rung, in copies.clone, a copy of the project whose checkout is checkout. Where change is given, claude starts under the environment change holds, which claude's settings set; where change turns the instruction files off, the prompt holds what the SubagentStart hook and the header's last line hand such a reviewer."""
args = ["--agent", reviewer, *rung.flags()]
if change is None:
return args, prompt
+1 -1
View File
@@ -96,7 +96,7 @@ RULES: dict[RuleName, Rule] = {
),
# A Read carries no text for a marker, so no marker waives it.
"transcript-read": Rule(
"an agent never reads a session transcript under ~/.claude/projects with Read, since the file holds the whole thread of its session and a read puts all of it in context; it prints the lines it needs with grep or jq; the `tool-results/` files that Claude Code saves a long Bash result to are not transcripts and may be read",
"an agent never reads a session transcript under ~/.claude/projects with Read, since the file holds every tool result of its session, and reading it costs far more than the lines the agent needs; the agent prints only those lines with grep or jq; the `tool-results/` files that Claude Code saves a long Bash result to are not transcripts and may be read",
"a Read call whose file is a `.jsonl` file under ~/.claude/projects; a Grep or a Bash command that reads one is not checked",
overridable=False,
),
+1 -1
View File
@@ -1,6 +1,6 @@
"""Whether a Read asks for a session transcript under ~/.claude/projects, for the `transcript-read` rule.
A transcript is a `.jsonl` file there, a session's own or a subagent's. Its size is the session's whole thread, so a Read of one puts it all in context. The files Claude Code saves a long Bash result to, under the session's `tool-results/` folder, are `.txt` files and pass: the model is handed their path to read."""
A transcript is a `.jsonl` file there, a session's own or a subagent's. It holds every tool result of its session, so reading one costs far more than the lines a task needs. The files Claude Code saves a long Bash result to, under the session's `tool-results/` folder, are `.txt` files and pass: the model is handed their path to read."""
import posixpath
from rule_hook.rules import Breach
+6 -6
View File
@@ -268,19 +268,19 @@ Hours. A chunk ran a median 0.7 hours from its first message to its last, one in
Valid while cache reads cost a twentieth of input and Claude Code's compaction keeps the worker's task.
## loop-claude: the worker's claude saves a long Bash result to a file, above 6,000 characters, and rule-hook refuses a Read of a session transcript
## loop-claude: the worker's claude saves a Bash result of more than 6,000 characters to a file, and rule-hook refuses a Read of a session transcript
2026-11-18, the chunk that shipped the Bash ceiling. Applies project principle 1; serves goal 1.4.
2026-11-18, claude, as the plan item that asked for the ceiling set out. Applies project principle 1; serves goal 1.4.
loop-claude hands each worker's claude `BASH_MAX_OUTPUT_LENGTH=6000` (`worker_environment` in `bin/loop_claude/cycle/run.py`, the value in `bin/claude_code/output_limits.py`). Claude Code then saves a longer Bash result to a file under `~/.claude/projects/<project>/<session>/tool-results/` and hands the model the path and the first 2,000 characters, which a probe on 2026-11-17 confirmed. A subagent inherits the variable, so every reviewer the worker launches gets it too. The archive held 7,870 Bash results over 3,000 characters in workers (about $305 of carried context) and about $145 more in stability reviewers; a ceiling of 6,000 characters would have removed $228 of the workers', 10,000 characters $122.
rule-hook's `transcript-read` rule refuses a Read of a `.jsonl` file under `~/.claude/projects`: a session transcript holds every tool result of its session, and reading old ones cost $46. It doesn't refuse a Read of `tool-results/*.txt`, which the ceiling hands the model, and it checks no Grep or Bash command. It can't be overridden, since a Read carries no text for a marker.
rule-hook's `transcript-read` rule refuses a Read of a `.jsonl` file under `~/.claude/projects`: a session transcript holds every tool result of its session, and the archive's Reads of old ones cost $46. It doesn't refuse a Read of `tool-results/*.txt`, which the ceiling hands the model, and it checks no Grep or Bash command. It can't be overridden, since a Read carries no text for a marker.
The check, `review-replay stability claude-opus-5-5 --bash-ceiling` on 2026-11-18: 10 archived stability rounds holding 25 🔴 and 🟡 findings, replayed three times as archived and once under the ceiling. The three as archived found 17, 15 and 17 findings, and missed 1, 3 and 2 of those that both of the other two found. Under the ceiling the replay found 18, and missed 0 of the 14 that both of the first two found, so it passes (0 is no more than 3). Its archive is `replays/review-replay-stability-claude-opus-5-5-bash-ceiling-20261118T095822Z`. This is the check the decision of 2026-10-27 asked for after a 12k cap cost stability reviewers a finding inside the noise; the ceiling leaves a file to read.
The check, `review-replay stability claude-opus-5-5 --bash-ceiling` on 2026-11-18: 10 archived stability rounds holding 25 🔴 and 🟡 findings, replayed three times as archived and once under the ceiling. The three as archived found 17, 15 and 17 findings, and missed 1, 3 and 2 of those that both of the other two found. Under the ceiling the replay found 18, and missed 0 of the 14 that both of the first two found, so it passes (0 is no more than 3). Its archive is `replays/review-replay-stability-claude-opus-5-5-bash-ceiling-20261118T095822Z`. The decision of 2026-10-27 found that a 12k cap on a reviewer's tool output cost stability reviewers a finding, 3 of 6 against 4 of 6. That cap left no file to read, and the three replays as archived here measure the noise of an unchanged reviewer.
Only the stability pass was replayed, since the archive's long Bash results are the workers' and the stability reviewers'. `--read-limit` runs the same replay for the Read limit (`CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS`); its hand-over waits for plan item 341.
Only the stability pass was replayed, since the archive's long Bash results are the workers' and the stability reviewers'. `--read-limit` runs the same replay for the Read limit (`CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS`); its hand-over waits for the replays of the other passes, which the plan holds as an item.
Valid while Claude Code saves a Bash result over the ceiling to a file and hands the model its path, and a replay of the archived stability rounds under the ceiling keeps finding what the unchanged replays find.
Valid while Claude Code saves a Bash result over the ceiling to a file and hands the model its path.
## machine load: a heavy command waits for one of the machine's heavy slots, one for every 4 CPUs, which every session shares, and loop-claude starts a worker only while at least a quarter of the machine's memory is available
+1 -5
View File
@@ -411,11 +411,7 @@ Raised by item 312's research round, 2026-11-12. Over the 53 chunks archived sin
loop-claude can hand it as it hands `CLAUDE_CODE_AUTO_COMPACT_WINDOW`, and subagents inherit it, the principles auditors included. The choice of 2026-10-27 that the principles audit reads the project whole holds as long as it pages through what it reads.
The replay: give `review-replay` a way to set the variable, then replay the archived prose, stability, product-owner and principles rounds at 5,000 tokens, beside two unchanged replays of the same rounds. Keeps quality where each pass finds every finding the two unchanged replays both find, or misses no more than the most an unchanged replay misses, as `review-replay --omit-claude-md` counts it. Keep it only where the replays' Read characters also fall; item 311's stability replay can share the baseline runs.
Blocked by item 311, 2026-11-17: item 311's chunk already generalizes `review-replay`'s `--omit-claude-md` comparison into a `Change` of the replayed reviewer's environment (`bin/review_replay/changes.py`, `change_comparison.py`) and edits the same lines of `worker_environment`, `HELP` and `launch`; this item adds its own `Change` for `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS` on top of it once it merges.
Item 311's chunk built the way to set the variable: `review-replay --read-limit` replays a pass's rounds three times as archived and once at 5,000 tokens (`bin/review_replay/changes.py`), and `bin/claude_code/output_limits.py` holds `READ_LIMIT` and `READ_LIMIT_TOKENS`. What remains is to run that replay for the four passes, and to hand the variable over where it passes.
The replay: `review-replay <pass> claude-opus-5-5 --read-limit` already replays a pass's archived rounds three times as archived and once at 5,000 tokens (`bin/review_replay/changes.py`, `bin/claude_code/output_limits.py`). Run it for the prose, stability, product-owner and principles rounds. Keeps quality where each pass finds every finding the two unchanged replays both find, or misses no more than the most an unchanged replay misses, as `--omit-claude-md` counts it. Keep it only where the replays' Read characters also fall; the archived runs hold each result. Then hand the variable over in `worker_environment` for what passes.
Touches:
- `bin/loop_claude/cycle/run.py`: `worker_environment` (small)