From e736c12a0eab28422ab8599ed9b9bda18134e665 Mon Sep 17 00:00:00 2001 From: ari Date: Mon, 19 Oct 2026 20:57:56 -0400 Subject: [PATCH] T: log review round 2 (module-mode exit, filter-cache root, handoffs) --- plan/phase-5-consolidator/ws-t-tests.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plan/phase-5-consolidator/ws-t-tests.md b/plan/phase-5-consolidator/ws-t-tests.md index 690aea2..0971c08 100644 --- a/plan/phase-5-consolidator/ws-t-tests.md +++ b/plan/phase-5-consolidator/ws-t-tests.md @@ -4,7 +4,7 @@ Part of [Phase 5: Consolidator](README.md). Contracts: [contracts.md](contracts. | Field | Value | |---|---| -| Status | T1 to T7 done; review round 1 addressed; runner renamed to `dev-test` (`dev/dev-test.nu`). `peers.nix` fails at the first peers assertion until WS-E lands (by design) | +| Status | T1 to T7 done; review rounds 1 and 2 addressed; runner renamed to `dev-test` (`dev/dev-test.nu`). `peers.nix` fails at the first peers assertion until WS-E lands (by design) | | Owner | | | Depends on | none (uses the module's freeform `settings` for `[peers]` and a systemd override for `LoadCredential`, so it needs no module changes). F1 later swaps this for the first-class module options | | Blocks | nothing technically; it is the acceptance gate: goes green at the end of [WS-E](ws-e-telemetry.md) (with A, B, C, D landed), then F2 promotes it to `checks` | @@ -85,3 +85,11 @@ The test builds under `nix build .#tests.x86_64-linux.peers` (or equivalent) and - `plan/phase-5-consolidator/ws-f-nixos-docs.md` Do not touch - `TODO.md` T7 line (unticked on purpose; the merger ticks it) - Handoff 2026-10-19 (WS-T rename -> all): invoke the runner as `devenv shell -- dev-test ` or `nu dev/dev-test.nu `. Interactive bash completion is installed by `devenv shell`; zsh, after `compinit`: `source <(nu dev/dev-test.nu completions zsh)`. Nushell: `use dev/dev-test.nu *`. `nu dev/dev-test.nu self-check` is the runner's test. Verified here: `nu dev/dev-test.nu self-check` and `nu dev/dev-test.nu all` (fmt, clippy, openssl, unit, integration) green, plus `devenv shell -- dev-test --help`. Not run here (no nix builds in this worktree): `nu dev/dev-test.nu vm peers`, which on a KVM host is `nix build .#tests.x86_64-linux.peers -L`. `nix/tests/peers.nix` is unchanged. +- 2026-10-19 (WS-T review round 2): Addressed `loop/T/review-r.md`. No contract change, no file outside the owned list, no new dependency (the self-check reuses the `nu` and shell probes already there). + 1. **Blocking, module mode closed the caller's shell.** `run-steps` and `dev-test self-check` ended with `exit 1`, so with `use dev/dev-test.nu *` in `config.nu` any red `dev-test unit|all|ci` ended the Nushell session after the summary (`exit` cannot be caught). Both now raise with `error make`; `main` is the only place that exits, after printing the reason to stderr, so script mode keeps its non-zero status. `check-module-mode` guards it three ways: `exit` outside `main` is a problem, `(exit ...)` interpolated into a double-quoted string is a problem, and a real failing step (`SKYG_TEST_ASSUME_NO_KVM=1`) must be caught in module mode while `nu dev/dev-test.nu vm` still exits non-zero. Mutation-checked: restoring `exit 1` in `run-steps` fails the self-check with both the line number and the uncaught step. + - Found on the way: the openssl step's message was `$"cargo tree failed (exit ($found.exit_code)): ..."`. In Nushell `(...)` inside a double-quoted string is a subexpression, so that message would have called `exit` with cargo's status instead of raising a step failure (same class of bug, and it kills a module-mode session). Reworded to "failed with status (...)"; the new interpolation scan rejects a reoccurrence. + 2. **Filter-cache key relative to the cwd.** `source-mtime-key` globbed `src/**/*.rs …` from the cwd and `FILTER_CACHE` was the relative path. From `src/` the globs found nothing, the key became "unknown" and the result was written to `src/target/...` under a key that never goes stale. The globs and the cache path are now anchored on `repo-root` (`$SCRIPT_PATH | path dirname | path dirname`); they go through `glob` because `ls` only expands patterns written literally in the source, and an unusable key (`unknown` or `none`) is neither read nor written (`cached-lines` returns a fresh listing). `check-filter-cache` now asserts the key from `src/` equals the key from the root and is usable, that the cache path is absolute and `/target/skyg-test-filters.cache`, and that an unknown key writes no file. Mutation-checked: relative globs and a removed `unknown` guard each fail the self-check. The 33-file mtime scan costs ~25 ms including Nushell start. + 3. **Stale `dev/test.nu` in other streams' plan files.** Not edited here, on purpose: the review agrees the merger owns it, and those rows are other streams' ownership guards. Still to change: `plan/phase-5-consolidator/README.md` (workstream index), `ws-a-config.md` and `ws-f-nixos-docs.md` (Do not touch rows). + 4. **`TODO.md` T7.** Not edited here (outside WS-T's owned files, and the phase gate rejects changes outside them). Still says `dev/test.nu` and is unticked; the merger updates the name and ticks it. + 5. **`AGENTS.md` wording.** "the same command works in an interactive shell" now reads "inside an interactive `devenv shell`". `docs/consolidator.md` says the cache sits at the repo root and that a failing check raises rather than closing the session. +- Handoff 2026-10-19 (WS-T review round 2 -> all): unchanged commands and subcommand names. `nu dev/dev-test.nu self-check` now also fails if any command exits (outside `main`), if a message interpolates a call to `exit`, if a failing step is not catchable in module mode, or if the filter cache is not anchored on the repo root. Merger: items 3 and 4 above.