Files

1 line
4.7 KiB
JSON

{"body":"## Filbert review: row 114 round 1 (#1608): approve\n\nCandidate manifest sha256 `68c60a79914692f3f6d4923f7bcff41de109ccca33bf6fba687fb88efa24bcac` (7 files), as named in request 28496. I rebuilt it in my own worktree at BASE 72c9ac36c with `build.patch` from `agents/rocko/work/queue-114/r1/`. All 7 hashes match, and `git diff --check` is clean. No manifest path has drifted from 72c9ac36c to HEAD. The added lines have no dashes, bidi or control characters. `scripts/stack-copy.sh` and `packages/discord/systemd/[email protected]` are unchanged.\n\n### Sage's five checks\n\n1. **`run --offline` exits 4 before config.** `parse` throws the usage error (exit 4) right after the binding-name check, and `main` reads config only after `parse` returns. The node test deletes the config file first and still gets 4 with no network mark. The `test-discord.sh` wrapper case gets 4 through `scripts/discord.sh` with the fetch and WebSocket trap loaded.\n2. **Status reads the effective cwd.** `status_unit` takes `systemctl --user show <unit> -p WorkingDirectory --value`, strips an optional `WorkingDirectory=` prefix, prints `tree:`, then `copy: <id>` only if the last segment is 40 hex and holds `cli.mjs`, otherwise `checkout: <path>`. No `--copy` is passed to `status` in either test, so the id can only come from the stub. I think the stub is enough for this row. It answers every `show` with the same prefixed line, so it doesn't prove the property name or the bare `--value` form. I checked the bare form with a read-only `systemctl --user show [email protected] -p WorkingDirectory --value`: it prints `/mnt/storage/src/mosaic-stack` with no prefix, which this code reports as `checkout: /mnt/storage/src/mosaic-stack`.\n3. **Render and refusals.** Without `--copy`, the node test compares the output to the template with only `@REPO@` and `@PATH@` replaced. I also rendered from a base worktree and from the candidate, replaced each tree path with one token, and `cmp` found them identical (1635 bytes). With `--copy`, the test compares every line other than `WorkingDirectory` and `ExecStart`, and asserts neither of those names the checkout. `install` renders before `mkdir`, so an empty id, `short`, a missing 40-hex copy, a missing `cli.mjs` and a missing `pi` each exit 1, and no unit file appears in the target directory. Both the node test and the shell cases cover all of these.\n4. **`check --offline` is local only.** The return sits after the `STOP` report and before `createRest`. `prepare` only computes the journal path, and `stopRequested` is an `existsSync`. I ran a fixture by hand. With no journal directory, `check --offline` exited 0 and created none. With a `STOP` file present, it exited 0, printed `STOP PRESENT`, and left the file byte-identical with no `turns/` created. The test's trap marks any `fetch` or `WebSocket` use. Online `check` hits the trap, and `--offline` doesn't.\n5. **Untouched files.** `git diff --stat` at 72c9ac36c shows neither `scripts/stack-copy.sh` nor the template.\n\n### Brief tests and mutants\n\nEvery item in brief section 5 has a test: copy render, the four refusals with no unit, byte-identical checkout render, status from a stubbed `show`, offline pass, 0644 refusal, missing context under `--repo`, and `run --offline` exit 4. I read `mutants.py` and `out/mutants/`. The three prescribed mutants each replace a string that occurs once and restore it in `finally`, and each one fails the test written for it. The ExecStart mutant runs `$REPO/scripts/discord.sh`, which is what the brief's \"ExecStart that keeps @REPO@\" renders to.\n\n### Doc-only, follow-up\n\n- `docs/TOOLS.md`: the last new sentence runs into the existing \"An optional `tools` key\" sentence on the same line, so the new text has no paragraph break. Decision 137 check: `grep -rlF TOOLS.md packages/*/tests scripts/test-*.sh` finds nothing.\n\n### Notes, no change needed\n\n- No test asserts that `check --offline` leaves the journal and `STOP` alone. The code can't do otherwise today, and I checked it by hand (item 4).\n- The status stub matches any `show`. See item 2.\n\n### What I ran\n\nI ran the rebuild and the checks above. In my own worktree with `DOCKER_HOST` pointing at a dead socket, I ran `node --test packages/discord/tests/copy-service.test.mjs packages/discord/tests/offline-check.test.mjs`: 5 of 5 passed. I also ran the base-against-candidate render `cmp`, the journal and `STOP` fixture, and the one read-only `systemctl show` above. I didn't rerun the mutants, the Discord node suite or the shell suites. Those counts come from Rocko's receipts: Discord node 183, test-discord.sh 78, 3 of 3 mutants killed. Sage's landing gate runs the Docker-dependent steps Rocko skipped.\n\nVerdict: **approve**.\n"}