feat(bus, cli, plugins, webui): the plugins answer carries the harness watch's record and Settings > Routing shows one line per harness (#1873) #2018

Merged
jason.woltje merged 4 commits from harness-watch-w3 into refactor 2026-11-20 17:44:21 +00:00
Owner

What changes

Lane harness-watch-w3, slice W3 of the harness watch design: Settings shows what the last harness check found.

  • Plugins answer. The bus plugins answer carries harnessWatch, one entry per harness (name, state, version, checkedAt, changedAt, failed, line). readWatchView in packages/plugins/src/harness-watch.mjs reads it from the host's <org dataRoot>/state/harness-watch.json. The broker only reads the file. A missing, unreadable, linked, oversized or wrong-shape file or record gives "not checked yet". It never throws and never guesses.
  • Limits on the read. No link, no FIFO, no file over 1 MiB. At most 64 entries from the first 256 records. Only real times are kept, so 2026-02-30 reads as none. The read redacts again with the org and instance roots as known paths, and drops a file-only harness name that equals an env value.
  • Routing page. Settings > Routing shows one line per harness under Save harnesses. Red and missing take the danger colour. "Not checked yet" never shows as fit. When the answer has no list the page shows one plain line. No host path or env value appears.
  • W2 carry fix. The host's watch loads harness plugins from the instance root when there is one, as the launcher does, and keeps state under the org root.
  • Scope. In packages/bus/src/runtime.mjs only the plugins verb line and one import change. The proxy passes the field through and needed no change.

No new verb, refusal code, grant, role, schema or config format.

Tests

  • New packages/bus/tests/plugins-verb.test.mjs cases, packages/cli/tests/bus-start-watch.test.mjs (bus start starts the watch, --no-launch does not), packages/plugins/tests/harness-watch-view.test.mjs, packages/webui/tests/routes-harness-watch-browser.test.mjs, and more cases in harness-watch-host.test.mjs.
  • Lane proof before the rebase, on 35fc9caba: 561 files, 5972 pass, 0 fail, 11 skipped. After the rebase onto 9287e2fac the lane reran the 20 files the rebase could touch: 523 pass, 0 fail. range-diff shows all four commits unchanged.
  • stack-release.test.mjs needs about 680 s, so a 600 s limit kills it at base too. With an 1800 s limit it passed 237/0 at base and at head.
  • Lead check in a clean environment on 4aa008e9f: 615 files, 6422 pass, 0 fail, 11 skipped.

Review

Two rounds by fresh claude-opus-5-5 reviewers. Round one approved with 7 minor findings, all fixed. The re-check approved with 3 findings on test strength, all fixed. The lane reverted each fix and saw its test fail.

Left for later

  • The r3 design takes the word "harness" off the Routing page. The legend "Harnesses" predates this slice, and the new aria-label and no-list line use the word too. The three strings change together in the settings slice that renames the legend.
  • Read-only and tester viewers see no lines. The lines sit in the Harnesses fieldset, which shows only for a signed-in sender who is not the tester, and the plugins read has the same gate.
  • The redactor's path forms are W2's rule set. This slice adds known roots and did not widen the rules.
  • The answer has no digest, refused or gone.
  • The plugins.set answer has no harnessWatch. The page keeps the lines it read before a save and already takes the field if a later slice adds it.
  • harness-watch.jsonl has no rotation or pruning.
## What changes Lane harness-watch-w3, slice W3 of the harness watch design: Settings shows what the last harness check found. - **Plugins answer.** The bus `plugins` answer carries `harnessWatch`, one entry per harness (name, state, version, checkedAt, changedAt, failed, line). `readWatchView` in `packages/plugins/src/harness-watch.mjs` reads it from the host's `<org dataRoot>/state/harness-watch.json`. The broker only reads the file. A missing, unreadable, linked, oversized or wrong-shape file or record gives "not checked yet". It never throws and never guesses. - **Limits on the read.** No link, no FIFO, no file over 1 MiB. At most 64 entries from the first 256 records. Only real times are kept, so 2026-02-30 reads as none. The read redacts again with the org and instance roots as known paths, and drops a file-only harness name that equals an env value. - **Routing page.** Settings > Routing shows one line per harness under Save harnesses. Red and missing take the danger colour. "Not checked yet" never shows as fit. When the answer has no list the page shows one plain line. No host path or env value appears. - **W2 carry fix.** The host's watch loads harness plugins from the instance root when there is one, as the launcher does, and keeps state under the org root. - **Scope.** In `packages/bus/src/runtime.mjs` only the plugins verb line and one import change. The proxy passes the field through and needed no change. No new verb, refusal code, grant, role, schema or config format. ## Tests - New `packages/bus/tests/plugins-verb.test.mjs` cases, `packages/cli/tests/bus-start-watch.test.mjs` (`bus start` starts the watch, `--no-launch` does not), `packages/plugins/tests/harness-watch-view.test.mjs`, `packages/webui/tests/routes-harness-watch-browser.test.mjs`, and more cases in `harness-watch-host.test.mjs`. - Lane proof before the rebase, on 35fc9caba: 561 files, 5972 pass, 0 fail, 11 skipped. After the rebase onto 9287e2fac the lane reran the 20 files the rebase could touch: 523 pass, 0 fail. `range-diff` shows all four commits unchanged. - `stack-release.test.mjs` needs about 680 s, so a 600 s limit kills it at base too. With an 1800 s limit it passed 237/0 at base and at head. - Lead check in a clean environment on 4aa008e9f: 615 files, 6422 pass, 0 fail, 11 skipped. ## Review Two rounds by fresh claude-opus-5-5 reviewers. Round one approved with 7 minor findings, all fixed. The re-check approved with 3 findings on test strength, all fixed. The lane reverted each fix and saw its test fail. ## Left for later - The r3 design takes the word "harness" off the Routing page. The legend "Harnesses" predates this slice, and the new aria-label and no-list line use the word too. The three strings change together in the settings slice that renames the legend. - Read-only and tester viewers see no lines. The lines sit in the Harnesses fieldset, which shows only for a signed-in sender who is not the tester, and the plugins read has the same gate. - The redactor's path forms are W2's rule set. This slice adds known roots and did not widen the rules. - The answer has no digest, `refused` or `gone`. - The `plugins.set` answer has no `harnessWatch`. The page keeps the lines it read before a save and already takes the field if a later slice adds it. - `harness-watch.jsonl` has no rotation or pruning.
jason.woltje added 4 commits 2026-11-20 17:44:18 +00:00
jason.woltje merged commit 4aa008e9fe into refactor 2026-11-20 17:44:21 +00:00
Sign in to join this conversation.