fix(framework): install deps on worktree bootstrap + legible deps-preflight at gate seam (#856) (#858)
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/push/publish Pipeline was successful

This commit was merged in pull request #858.
This commit is contained in:
2026-07-20 09:38:12 +00:00
parent 3b70c66c07
commit acd7d380f6
4 changed files with 143 additions and 2 deletions

View File

@@ -217,12 +217,22 @@ git fetch origin
mkdir -p ~/src/${projectName}-worktrees
git worktree add ~/src/${projectName}-worktrees/<task-slug> -b <branch-name> origin/main
cd ~/src/${projectName}-worktrees/<task-slug>
pnpm install --frozen-lockfile --prefer-offline
# ... all work happens here ...
git push origin <branch-name>
cd ~/src/${projectName} && git worktree remove ~/src/${projectName}-worktrees/<task-slug>
\`\`\`
Worktrees path: \`~/src/<repo>-worktrees/<task-slug>\` — NEVER use /tmp.`);
Worktrees path: \`~/src/<repo>-worktrees/<task-slug>\` — NEVER use /tmp.
\`pnpm install --frozen-lockfile --prefer-offline\` MUST run immediately after
\`git worktree add\`/\`cd\`, BEFORE any gate (\`pnpm test\`/\`lint\`/\`typecheck\`/\`format:check\`)
is invoked. pnpm workspaces do NOT share \`node_modules\` across separate git
worktrees — a fresh worktree has an empty \`node_modules/.bin\`, so every gate
binary (\`tsc\`/\`eslint\`/\`prettier\`/\`vitest\`) fails \`sh: 1: <tool>: not found\`
until deps are installed. That failure is indistinguishable from a real
test/lint failure — a false-red gate. Never skip this step and never reorder
it after the first gate invocation.`);
// 6. Completion gates
sections.push(`# Completion Gates — ENFORCED