Skip to content

verify --run-check: the tool runs the commands of a Gate itself - #68

Merged
wfrank2509 merged 4 commits into
mainfrom
run-checks
Nov 26, 2026
Merged

wfrank2509 merged 4 commits into
mainfrom
run-checks

Conversation

@wfrank2509

Copy link
Copy Markdown
Member

The first piece of an unattended line that the owner approved: a machine runner for command Gates.

Why. In ci_mode: local the coordinator proves its own local run with a typed line (--local-run "<host>: <command> rc=0, log <path>"). A model types it, so the record holds a claim. On the measured board no ticket has the Gate ci; each Gate is a command list that a model reruns by hand.

What.

  • New key checks in AUTHORITY.md (default branch, owner-only): a block list of <name>: <command line>.
  • verify <n> --run-check <name> (repeatable, --work-dir): the tool fetches the commit of the done, makes a new git work tree of exactly that commit, runs each named check there without a shell and with a cut-down environment, and keeps the logs under check-runs in the state dir.
  • All checks exit 0: verify goes on as with --local-run, and the tool writes the line: tool-run <host>: <name> rc=0 <s>s; clean checkout of <sha>; logs <dir>. A typed --local-run text must not start with tool-run (local-gate-invalid).
  • A check fails: refusal check-failed with the log and its last lines; nothing is written. An unknown name: check-unknown.
  • A check whose program is a file of the PR prints a warning unless protected_paths covers the file.
  • Refused for a headless coordinator (headless-scope). Opening that is a separate owner decision.

Limits, stated in the spec. It is no sandbox: the command is code of the PR and runs as the user of the host. It proves the command part of a Gate only.

Also in this PR. One commit makes the TERM test of a detached job independent of the shell: bash as sh exits 0 in about 3 of 100 runs after a group TERM, which failed two local gate runs today. Product code is unchanged there.

Tests: unit tests (the checks parser, the word splitter, the picker, the line, the origin check), and a component test with a real git repo and the real binary (pass with three checks, a failing check, the refusals before any run).

🤖 Generated with Claude Code

crewboard maintainers and others added 3 commits November 26, 2026 18:24
The job was a shell in `wait`. After a TERM to its group, bash as sh
exits 0 in about 3 of 100 runs, because its child dies first. The leader
of the group is now a sleep (exec), which always ends with the signal.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
In ci_mode local the coordinator proved its own local run with a typed
line, so the record held what a model claims. The owner now lists named
command lines under `checks` in AUTHORITY.md. `verify --run-check <name>`
makes a new work tree of exactly the commit of the done, runs each check
there without a shell and with a cut-down environment, keeps the logs,
and writes the local-run line itself (`tool-run <host>: ...`). A typed
line must not start with that word. A check that fails is the refusal
check-failed and nothing is written.

It is no sandbox, and it proves only the command part of a Gate. A check
whose program is a file of the PR gets a warning unless a protected path
covers it. Not for a headless coordinator.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A review found that the run and the verify read the ticket twice: a done
that arrived while the checks ran could get the line of the older commit.
The checks now run inside verify, for the done that the command loaded,
after every refusal that needs no run (the writer, the status, a
protected path) and only for a head that is the commit of the done. The
head is read again after the run.

Also from the review:
- a typed text cannot look like a line of the tool in any spelling, and
  a note of verify cannot carry a local-gate line (an older gap);
- the checks get no input, a TERM, INT or HUP removes the work tree, git
  replace refs are off, the log root is private, and a host without a
  home is refused;
- a program with .. is a parse error, and every word of a command line
  that is an unprotected file of the checkout gets a warning;
- the spec names the limits: the code of the PR can read the files of
  the user, also the signing key, and the coordinator chooses the host.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@wfrank2509

Copy link
Copy Markdown
Member Author

An independent review of the first commit found a race (a done that arrives while the checks run could get the line of the older commit), a way to put a second result line into a signed verify through --body, and that the spec said too little about the limits. The third commit fixes these: the run is now part of verify, after its refusals; the typed-text checks are stricter; the spec names what the code of a PR can reach on the host.

@wfrank2509
wfrank2509 merged commit f9807f2 into main Nov 26, 2026
4 checks passed
@wfrank2509
wfrank2509 deleted the run-checks branch November 26, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant