feat(cli, plugins, harness): the bus host runs the harness watch on a timer, keeps its results, and claude-code refuses a binary that lacks an adapter flag (#1873) #2016

Merged
jason.woltje merged 4 commits from harness-watch-w2 into refactor 2026-11-20 14:11:51 +00:00
4 Commits
Author SHA1 Message Date
jason.woltje 0f07301607 test(plugins): harness-watch-w2 re-check: the two group-kill tests wait up to 15 s for the stand-in's background child to start, since the --help capture comes after the adapter runs and --version and missed 3 s under heavy load (#1873, lane harness-watch-w2) 2026-11-20 07:29:22 -06:00
jason.woltje a4d06b95c6 test(plugins): harness-watch-w2 re-check P3-3: the claude capture's stop test now has a background child that keeps the stdout pipe open, so it fails when a stop kills only the parent, and a new test does the same for pi's version capture on a stop (#1873, lane harness-watch-w2) 2026-11-20 07:29:22 -06:00
jason.woltje f2463ab36d fix(cli,plugins,harness): harness-watch-w2 review: pi-fit's two whole-result tests carry digest and undecided, and pi-binary's copy links packages/plugins/src (P2-1, P2-2); the claude fit rule counts a flag only from an option line read up to its description, so a flag a description only mentions is a miss (P2-3); on a cache miss preflight asks the bus host's watch for a pass at once (new src/watch-request.mjs: a stat pass now, a full pass on a changed key, one tick after a running pass, none after stop), and stays synchronous, so the launch that missed and launches before the first pass ends still go ahead (P2-4, the rest named in the README); the watch redacts word:/path, file:// and ~/ forms (P3-5); each claude capture kills its process group when it ends too and runs nothing on an aborted signal, the unobservable key-equal guard is dropped, pi inspect takes its check as an option, the host backstop leaves kept and source alone, and tests now fail without the group kill, the stop grace, the verdict cap, the early abort, the backstop's data root, home and process env needles and pi's undecided read (P3-6) (#1873, lane harness-watch-w2) 2026-11-20 07:29:22 -06:00
jason.woltje 7afe892e94 feat(cli,plugins,harness): harness-watch-w2: the bus host runs the harness watch on a timer (a full pass at start, a stat-key pass every 5 minutes, a full pass when the key changes or once a day, none while processing is halted or invalid and one on resume, never two at once, stop aborts the pass) and writes <org dataRoot>/state/harness-watch.json (temp then rename) and harness-watch.jsonl (one line per transition), checked for host paths and env values first; claude-code's fit rule: every flag adapter.sh passes (read from two recorded adapter runs) is in --help and --version answers, captured under unshare -r -n with pi-fit's fallback, a miss is fit fail with the flag as rule id, and preflight refuses harness-feature-missing on that kept verdict; pi-fit failures carry digest and undecided, pi's inspect reads them and its --version capture stops with the signal; the watch takes a signal and keeps flag rule ids (#1873, lane harness-watch-w2) 2026-11-20 07:29:22 -06:00