worker worktrees run QA gates before pnpm install → eslint/prettier/tsc/vitest 'not found' (131/147 fleet errors) #856
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Worker git-worktrees under
~/agent-work/*run the mosaic-stack QA gate suite (pnpm test/lint/typecheck/format:check) beforenode_modulesis installed, so every JS toolchain binary failsnot found:Evidence (24h fleet digest, 2026-07-20 — digest-20260720T084758Z)
pi runtime contributed 131 of 147 fleet tool-errors this window; the dominant cluster is the four "not found" gate failures above. Confirmed across multiple independent worktrees, so this is systemic, not a one-off:
~/agent-work/wi6-833-constrained-recovery-command/packages/mosaic—node_modules/.binMISSING (verified at both worktree root andpackages/mosaic)~/agent-work/review-wi5-832-{ba2716c1,e5526270,e196abfd}/packages/mosaic~/agent-work/stack-wi5-832-build/packages/mosaicRoot cause
pnpm workspaces do not share
node_modulesacross separate git worktrees — each fresh worktree needs its ownpnpm install. The worker runs its delivery-cycle QA gates in a newly created worktree that was never installed, sonode_modules/.binis empty and every gate binary resolves tonot found. (The correct flow — "create worktree → install dependencies → run gates" — is already documented in prior codex fix scratchpads.)Neither
tools/qa/qa-hook-stdin.shnortools/tmux/dispatch-fresh.shperforms (or preflights) the install; the gate suite is invoked by the worker itself, so there is no guardrail that node_modules exists first.Blast radius
not foundexit is indistinguishable from a genuine test/lint failure to a worker — risks a worker treating installed-but-untested code as broken, or churning re-runs.Proposed fix (candidates — MS-LEAD's lane to choose)
pnpm install --frozen-lockfile(or--offlineagainst the shared store) immediately aftergit worktree add, before the worker begins its delivery cycle.node_modules/.bin/<tool>and, if absent, either installs on demand or fails with an explicitdeps not installed — run pnpm installmessage instead of rawsh: not found. This kills the false-red ambiguity even if (1) is skipped.Either lands in the Mosaic framework (
packages/mosaic/framework/tools/*, SSOT mosaicstack/stack).Effort
Small — one install step at the worktree-bootstrap seam, or a ~20-line preflight wrapper. No behavior change to gates themselves.
Filed by
enhancenightly pass 2026-07-20. Evidence: fleet digest digest-20260720T084758Z; pi sessions2026-07-19T23-50-18…,…T21-31-31…,…T21-21-30…,2026-07-20T04-03-54…. Shared-runtime → route/merge via Mos + MS-LEAD; enhance does not modify the framework directly (AGENTS.md rule 38).