Fix the rename's gate failures
This commit is contained in:
+2
-1
@@ -2,7 +2,8 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- A claude that loop-claude, do-epic or `task-bench gather` starts has the release's tools first on its `PATH`, and the rules, the skills and each tool's help and errors name a tool bare, as in `todo-item`. In your own shell, and in a claude you start from it yourself, call a tool other than `loop-claude` by its path, `~/.claude/bin/<tool>`.
|
||||
- Renamed `loop-claude` to `build-release`, with no alias: call `build-release`, and set `BUILD_RELEASE_WORKER_MODEL`, `BUILD_RELEASE_JUDGE_MODEL`, `BUILD_RELEASE_TRANSCRIPTS` and the other `BUILD_RELEASE_*` variables where you set `LOOP_CLAUDE_*` ones. The folders it keeps, `~/.claude/loop-claude-transcripts` and `~/.claude/loop-claude-models.json`, keep their names for now.
|
||||
- A claude that build-release, do-epic or `task-bench gather` starts has the release's tools first on its `PATH`, and the rules, the skills and each tool's help and errors name a tool bare, as in `todo-item`. In your own shell, and in a claude you start from it yourself, call a tool other than `build-release` by its path, `~/.claude/bin/<tool>`.
|
||||
- do-epic runs `chunk-pr clean` itself for a chunk whose pull request merged, finishes the chunk and closes its window, without a running slot or a worker, where it used to wait for a free slot and a worker for that.
|
||||
- Make `task-bench` commit the copy it runs each side's tests in, so a project's tests that call git, such as `git ls-files`, pass the baseline instead of failing with "not a git repository".
|
||||
- The review sweep before each round now also runs each builtin, flag or option a change adds with a value just outside each input range its docs state, and the product-owner reviewer flags a doc line that leaves out what that run printed.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""What build-release alone says to its worker: the first prompt of a chunk, with what chunk-preflight found. The resumed prompt and the rung sentences are chunk_driver.prompts', which do-epic's cycles use too."""
|
||||
import functools
|
||||
|
||||
from build_release.chunk.chunk_items import CHUNK_ITEMS
|
||||
from chunk_driver.drivers import BUILD_RELEASE
|
||||
from build_release.chunk.chunk_items import CHUNK_ITEMS
|
||||
from model_routing.ladder import ProjectRung
|
||||
from chunk_driver.prompts import READING_RULE, rung_sentences, worker_prompts
|
||||
from model_routing.route import Route
|
||||
|
||||
@@ -55,11 +55,6 @@ class ExitContract(unittest.TestCase):
|
||||
("agent_cycle/run.py", "close", "1", "annotation.reason", read),
|
||||
("agent_cycle/run.py", "close", "1", "failure.reason", read),
|
||||
("agent_cycle/run.py", "close", "1", "failure.reason", "a finished chunk's session cannot be deleted"),
|
||||
("chunk_driver/chunk_run.py", "closed_cycle", "1", "failure.reason", read),
|
||||
("chunk_driver/cycle_start.py", "project_routing", "1", "ladder_file.reason", premises_),
|
||||
("chunk_driver/cycle_start.py", "routing_on", "1", "ladder.reason", "the project's routing ladder cannot be read or holds a fault"),
|
||||
("chunk_driver/project/model_choice.py", "get_or_ask_model", "1", "models.reason", models_),
|
||||
("chunk_driver/project/model_choice.py", "get_or_ask_model", "1", "failure.reason", models_),
|
||||
("build_release/loop/checkout.py", "checkout_root", "1", "found.reason", git),
|
||||
("build_release/loop/main.py", "run_loop", "1", "reason", "tmux is missing or older than 3.2"),
|
||||
("build_release/loop/main.py", "run_loop", "1", "f'{CHUNK_FLAG} is how build-release starts itself", "--chunk is given outside a tmux window"),
|
||||
@@ -72,10 +67,15 @@ class ExitContract(unittest.TestCase):
|
||||
("build_release/loop/main.py", "loop_run_from", "1", 'f"the edited build-release cannot read the state', "a reload cannot read the state the running script handed it"),
|
||||
("build_release/loop/reload.py", "exec_if_edited", "1", "f'could not reload build-release:", "python cannot start for a reload"),
|
||||
("build_release/loop/routing_check.py", "raise_calls", "1", "f\"could not start claude for the routing calls in {loop.paths.config_clone}", "claude cannot start for an interrupt"),
|
||||
("chunk_driver/chunk_run.py", "closed_cycle", "1", "failure.reason", read),
|
||||
("chunk_driver/cycle_start.py", "project_routing", "1", "ladder_file.reason", premises_),
|
||||
("chunk_driver/cycle_start.py", "routing_on", "1", "ladder.reason", "the project's routing ladder cannot be read or holds a fault"),
|
||||
("chunk_driver/project/model_choice.py", "get_or_ask_model", "1", "models.reason", models_),
|
||||
("chunk_driver/project/model_choice.py", "get_or_ask_model", "1", "failure.reason", models_),
|
||||
]
|
||||
root = pathlib.Path(main.__file__).parents[2]
|
||||
found = []
|
||||
for path in sorted(path for package in ("agent_cycle", "chunk_driver", "build_release") for path in (root / package).rglob("*.py") if not path.name.startswith("test_")):
|
||||
for path in sorted(path for package in ("agent_cycle", "build_release", "chunk_driver") for path in (root / package).rglob("*.py") if not path.name.startswith("test_")):
|
||||
functions = [node for node in ast.walk(ast.parse(path.read_text())) if isinstance(node, ast.FunctionDef)]
|
||||
stops = [(call.lineno, function.name, ast.unparse(call.args[0]), ast.unparse(call.args[1])) for function in functions for call in ast.walk(function) if isinstance(call, ast.Call) and getattr(call.func, "id", None) == "Stop" and not (isinstance(call.args[0], ast.Constant) and call.args[0].value in (0, 2, 130))]
|
||||
found += [(str(path.relative_to(root)), function, code, reason) for _, function, code, reason in sorted(stops)]
|
||||
|
||||
@@ -8,27 +8,26 @@ as goals-and-audience: a file, or a Jira epic's description. `project-config goa
|
||||
prints where it is. The task runs at the checkout root. Each cycle a worker runs the task. A chunk's
|
||||
first worker prompt also quotes the premises. They, with code health (the setup's CLAUDE.md →
|
||||
"Shared goal") ranked first unless the goals file voids it, choose between ways to deliver the
|
||||
chunk's plan items, or else the task, and never widen them. A judge then reads the transcript's
|
||||
end, the premises, and the records: the project's AGENTS.md and docs/decisions.md, and the setup's
|
||||
CLAUDE.md and rules/*.md, then the .md files in the folder of review standards
|
||||
the project's config sets, where they exist. It rules whether the chunk, the work of one PR, is
|
||||
finished. A chunk stays unfinished until each answer the human typed in it that a later chunk could
|
||||
need is recorded: the premises or the records hold it, or the transcript shows the worker writing it
|
||||
into the premises, AGENTS.md, docs/decisions.md, the plan or a comment. A choice the worker made
|
||||
that the premises or the records settle is not asked about. When the worker asks a question they
|
||||
answer, the judge quotes the answer, build-release prints it, and the worker resumes with it. A quote
|
||||
they do not hold word for word is dropped, and the question goes to the human. So does a question
|
||||
asked again after its answer. A question the human answered earlier in the chunk goes back to the
|
||||
worker with that answer, unless the question quotes the words of the answer that leave it open. The
|
||||
fourth question they answer in one cycle goes to the human too, with the quote. An unfinished chunk
|
||||
resumes its session next cycle, and the worker is shown the passage the judge quoted as the work
|
||||
remaining. The next chunk starts a fresh session. Cycles continue until an exit below or Ctrl-C,
|
||||
either of which stops that one chunk.
|
||||
Words: the setup's CLAUDE.md → "Vocabulary".
|
||||
chunk's plan items, or else the task, and never widen them. A judge then reads the transcript's end,
|
||||
the premises, and the records: the project's AGENTS.md and docs/decisions.md, and the setup's
|
||||
CLAUDE.md and rules/*.md, then the .md files in the folder of review standards the project's config
|
||||
sets, where they exist. It rules whether the chunk, the work of one PR, is finished. A chunk stays
|
||||
unfinished until each answer the human typed in it that a later chunk could need is recorded: the
|
||||
premises or the records hold it, or the transcript shows the worker writing it into the premises,
|
||||
AGENTS.md, docs/decisions.md, the plan or a comment. A choice the worker made that the premises or
|
||||
the records settle is not asked about. When the worker asks a question they answer, the judge quotes
|
||||
the answer, build-release prints it, and the worker resumes with it. A quote they do not hold word
|
||||
for word is dropped, and the question goes to the human. So does a question asked again after its
|
||||
answer. A question the human answered earlier in the chunk goes back to the worker with that answer,
|
||||
unless the question quotes the words of the answer that leave it open. The fourth question they
|
||||
answer in one cycle goes to the human too, with the quote. An unfinished chunk resumes its session
|
||||
next cycle, and the worker is shown the passage the judge quoted as the work remaining. The next
|
||||
chunk starts a fresh session. Cycles continue until an exit below or Ctrl-C, either of which stops
|
||||
that one chunk. Words: the setup's CLAUDE.md → "Vocabulary".
|
||||
|
||||
build-release needs tmux 3.2 or later, and checks it before it starts anything. Each chunk runs in its
|
||||
own window of one tmux session per project, named loop-<key>, such as loop-claude-config. <key> is
|
||||
the checkout's path relative to ~/code, or to / outside it, with a dash for each character other
|
||||
build-release needs tmux 3.2 or later, and checks it before it starts anything. Each chunk runs in
|
||||
its own window of one tmux session per project, named loop-<key>, such as loop-claude-config. <key>
|
||||
is the checkout's path relative to ~/code, or to / outside it, with a dash for each character other
|
||||
than a letter, a digit, _ or -. The tmux session's @loop-root option names its checkout, and a
|
||||
checkout whose key maps to a tmux session another checkout runs is refused. build-release <task>
|
||||
starts the chunks that may start now, then attaches to the tmux session, or switches to it inside
|
||||
@@ -43,11 +42,12 @@ release review, runs alone in the window no-item.
|
||||
Each window runs a build-release for that one chunk, started with --chunk <window>, which nobody
|
||||
types. As a chunk finishes, its loop starts each chunk that may start then, with the task it ran
|
||||
itself, and exits, which closes its window. A loop that stops, by Ctrl-C, an exit below or a
|
||||
failure, keeps its window, with its last lines, and its chunk keeps its items; the next build-release
|
||||
<task> starts it again before any other. To stop every chunk, press Ctrl-C in each window. A chunk's
|
||||
claude session is named "A <key> build-release <window>", so a rerun resumes a chunk left open, and is
|
||||
deleted when the chunk finishes. A fresh worker is told the items the project's other chunks hold,
|
||||
running or stopped: each one's own and those on its latest `Chunk items:` line, and leaves them out.
|
||||
failure, keeps its window, with its last lines, and its chunk keeps its items; the next
|
||||
build-release <task> starts it again before any other. To stop every chunk, press Ctrl-C in each
|
||||
window. A chunk's claude session is named "A <key> build-release <window>", so a rerun resumes a
|
||||
chunk left open, and is deleted when the chunk finishes. A fresh worker is told the items the
|
||||
project's other chunks hold, running or stopped: each one's own and those on its latest `Chunk
|
||||
items:` line, and leaves them out.
|
||||
|
||||
A question only the human can answer is an interrupt (bin/agent_cycle/interrupt.py).
|
||||
build-release prints the question in the chunk's window and rings its bell. Until it is answered the
|
||||
@@ -66,8 +66,8 @@ stops are left out: Ctrl-C, printing this help, the build-release that started t
|
||||
attaches or prints how to, and a loop whose chunk finished once it started the next chunks. A DM
|
||||
that fails is said on stderr, and the loop goes on. Where no answer has come 10 minutes before the
|
||||
worker's hour-long prompt cache expires, and the worker's context holds at least 60k tokens,
|
||||
build-release compacts the worker's session with `claude -p /compact` and keeps waiting, so the resume
|
||||
doesn't write the whole context again.
|
||||
build-release compacts the worker's session with `claude -p /compact` and keeps waiting, so the
|
||||
resume doesn't write the whole context again.
|
||||
|
||||
As a chunk starts, before it is routed, build-release runs bin/chunk-preflight --worktree, adding
|
||||
--item <ID> in a window named for an item, and quotes what it prints in the first prompt
|
||||
@@ -160,9 +160,9 @@ measurement.
|
||||
A change to bin/build-release or any bin/**/*.py takes effect at the next cycle boundary, once
|
||||
build-release --help succeeds: the loop reloads into the edited script.
|
||||
|
||||
Under merge = "human", where no chunk runs and every item left awaits a person's merge, build-release
|
||||
doesn't start a chunk: it names those pull requests, in a DM too, and exits 0. Its window closes,
|
||||
so the next build-release <task> reads the plan again.
|
||||
Under merge = "human", where no chunk runs and every item left awaits a person's merge,
|
||||
build-release doesn't start a chunk: it names those pull requests, in a DM too, and exits 0. Its
|
||||
window closes, so the next build-release <task> reads the plan again.
|
||||
|
||||
Exit 1, saying why, when:
|
||||
- no task is given
|
||||
|
||||
@@ -5,9 +5,9 @@ import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
import build_release.routed_item
|
||||
from failure import Failure
|
||||
from release_plan.release_standing import LastCut
|
||||
import build_release.routed_item
|
||||
from build_release.doubles import NO_CUT, TODO
|
||||
from plan_store.todo_md import plan_of
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from loop_state.paths import STATE_FOLDER
|
||||
from agent_cycle import tmux
|
||||
|
||||
# Under the home folder, a folder per project key holds LOCK.
|
||||
CLAIMS = f"{STATE_FOLDER}/build-release"
|
||||
CLAIMS = f"{STATE_FOLDER}/loop-claude"
|
||||
# The file an entry point keeps locked with flock while it lists the windows of a project's chunks and starts new ones. Two loops whose chunks finish together then don't start a chunk twice, and do-epic, which holds the same lock, never starts a chunk in a checkout while build-release does.
|
||||
LOCK = "starting"
|
||||
# The flag that tells the entry point in a window its chunk, as `--chunk item-372` for build-release and `--chunk ABC-34 ABC-12` for do-epic. Nobody types it, so no panel picked it.
|
||||
|
||||
@@ -10,9 +10,9 @@ import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[2]))
|
||||
|
||||
from chunk_driver.drivers import BUILD_RELEASE
|
||||
from failure import Failure
|
||||
from loop_effects.doubles import FakeEffects
|
||||
from chunk_driver.drivers import BUILD_RELEASE
|
||||
from chunk_driver.project import model_choice
|
||||
from loop_state.paths import paths_from
|
||||
from text_files.file_writes import replace_file
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from chunk_driver.prompts import ANSWER_DESTINATIONS
|
||||
from chunk_driver.drivers import BUILD_RELEASE
|
||||
from claude_code.entries import Entry
|
||||
from agent_cycle import escalation_mark
|
||||
from failure import Failure
|
||||
from agent_cycle.judge import Grounds, judge_rules, TASK_HEADING, transcript_heading
|
||||
from claude_code.transcript import human_answers
|
||||
from chunk_driver.drivers import BUILD_RELEASE
|
||||
from agent_cycle.worker_prompts import typed_answer
|
||||
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ from rung_replay.archive import archiving, replay_folder
|
||||
from rung_replay.command import arguments_or_exit, down_from, failed, limited_exit, print_report, projects_on, say
|
||||
from rung_replay.search import AT_ONCE, first_reply, replayed
|
||||
from agent_cycle.judge import Brief, judge_archived, judge_once
|
||||
from chunk_driver.drivers import BUILD_RELEASE
|
||||
from judge_replay.replay import Case, case_from, Kind, report, reproduced, sample, verdict_kind
|
||||
from transcript_archive.project_key import checkout_of
|
||||
from loop_state.paths import CLAUDE_HOME
|
||||
@@ -70,7 +71,6 @@ from judge_replay.archived_prompt import grounds_of
|
||||
from transcript_archive.judge_run import JudgeRun
|
||||
from model_routing.ladder import Ladder, ProjectRung, REVIEW_STEPS, Rung
|
||||
from claude_code.reply import Limited
|
||||
from chunk_driver.drivers import BUILD_RELEASE
|
||||
from model_routing.ladder_file import read_ladder, SHIPPED
|
||||
from chunk_driver.project.premises import read_premises
|
||||
from chunk_driver.project.records import read_records, RECORDS_NAMED
|
||||
|
||||
@@ -12,6 +12,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
from chunk_driver.prompts import ANSWER_DESTINATIONS
|
||||
from transcript_archive.outcomes import ANSWERED, FINISHED, INTERRUPTED, UNFINISHED
|
||||
from claude_code.entries import AssistantTurn, HumanTurn, LoopPrompt, Text
|
||||
from chunk_driver.drivers import BUILD_RELEASE
|
||||
from judge_replay.replay import Case, case_from, report, reproduced, sample, verdict_kind
|
||||
from text_files.doubles import compress
|
||||
from project_config.doubles import configured
|
||||
@@ -20,7 +21,6 @@ from failure import Failure
|
||||
from agent_cycle.verdicts import Finished, Interrupt, QuotedAnswer, Unfinished
|
||||
from judge_replay.archived_prompt import grounds_of
|
||||
from agent_cycle.judge import judge_archived, judge_rules, Rejected, TASK_HEADING, transcript_heading
|
||||
from chunk_driver.drivers import BUILD_RELEASE
|
||||
from judge_replay import main
|
||||
from rung_replay.search import Miss, Replay, Tried
|
||||
from model_routing.ladder import Rung
|
||||
|
||||
@@ -742,7 +742,7 @@ Seats launch as `general-purpose`, so they hide inside that type: $301.24 of the
|
||||
|
||||
### 323. Count a release review as landed once its pull request has merged, whatever its commits are titled.
|
||||
|
||||
`reviewed_releases` in `bin/release_plan/release_standing.py` counts a release review only by a commit titled `Release review of <release>` on the default branch. In a replay of archived interrupts (`judge-field-trials/`), in two projects whose release review had merged, the default branch held no such commit, so `chunk-preflight` and routing read ReviewDue, and the next loop would run the release review again. `skills/larv-review/SKILL.md` opens the review's branch with an empty commit of that title, but a worker may skip it, and a rebase or squash merge, which `chunk-pr` uses where the forge allows no merge commit, may drop it. Detect the review by something every merge method keeps, and check the fix against both projects' histories. Until then the judge keeps `release_ready` (docs/decisions.md → `routing: loop-claude reads the items a chunk takes …`).
|
||||
`reviewed_releases` in `bin/release_plan/release_standing.py` counts a release review only by a commit titled `Release review of <release>` on the default branch. In a replay of archived interrupts (`judge-field-trials/`), in two projects whose release review had merged, the default branch held no such commit, so `chunk-preflight` and routing read ReviewDue, and the next loop would run the release review again. `skills/larv-review/SKILL.md` opens the review's branch with an empty commit of that title, but a worker may skip it, and a rebase or squash merge, which `chunk-pr` uses where the forge allows no merge commit, may drop it. Detect the review by something every merge method keeps, and check the fix against both projects' histories. Until then the judge keeps `release_ready` (docs/decisions.md → `routing: build-release reads the items a chunk takes …`).
|
||||
|
||||
### 342. Research the tooling agents read, search and run commands with once more, and file an item for each tool that cuts tokens a replay shows keep quality.
|
||||
|
||||
@@ -872,7 +872,7 @@ The comprehension seats found `next_release` hard to read: the tag cases, dated
|
||||
|
||||
### 260. Compare the first 20 chunks whose worker got the reading rule with the 20 before them, on review rounds past each pass's first, unfinished verdicts, 🔴, 🟡 and misread findings, dollars and hours per chunk, and drop the rule where any rose.
|
||||
|
||||
Start once 20 chunks have run under the rule. The rule is `READING_RULE` in `bin/chunk_driver/prompts.py`, which every fresh worker prompt holds; `git log --first-parent -S READING_RULE` on the default branch finds the merge that added it. A chunk got it when its first worker started after that merge. Measure as `docs/decisions.md` → `loop-claude: the worker's claude compacts its context before it fills a 200k window…` measured the window: rounds past each pass's first and the 🔴, 🟡 and misread counts from the round commit titles, unfinished verdicts from the outcomes files, hours from the worker's first message to its last, and dollars from the chunk's `cost-state` entry. Compare means, since the decision weighs the rule by all spend.
|
||||
Start once 20 chunks have run under the rule. The rule is `READING_RULE` in `bin/chunk_driver/prompts.py`, which every fresh worker prompt holds; `git log --first-parent -S READING_RULE` on the default branch finds the merge that added it. A chunk got it when its first worker started after that merge. Measure as `docs/decisions.md` → `build-release: the worker's claude compacts its context before it fills a 200k window…` measured the window: rounds past each pass's first and the 🔴, 🟡 and misread counts from the round commit titles, unfinished verdicts from the outcomes files, hours from the worker's first message to its last, and dollars from the chunk's `cost-state` entry. Compare means, since the decision weighs the rule by all spend.
|
||||
|
||||
### 309. 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.
|
||||
|
||||
@@ -947,7 +947,7 @@ Today the folder is the SHA-256 of the transcript's first timestamped line, whic
|
||||
|
||||
### 324. Count in the routing figures the finished chunks whose worker wrote no `Chunk items:` line.
|
||||
|
||||
`docs/decisions.md` → `routing: loop-claude reads the items a chunk takes …` holds only while workers write the line when asked, and nothing counts a chunk whose worker skipped it. There loop-claude scores no item beyond the one the chunk was routed on, so the route holds. Count in `bin/routing_figures/`, beside the chunks counted, those whose worker's transcript holds no such line, so the human sees when the decision's premise stops holding.
|
||||
`docs/decisions.md` → `routing: build-release reads the items a chunk takes …` holds only while workers write the line when asked, and nothing counts a chunk whose worker skipped it. There loop-claude scores no item beyond the one the chunk was routed on, so the route holds. Count in `bin/routing_figures/`, beside the chunks counted, those whose worker's transcript holds no such line, so the human sees when the decision's premise stops holding.
|
||||
|
||||
### 187. Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user