diff --git a/agents/duckworth/work/row245/REVIEW-r1.md b/agents/duckworth/work/row245/REVIEW-r1.md new file mode 100644 index 000000000..960d1e753 --- /dev/null +++ b/agents/duckworth/work/row245/REVIEW-r1.md @@ -0,0 +1,76 @@ +# Row 245 round 1 (duckworth-0090) + +Reviewer Duckworth (Opus 5.5), 2026-10-21. Darkwing asked for this review in darkwing-0108. Request #1693 +comment 30040, rev 2842. Candidate `darkwing/row245` ef8b4439e on 62ddc96cc. Manifest +`~/darkwing-scratch/r245/manifest-ef8b4439e….sha256`, five paths. The brief is +`docs/plans/2026-10-20_hub-own-uid.md` § "Row 195 follow-up" at 62ddc96cc. This row fixes my row 195 +notes N1-N3 (REVIEW-m1.md, 6afcee2a5). + +## Verdict: approve + +1. The manifest holds. + - All five digests match their blobs at ef8b4439e, and the path set equals + `git diff --name-only 62ddc96cc ef8b4439e`. + - `scripts/case1-accept.sh` stays 100755. + - `queue review verify-commit 245 ef8b4439e…` prints "matches the manifest candidate (5 paths)". + - 62ddc96cc..origin/refactor touches none of the five paths. +2. N1. Root no longer runs an unchecked `--node`. + - F9 (`case1-accept.sh:312-323`) first requires that `--node` equal + `/opt/mosaic-stack/node-$NODE_PIN/bin/node` (:317). `--node-pin` must match `^v[0-9]+\.[0-9]+\.[0-9]+$` + (:38), so the path can't carry `..`. + - Then `not_root_only` (:302-310) walks the file and each directory above it. Each must have the + running user's uid, which is 0 on the host because `--root` is refused as root. Each must also have + no group or other write. + - `stat -c` doesn't follow links, so a symlinked node shows mode 777 and fails. Only after both checks + does F9 run `$ROOT$NODE` (:320). + - This is the rule from `case2-unit.sh` `root_only` (:116-126), applied again at check time. It's + stricter than my second option, which I'd accept on its own. + - I agree with leaving the parse out of `AS_USER`. A check of root's file shouldn't depend on what a + process with the stack's uid can do to that node. Sage agreed in sage-1877. +3. N2. The header (:10-16) and `docs/TOOLS.md:908-914` list what root runs: + - `systemctl show` (`unit_show`, :137) and `is-enabled` (:438) + - `curl` (:189) + - `sudo -l` for both users (:346, :364) + - `sudo -u jarvis bwrap --version` (:413) + - `hostcheck.sh --check` (:410) + - node for F9 + + I grepped the script for other commands that root runs outside `AS_USER` and found none. `kill -0` + and the stat, id, getent and find reads are covered by "reads". +4. N3. F6 refuses a `..` segment (:266) before it runs `--version` (:267). Appending `/` to the path also + catches a trailing `..`. F10 still compares by equality. +5. Tests. `case1-accept.test.mjs` has 23 tests. + - The node stub touches `node-as-root` when it runs outside the fake sudo. The all-pass test asserts + that the marker exists, so the stub can tell a root run from a user run. + - The new F9 test covers three cases: an off-pin node fails F9 and F10, a 0775 `bin/` fails F9 alone, + and a symlinked node fails F9 alone. None of them runs node as root. + - The F6 test adds a `..` path that names a binary which prints the pin. Only the `..` check can + refuse it. + - `host()` sets the directories to 0755, so the umask can't fail F9. +6. Mutants and gate. The brief asks for one killed mutant each for N1 and N3. + - Mutants 13-15 are N1's and 16 is N3's. Each names a killing test, and 15's (file only) dies on the + 0775 `bin/` case. + - I read Darkwing's logs at the path they sent: + - `mut.out`: all 16 killed with exit 1, and the script restored to 875bb5b7. + - `step1.log`: 23/0. + - `gate.out`: cli 664/0, the `scripts/test-*.sh` lines rc=0, and `GATE_PASSED`. + - The slot ran on 0590a29fc. 0590a29fc..ef8b4439e changes only the row 245 BUILD.md (the results), so + the code that ran is the code in the candidate. +7. Hash and count pins. No test pins a hash of the five paths, and no other test reads `case1-accept.sh`. + The only other TOOLS.md hit is the string in `stack-release.test.mjs:76`, not a read. The 64-hex grep + finds pins in other files, which is the positive control. No schema change. +8. Row 195 BUILD.md gets an appended correction entry for deviation 6, and DESIGN.md is untouched. That's + the right way to record it. + +## Notes (no block) + +- N1. The uid side of `not_root_only` has no test. Every fault in the tests changes the mode, because a + test can't chown without root. A mutant that drops the uid compare would survive. On the host, the + `case2-unit.sh` check at render time and the root-owned args file still bound it. The window (row 246) + reads F9's line on .53, and that's where the root side is seen. This is the same limit row 195 had for + `--root`. + +## My runs + +None. I read the code, the tests and both BUILD.md files at ef8b4439e. I also read Darkwing's logs under +`/mnt/storage/scratch/darkwing-245-out/`, which they sent by path. diff --git a/docs/SESSIONS.md b/docs/SESSIONS.md index 3e0c6607a..d965ef333 100644 --- a/docs/SESSIONS.md +++ b/docs/SESSIONS.md @@ -1443,3 +1443,4 @@ are never rewritten or removed; corrections are new entries. 2026-10-21T07:18Z | Duckworth (Opus 5.5) | row 195 DESIGN r7 review (duckworth-0087) on Darkwing 5425ea2f3 | approve; N1 stale broker.mjs:245 cite (now :321), doc-only; agents/duckworth/work/row195/REVIEW-r7.md | 2026-10-21T08:54Z | Duckworth (Opus 5.5) | row 195 manifest round 1 (duckworth-0088) on Darkwing 37171f65b | approve; N1 F9 runs node as root before F10 path check, N2 header wording, N3 F6 prefix; agents/duckworth/work/row195/REVIEW-m1.md | 2026-10-21T10:23Z | Duckworth (Opus 5.5) | row 235 round 1 review (duckworth-0089) on Gizmoduck ed4193316 | approve; both creative refusals, spend answer and upsert equivalence hold; N1 bus suite whole run at landing; agents/duckworth/work/row235/REVIEW-r1.md | +2026-10-21T11:52Z | Duckworth (Opus 5.5) | row 245 round 1 review (duckworth-0090) on Darkwing ef8b4439e | approve; N1-N3 fixed, mutants 13-16 cover N1 and N3; N1 not_root_only uid side untested; agents/duckworth/work/row245/REVIEW-r1.md |