Answer prose round 1: 0 🔴, 11 🟡; reword the preflight's help and its next-release bullet, give loop-claude's help a preflight paragraph and a plainer routing sentence, put the changelog entry's action first, correct two false claims in CLAUDE.md and a docstring, ease five comments and the unknown line, and file item 176 to split loop-claude's help
This commit is contained in:
+16
-16
@@ -1,30 +1,30 @@
|
||||
"""Find the mechanical facts a chunk starts from, and make its worktree, so its worker reads them rather than finding them.
|
||||
"""Find the mechanical facts a chunk starts from, and make its worktree, so its worker starts from them.
|
||||
|
||||
usage: chunk-preflight
|
||||
|
||||
Run it inside a project checkout. loop-claude runs it at the checkout root before each chunk's
|
||||
first worker, before it routes the chunk, and quotes what it prints in the worker's prompt. It
|
||||
fetches origin, when the checkout has that remote, and takes origin's default branch, or else the
|
||||
local main or master, as larv-review does. It leaves the checkout as it is: it reads todo.md as
|
||||
that branch holds it, the plan loop-claude routes on, and prints:
|
||||
local main or master. It leaves the checkout as it is, and reads todo.md as the default branch
|
||||
holds it, the plan loop-claude routes on. It prints:
|
||||
|
||||
- the newest v* tag on the default branch, and how many entries the default branch's CHANGELOG.md
|
||||
holds under ## Unreleased, or else how many commits followed the tag;
|
||||
- the earliest release in todo.md, and that release's first item that does not wait, the item
|
||||
loop-claude routes on, with its L and E + I. It names that item only where the tag names no
|
||||
version x.y.z, or the release is the earliest after x.y.z that todo.md has named at the tag or
|
||||
since: the next release. Where the next release holds no item, it says so: finished and ready to
|
||||
cut where work landed since the tag, counted as the ## Unreleased entries or else the commits, and
|
||||
else to be planned first. For x.y.z or an earlier release, it says todo.md files items under a
|
||||
release already cut;
|
||||
- the next release and its first item that does not wait, the item loop-claude routes on, with
|
||||
its L and E + I. An item waits while it is marked question, or while an item still in todo.md
|
||||
blocks it. Where the newest tag names a version x.y.z, the next release is the earliest after
|
||||
x.y.z that todo.md has named at that tag or since; otherwise it is todo.md's earliest release.
|
||||
Where the next release holds no item, it says so: finished and ready to cut where work landed
|
||||
since the tag (the ## Unreleased entries, or else the commits), and else to be planned first.
|
||||
Where todo.md's earliest release is x.y.z or earlier, it says todo.md files items under a release
|
||||
already cut;
|
||||
- the item's worktree: a sibling of the checkout named <checkout>-item-<ID>, on the branch
|
||||
item-<ID>. It continues a worktree already on that branch; else it adds one on the local branch,
|
||||
else on a new branch tracking origin's, else on a new branch off the default branch;
|
||||
- the open pull requests whose head is the item's branch, each by its number and URL, as gh lists
|
||||
them on a github.com origin, and else as tea does. No title reaches the output: on a public forge,
|
||||
anyone may open a pull request, and its title would reach the worker's prompt;
|
||||
- the items of that release that a chunk taking the item may take too: none is a question, and no
|
||||
item outside them and the item blocks one;
|
||||
them on a github.com origin, and else as tea does. No title reaches the output;
|
||||
- the items of that release that a chunk taking the item may take too: those that are not
|
||||
questions and that no item outside the chunk blocks;
|
||||
- each file or folder git tracks that the item's tagline or detail names in backticks, with a
|
||||
file's lines or a folder's files, and the item's tagline and detail;
|
||||
- what `rank_todo.py --check todo.md`, `larv-review needs-scoring-run <ID>`, `reading-cost` and
|
||||
@@ -53,7 +53,7 @@ from chunk_preflight.facts import render
|
||||
BIN = pathlib.Path(__file__).resolve().parents[1]
|
||||
# Each tool run in the item's worktree, {item} standing for the item's ID.
|
||||
TOOLS = (("rank_todo.py", "--check", "todo.md"), ("larv-review", "needs-scoring-run", "{item}"), ("reading-cost",), ("larv-review", "places"))
|
||||
# Seconds before a fetch, forge CLI or tool is stopped, so a hung one leaves the facts the others find; TIMEOUT_SETTING sets others.
|
||||
# Seconds before a fetch, forge CLI or tool is stopped, so a hung one cannot keep the rest from printing; TIMEOUT_SETTING overrides it.
|
||||
TIMEOUT = 60
|
||||
TIMEOUT_SETTING = "CHUNK_PREFLIGHT_TIMEOUT"
|
||||
|
||||
@@ -83,7 +83,7 @@ def run(setting: str | None) -> list[str] | Failure:
|
||||
|
||||
|
||||
def seconds(setting: str | None) -> float | Failure:
|
||||
"""The seconds a TIMEOUT_SETTING of setting gives, TIMEOUT where it is unset; a Failure where it is no number above 0."""
|
||||
"""The timeout setting as seconds, TIMEOUT where unset; a Failure where it is no number above 0."""
|
||||
if setting is None:
|
||||
return TIMEOUT
|
||||
if re.fullmatch(r"[0-9]+(\.[0-9]+)?", setting) and float(setting) > 0:
|
||||
|
||||
Reference in New Issue
Block a user