feat(wait): a run's end, for the background beside a detached run
A run launched detached, as the prepush skill says, tells the session nothing when it ends: a round finished unread for hours. `crafter-review wait --artifact <artifact> --hash <hash>`, the two values of the run line, follows the hash's run lock. A full run holds it until it ends; taking it, the run now clears the last run's identity there, and it names itself with its run number once it has one. When a run the wait has seen hold or take the lock lets it go, the wait reads the identity - under its own instant shared hold, so never a rewrite in flight - prints the summary of the final dump of the run the identity names and exits with the code its verdict maps to, as run's does: 2 when there is no final dump or no run number, 3 with the message of a preflight check that stopped the run after it took the lock, which the run adds to the identity. A wait that sees no run within --appear (120 s by default) exits 3. Every probe of the lock, a test or dry run's too, takes it shared for an instant, and the run lock is tried for 200 ms before another driver counts as its holder. A wait only reads: one that is stopped is started again and the run goes on. freeze prints the wait line before the run line, and the skill and the process start the wait in the background, then launch the run detached. Released as 1.2.0.
This commit is contained in:
parent
ad33242609
commit
4318c7d8f2
15 changed files with 607 additions and 33 deletions
|
|
@ -52,11 +52,12 @@ crafter-review config # edit .review-gates/config.json until it prints no
|
|||
## Run a review
|
||||
|
||||
```bash
|
||||
crafter-review freeze --slug <branch> # Gate 0: the checks, the export, the hash - and the run line
|
||||
crafter-review freeze --slug <branch> # Gate 0: the checks, the export, the hash - and the wait and run lines
|
||||
crafter-review wait … # the wait line freeze printed, in the background, first
|
||||
crafter-review run … # the line freeze printed (run-line.txt), from a detached shell
|
||||
```
|
||||
|
||||
Exit codes: 0 SEND-READY, 1 FIX FIRST, 2 run the same line again (INCOMPLETE, PARTIAL or CONFIRMING), 3 preflight. Every finding, note and coverage entry is in the dump, `gate-state/commits-<hash8>-run-<n>.json`. `crafter-review stop --hash <hash8>` kills a run's passes and writes its dump.
|
||||
Exit codes: 0 SEND-READY, 1 FIX FIRST, 2 run the same line again (INCOMPLETE, PARTIAL or CONFIRMING), 3 preflight. Every finding, note and coverage entry is in the dump, `gate-state/commits-<hash8>-run-<n>.json`. `crafter-review stop --hash <hash8>` stops a run.
|
||||
|
||||
A directory can review other repositories: `freeze --repo <path> --out <dir> --worktree`, then the printed run line. The config, the seats and the records are the reviewing directory's.
|
||||
|
||||
|
|
@ -98,9 +99,10 @@ Gates run in order, and each must pass before the next starts. The owner is the
|
|||
| Command | |
|
||||
|---|---|
|
||||
| `init`, `config`, `doc` | set a repository up; the merged config and its problems; the shipped texts |
|
||||
| `freeze` | Gate 0: the checks, the export, the hash, the run line; `--verify` at push time |
|
||||
| `freeze` | Gate 0: the checks, the export, the hash, the wait and run lines; `--verify` at push time |
|
||||
| `run` | the gates of a mode (`--mode`); `--dry-run` launches nothing |
|
||||
| `stop` | stop a run: its passes are killed, the dump written |
|
||||
| `wait` | waits in the background beside a detached run (AGENTS.md: Wait) |
|
||||
| `seats`, `slots` | every seat probed; how many stacks fit in free memory |
|
||||
| `browser install` | the Chromium the Playwright MCP server drives |
|
||||
| `sql`, `totp`, `inventory` | the helpers a lens runs; the partition of an artifact into units |
|
||||
|
|
|
|||
Loading…
Reference in a new issue