Answer prose round 1: 0 🔴, 7 🟡 (0 misread); define a subcommand word in command-patterns' help and split its table sentence, point the bin/ decision at the CI entry by name, leave ci.sh's pinned details to its header, say what a CI rule check needs, and split the two argument errors
CI / tests (pull_request) Successful in 2m47s

This commit was merged in pull request #450.
This commit is contained in:
2026-11-09 03:09:41 +01:00
parent 6e95eb146d
commit da4d376136
5 changed files with 21 additions and 17 deletions
+1 -1
View File
@@ -7,5 +7,5 @@ jobs:
steps:
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0 # ci.sh bundles HEAD, which a shallow clone can't
fetch-depth: 0 # ci.sh bundles HEAD, which fails in a shallow clone
- run: sh ci.sh
+1 -1
View File
@@ -95,7 +95,7 @@ Install puts only `loop-claude` and `loop-inbox` on `PATH`; call the others by t
- `chunk-pr open|ready|merge` opens a chunk's pull request as a draft, marks it ready and merges it, with `gh` on a GitHub origin and `tea` elsewhere; `chunk-pr --help` states the steps.
- `chunk-preflight` finds the mechanical facts a chunk starts from, and with `--worktree` makes its worktree; `loop-claude` runs it with `--worktree` before it routes each chunk, and `chunk-preflight --help` lists the facts.
- `command-patterns [<version>]` prints a table of the shell command patterns a release's archived chunks ran, such as `tea pr create`: per pattern its chunks, calls, command and result tokens and tool time, for an audit of the release; `command-patterns --help` states the measure.
- `command-patterns [<version>]` prints a table of the shell command patterns a release's archived chunks ran, such as `tea pr create`, for an audit of the release; `command-patterns --help` states its columns.
- `deploy-release [--cut] [<checkout>]` moves `~/.claude`, or the checkout named, to the newest release, as Update says; with `--cut`, run in the development clone, it first cuts the next release, as Release says.
- `judge-replay <model>` replays loop-claude's judge on archived verdicts of the projects run on the model, and prints the lowest rung that, like each rung above it, returns them; `judge-replay --help` states the replay.
- `larv-review <command>` holds larv-review's mechanical rules: the chunk's review folder, the paired ruling's base and vote count, each pass's round count, the scoring run's trigger; the comprehension history's format, its latest places and its count of how often seats agree; and each reviewer's prompt header. `larv-review --help` states them.
+15 -10
View File
@@ -1,19 +1,21 @@
"""Print a table of the shell command patterns a release's chunks ran, so an audit of the release reads one table.
"""Print a table of the shell command patterns a release's chunks ran.
usage: command-patterns [<version>]
Run it inside a project checkout or one of its worktrees. It reads loop-claude's archive of the
project, as reading-cost does, and takes each chunk that finished in the release's window: after
the tag before v<version> and up to v<version>'s own tag, by their tag dates. Without <version>, it
takes the chunks finished since the newest v* tag, the release not yet cut. It reads the worker's
takes the chunks finished since the highest v* tag, the release not yet cut. It reads the worker's
transcript and each subagent's.
Each Bash call counts once, under the pattern of its first simple command other than `cd`: the
tool's name, then up to two words that read as subcommands, as in `tea pr create`. A word that
holds anything but lowercase letters, digits and dashes, such as an option or a path, ends the
pattern. Per pattern the table lists the chunks that ran it, its calls, the tokens of its commands
and of their results, estimated at four characters a token, and the seconds from each call to its
result, most calls first.
tool's name, then up to two words that read as subcommands, as in `tea pr create`. A subcommand
starts with a lowercase letter and holds only lowercase letters, digits and dashes; any other word,
such as an option, a path or a number, ends the pattern.
The table has one row per pattern, most calls first. Its columns are the chunks that ran the
pattern, its calls, and the tokens of its commands and of their results. Tokens are estimated at
four characters each. The last column sums the seconds from each call to its result.
Exit 1, saying why, on unknown arguments, a version no tag names, or when git cannot start or finds
no checkout, or the archive cannot be read.
@@ -36,8 +38,11 @@ def main(argv: list[str]) -> int:
if argv in (["-h"], ["--help"]):
print(__doc__.strip())
return 0
if len(argv) > 1 or argv[:1] and argv[0].startswith("-"):
print(f"command-patterns: unknown arguments {' '.join(argv)}; {USAGE}", file=sys.stderr)
if any(word.startswith("-") for word in argv):
print(f"command-patterns: unknown option in {' '.join(argv)}; {USAGE}", file=sys.stderr)
return 1
if len(argv) > 1:
print(f"command-patterns: takes one version at most, not {' '.join(argv)}; {USAGE}", file=sys.stderr)
return 1
printed = report(argv[0] if argv else None)
if isinstance(printed, Failure):
@@ -81,6 +86,6 @@ def window(version: str | None, cwd: str) -> tuple[int | None, int | None] | Fai
return (tags[0][1] if tags else None, None)
names = [name for name, _ in tags]
if f"v{version}" not in names:
return Failure(f"no tag v{version}; name a cut release, or none for the release not yet cut")
return Failure(f"no tag v{version}; name a cut release, or give no version for the release not yet cut")
at = names.index(f"v{version}")
return (tags[at + 1][1] if at + 1 < len(tags) else None, tags[at][1])
+1 -2
View File
@@ -7,11 +7,10 @@ import re
from claude_code.entries import AssistantTurn, parse_entry, ToolCall, ToolResults
from command_lines.shell_command import segments
# A word that reads as a subcommand, such as `pr` in `tea pr create`; an option, a path or a number ends the pattern.
# A subcommand word, such as `pr` in `tea pr create`. Any other word ends the pattern.
SUBCOMMAND = re.compile(r"[a-z][a-z0-9-]*")
# The words after the tool a pattern keeps at most.
SUBCOMMANDS = 2
# Tokens are estimated from characters, at about four characters a token.
CHARACTERS_PER_TOKEN = 4
+3 -3
View File
@@ -12,7 +12,7 @@ Valid while the archive's file names, the Vocabulary and the panel keep these wo
## bin/: the tools run on the host's Python, with no container, and so do their tests outside CI
2026-09-24, larv-review. Serves goals 1 and 2. The tools drive the host's claude CLI and read the host's session files, which a container cannot see; the tests run on the same host Python the tools meet. CI alone runs them in a container, which drives no claude (the `tests:` entry on CI). Valid while claude runs on the host.
2026-09-24, larv-review. Serves goals 1 and 2. The tools drive the host's claude CLI and read the host's session files, which a container cannot see; the tests run on the same host Python the tools meet. The tests also run in a container through `ci.sh`, on CI and to reproduce a CI failure, since they drive no claude (the entry `tests: CI runs the suite through ci.sh`). Valid while claude runs on the host.
## bin/: the tools support only the latest stable Python, and the tests, written in plain unittest, run on it in four pytest-xdist workers
@@ -428,9 +428,9 @@ Valid while Claude Code loads `~/.claude/rules/*.md` in every project, a path-sc
## tests: CI runs the suite through `ci.sh` on every pull request, in a pinned Python container, and `main`'s branch protection holds a merge until it passes
2026-11-09, larv-review, through todo item 12. Serves goal 1.1: a merge no longer rests on the worker's word. larv-review's gate was the local run alone, which it skips when the last stability round left the suite green, so an unattended chunk could merge on the worker's own report. gitea.larvit.se's runners labelled `docker-host` run `.gitea/workflows/ci.yml`, which runs `ci.sh`: it pipes the committed HEAD as a git bundle into `python:3.14.8` and runs README's Test line there as a non-root user, so the tests root skips run too. A bundle, not a bind mount, works whether or not the runner shares the docker daemon's filesystem. A run takes about 3 minutes. `test_ci.py` holds the image to the Python README Install names.
2026-11-09, larv-review, through todo item 12. Serves goal 1.1: a merge no longer rests on the worker's word. larv-review's gate was the local run alone, which it skips when the last stability round left the suite green, so an unattended chunk could merge on the worker's own report. gitea.larvit.se's runners labelled `docker-host` run `.gitea/workflows/ci.yml`, which runs `ci.sh` on the committed HEAD in a pinned Python container; the script's header says how. A run takes about 3 minutes.
The protection lives in Gitea's settings, outside the repo: rule `main`, required status check `CI / tests (pull_request)`. A pull request has no status until CI queues its run, so `deploy-release --cut` waits for each check the protection requires rather than reading no status as no checks, for 30 minutes at most. CI runs no rule-hook check, so a `rule-override` in the PR body has nothing to override; a rule check added to CI would need one. Valid while gitea.larvit.se runs a runner labelled `docker-host`.
The protection lives in Gitea's settings, outside the repo: rule `main`, required status check `CI / tests (pull_request)`. A pull request has no status until CI queues its run, so `deploy-release --cut` waits for each check the protection requires rather than reading no status as no checks, for 30 minutes at most. CI runs no rule-hook check, so a `rule-override` in the PR body has nothing to override. Whoever adds a rule check to CI must also let it read the PR body's `rule-override`. Valid while gitea.larvit.se runs a runner labelled `docker-host`.
## tests: each test earns its keep as the technical principles' test bullet says, and the worker takes a test's expected values from its item, never from the code