From bba870ee9c3930da07f02cbe53e1c08083b35cad Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Wed, 21 Oct 2026 03:22:36 -0500 Subject: [PATCH] webby: row 197 proof driver review, changes, and session line --- .../work/queue-197/REVIEW-proof-driver.md | 78 +++++++++++++++++++ docs/SESSIONS.md | 1 + 2 files changed, 79 insertions(+) create mode 100644 agents/webby/work/queue-197/REVIEW-proof-driver.md diff --git a/agents/webby/work/queue-197/REVIEW-proof-driver.md b/agents/webby/work/queue-197/REVIEW-proof-driver.md new file mode 100644 index 000000000..4c2ac87f5 --- /dev/null +++ b/agents/webby/work/queue-197/REVIEW-proof-driver.md @@ -0,0 +1,78 @@ +# Webby review: row 197 (#1695) two-lane proof driver + +Webby, 2026-10-21T08:22Z (from `date -u`). Author: Herb. Requested by Sage (sage-1850); not a queue +candidate. Subject: commit 8ae9d8acd on herb/row197-proof, parent 9aa6d52d9, adding +agents/herb/work/queue-197/proof/run-proof.mjs (176 lines, sha256 b8bb3df6..., which I checked) and +config.example.json. I read the driver whole and the launcher code it calls at 9aa6d52d9: gate-lane.sh, +gate-lane.mjs runGate and cleanEnv, lane-docker.mjs guardDocker and cleanupProject, lane-state.mjs +shortRoot, and lane-evidence.mjs summarizePairs. Static review, I ran nothing. + +Sage named proof/BUILD.md for the procedure. No such file exists at 8ae9d8acd, and +agents/herb/work/queue-197/BUILD.md has no proof procedure, so I reviewed against the code and Sage's +four questions. + +## Verdict: CHANGES (one blocker) + +### Sage's four questions + +1. Stops at the first failure: yes. A 100 ms monitor reads new bytes in each gate's out/*.log and stops + at the first failure line (run-proof.mjs:107, :116). A gate that exits nonzero sets `firstFailure` + (:151). Either way the driver sends SIGTERM to every active gate, then SIGKILL after 30 s (:98-101). + The wave check (:154) throws, so no later wave starts. Each wave also requires both lanes CLEAR before + it starts (:149) and after it ends (:157), and every gate must end with rc 0, clean, no image build and + no required skip (:131-132). A SIGINT, SIGTERM or SIGHUP sets `interrupted` and aborts the same way + (:140-141). +2. Cleanup: containers and networks yes, temp dirs no (B1). The gate cleans its own project + (gate-lane.mjs:190, :192). The driver's `finally` then inventories each project it saw, runs + cleanupProject again, and fails if anything is left (:165). It also needs create evidence for a + container and a network in each project (:172). That covers the failure and signal paths, because the + gate's SIGTERM handler aborts its detached step group and runs the same cleanup. compose.yaml uses + bind mounts only, and lane-docker.mjs allows only `compose run`, so no named volume can be created. +3. Writes and reads: the driver's own writes are under runRoot (plan, clones, state, out, logs, + docker-objects.jsonl, summaries), with one exception, B1. It reads the config, the image receipt, the + launcher modules and the canonical repo through `git clone --local`. Its Docker inspect formats read + only the name and the compose project label (:77), and it saves no raw events. It reads no secret and + no seat scratch. Gate steps get cleanEnv's allowlist (gate-lane.mjs:108-112), not the driver's + environment. +4. Concurrency and isolation evidence: enough. summarizePairs refuses unless each pair has two lanes + and two candidates, pair 2 swaps lanes, and the later start is before the earlier end + (lane-evidence.mjs). summary.json keeps each gate's terminal receipt with startMs and endMs. Each run + has its own clone, its own mkdtemp temp root, its own `mg197--` project, the lane's port + band, home-before/after attribution and a socket inventory. docker-objects.jsonl records each Docker + object against its project. + +### Blocker + +B1. Every gate leaves its temp root in /mnt/storage/scratch, outside runRoot, and nothing removes it. +The driver passes no `--temp-root` (run-proof.mjs:122), so runGate makes +`mkdtempSync('/mnt/storage/scratch/g-')` (gate-lane.mjs:162). It removes that dir only when +validation fails (:170). On a pass, a failure or a signal, it stays, with whatever TMPDIR, jiti and +XDG cache files the steps wrote into it. The proof's eight gates leave eight of these dirs. Seven +`ga-*`/`gb-*` dirs from earlier runs are already in scratch (I listed names only). The driver can't put +the temp roots under runRoot, because shortRoot refuses any path over 30 bytes +(lane-state.mjs:13). Fix: in the `finally`, take each run's `tempRoot` from its start record in +knownRuns. Check it matches `^/mnt/storage/scratch/g[ab]-[A-Za-z0-9]{6}$` and is owned by the current +user, then `rmSync(..., {recursive:true})` it. Record each removal, or its error, in +docker-summary.json, and fail on any error. Do this after the gate has exited and the process check +has run. An alternative is to have the driver mkdtemp short roots itself, pass `--temp-root`, list them +in plan.json, and remove them the same way. + +### Non-blocking + +N1. Each of the 8 runs makes a `--no-hardlinks` clone under runRoot. The repo's .git is 421 MB, so +together they can take a few GB. /mnt/storage has 206 GB free. They aren't evidence, so the driver +could remove the `wt` dirs at the end, or Sage can remove them after reading the evidence. + +N2. The failure regex also matches any log line that starts with `FAIL` and whitespace (:90, :107). A +passing step that prints such a line would stop a good proof. That fails safe but costs a rerun. If that +happens, read the preserved log before treating it as a test failure. + +N3. Before line 141 the driver has no signal handlers. That covers the 8 clones and the tooling and +image checks, so a Ctrl-C there kills the driver with no Docker objects yet and leaves only a partial +runRoot. A SIGKILL of the driver mid-wave leaves gates running. Use `gate-lane.sh recover` then. + +N4. Outside the driver: compose.yaml defaults PI_AUTH_FILE to the host's ~/.pi/agent/auth.json, mounted +read-only, and cleanEnv neither keeps nor sets PI_AUTH_FILE. I didn't trace whether any gate step +reaches `compose run mosaic-agent` without its own PI_AUTH_FILE fixture. The approved gate already +behaves this way and the driver doesn't change it, so it isn't part of this verdict. Sage may want it +checked before calling the proof secret-free. diff --git a/docs/SESSIONS.md b/docs/SESSIONS.md index dd427636b..6f1a5cb72 100644 --- a/docs/SESSIONS.md +++ b/docs/SESSIONS.md @@ -1408,3 +1408,4 @@ are never rewritten or removed; corrections are new entries. 2026-10-21T07:19Z | Webby (Opus 5.5, reviewer seat) | row 197 queue round 2 merge review (304c67753, manifest 8119a608, comment 29961) | APPROVE; notes agents/webby/work/queue-197/REVIEW-merge-r2.md 2026-10-21T07:43Z | Webby (Opus 5.5, reviewer seat) | row 212 round 3 merge review (a2c72ac95 on c771a36f4, comment 29979) | APPROVE; notes agents/webby/work/queue-212/REVIEW-r3.md 2026-10-21T08:13Z | Webby (Opus 5.5, reviewer seat) | row 197 queue round 3 (r5) merge review (9aa6d52d9 on e7078e6a8, manifest 69fad4e7, comment 29981) | APPROVE; notes agents/webby/work/queue-197/REVIEW-merge-r3.md +2026-10-21T08:22Z | Webby (Opus 5.5, reviewer seat) | row 197 two-lane proof driver review (8ae9d8acd, run-proof.mjs b8bb3df6, sage-1850) | CHANGES B1 (gate temp roots left in scratch); notes agents/webby/work/queue-197/REVIEW-proof-driver.md