You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(worktree): TS provisioning runs npm ci / pip install -q in repos with no manifest to install from — the shell path guards, TS doesn't #1196
ensureWorktree installs whenever node_modules is missing (worktree-manager.ts:996-998), which is always true in a non-Node repo. resolvePackageManager falls back to "npm" (stacks.ts:242-250).
For Python stacks, pip's ciInstall is pip install -q with no arguments (stacks.ts:148), which is a failing no-op.
Also exposed: reinstallIfLockfileChanged (:1336-1344). merge-check runs ${pm.run} test / build as severity: error without checking whether the script exists (combined-branch-test.ts:366,387), which gives a false BLOCKED on non-Node batches.
AC
AC-1: Worktree provisioning skips install (and logs why) when no manifest for the resolved package manager exists: package.json for JS, requirements*.txt/pyproject.toml for Python. Evidence: npx vitest run src/lib/workflow/worktree-manager.test.ts
AC-2: A pip stack's install command names its requirements file, or is skipped. It never runs a bare pip install -q. Evidence: npx vitest run src/lib/stacks.test.ts
AC-3: merge-check skips the test/build step, rather than erroring, when the repo defines no such script. Evidence: npx vitest run src/lib/merge-check/combined-branch-test.test.ts
No full npm test in exec or in qa. The suite takes 10–13 min and its global setup runs npm run build; every MCP-dispatched phase has a hard 30-minute wall. Run targeted tests: npx vitest run <changed/related test files>. If a broader run is truly needed: once, foreground, with a timeout, after a WIP commit. Never run_in_background or Monitor. The runner runs the full suite before the PR is merged.
Mutation records:failedTest in the SEQUANT_MUTATION marker must start with the test file path (src/…/x.test.ts > describe > case), or QA §6i floors the AC to AC_NOT_MET. Use a type-preserving mutation (the global setup builds, so a type error aborts every test).
Tick a test-plan box only for a command that was actually run.
Complexity: Standard (3 ACs, 3 directories) · Scope: ✅ SCOPE_OK
Non-Goals (not in issue body — proposing explicitly): no new stack/PM types, no change to new-feature.sh's shell path (already guards on package.json per #847), no change to non-Python stacks.
Conflict check: worktree for #1196 exists, clean, at origin/main tip. Confirmed file overlap with #1197 and #1199 (both touch worktree-manager.ts, neither started yet) — don't run in the same wave; merge #1196 first.
AC checklist
AC-1 — Worktree provisioning skips install (and logs why) when no manifest exists for the resolved PM (package.json for JS; pyproject.toml/requirements*.txt for Python). Root cause:resolvePackageManager's fallback (detectPackageManagerSync, stacks.ts:242-250) is JS-lockfile-only and defaults to "npm" even in a pure-Python worktree, so installWorktreeDeps (worktree-manager.ts:632) always attempts npm ci. Fix: add hasManifestForPackageManager(pm, root) to stacks.ts; gate installWorktreeDeps and (defensively) reinstallIfLockfileChanged on it before building the install command. Evidence: npx vitest run src/lib/workflow/worktree-manager.test.ts
AC-2 — A pip stack's install command names its requirements file, or is skipped — never a bare pip install -q. Fix: extend resolvePackageManagerConfig (stacks.ts:465) with a pip-specific branch, parallel to the existing yarn classic/berry override — find requirements*.txt in root; found → pip install -q -r <file>; absent → shared skip sentinel. Update the 3 ciInstall consumers (installWorktreeDeps, reinstallIfLockfileChanged, combined-branch-test.ts) to check the sentinel before spawnSync. Note: this requires editing the existing stacks.test.ts test "leaves every non-yarn package manager untouched" — it currently asserts pip's config is untouched by identity (.toBe(PM_CONFIG.pip)); that's precisely what this AC changes, so pip needs its own dedicated cases instead of riding in that shared loop. Evidence: npx vitest run src/lib/stacks.test.ts
AC-3 — merge-check skips (not errors) the test/build step when the repo defines no such script. Fix: add a hasScript(root, scriptName) helper in combined-branch-test.ts (reads package.json, false on missing file or missing scripts[name]); gate the test/build blocks (:366, :387) independently — missing script → info-severity skip finding instead of error-severity BLOCKED. Evidence: npx vitest run src/lib/merge-check/combined-branch-test.test.ts
The reinstallIfLockfileChanged guard (part of AC-1) is currently unreachable in practice — its lockfile list is JS-only, so a Python fixture can't exercise it. Cheap insurance per the issue's "Also exposed" callout; call this out in the PR rather than claiming test coverage for it.
The .claude/skills/{exec,qa}/SKILL.md files listed as "may touch" on the issue appear to be graph file-overlap accounting, not files this fix needs — no worktree-install-skip documentation found there to go stale. Treating skill edits as out of scope unless implementation says otherwise.
Open questions
Tie-break when multiple requirements*.txt exist → recommend exact requirements.txt first, else first match; low impact either way.
Whether AC-3's skip check needs to be pip/poetry/uv-aware → recommend no; the path is inherently JS-lockfile-gated already, so "no package.json" already covers the Python case by construction.
Recommended workflow
Phases: exec → qa · Quality Loop: disabled Reasoning: bug-labeled, mechanical-tier, SCOPE_OK, with 3 pre-named target test files — targeted vitest run additions during /exec beat stub generation.
Mutation, AC-1: made the no-manifest skip in installWorktreeDeps unreachable (type-preserving). Exactly worktree-manager.test.ts > installWorktreeDeps skips install with no manifest (#1196 AC-1) > skips and logs why for a non-Node repo failed (1/7). Restored.
AC-2 not.toContain("pip install -q\n") is vacuous as QA says. The case still gates through its positive Skipping dependency install assertion, so this is not an AC hole.
Poetry with requirements*.txt and no pyproject.toml: poetry is only resolved from poetry.lock, which implies a pyproject.toml, so this is theoretical.
Not covered, follow-up candidate:uv has the same bare-install shape (PM_CONFIG.uv.ciInstall = "uv pip install -q", no -r). AC-2 names the pip stack only, so this issue is not grown for it. A uv.lock repo should probably get uv sync --frozen.
Activity
admarble commentedon Sep 29, 2026
Runner context (graph-run, tracker #1203, wave 1) — read before planning. Applies to the spec, exec, and qa phases by name.
mainmoved after this issue was filed: feat(#1135): native review, tech-debt and testing rubrics as skill references; ADR convention; drop TodoWrite #1206 (skill references, TodoWrite dropped), feat(#1135): /release pre-flight runs claude plugin validate; post-tool never hard-blocks; current model aliases #1207 (/releaseplugin validate, post-tool never hard-blocks), fix(#1089): generated MCP configs launch through the inline node -e launcher; update/sync migrate legacy npx entries #1208 (MCP configs launch through the inlinenode -elauncher). Plan against currentorigin/main, not the file state quoted in the body.npm testin exec or in qa. The suite takes 10–13 min and its global setup runsnpm run build; every MCP-dispatched phase has a hard 30-minute wall. Run targeted tests:npx vitest run <changed/related test files>. If a broader run is truly needed: once, foreground, with atimeout, after a WIP commit. Neverrun_in_backgroundorMonitor. The runner runs the full suite before the PR is merged.failedTestin theSEQUANT_MUTATIONmarker must start with the test file path (src/…/x.test.ts > describe > case), or QA §6i floors the AC toAC_NOT_MET. Use a type-preserving mutation (the global setup builds, so a type error aborts every test).admarble commentedon Sep 29, 2026
/spec plan — #1196
Complexity: Standard (3 ACs, 3 directories) · Scope: ✅ SCOPE_OK
Non-Goals (not in issue body — proposing explicitly): no new stack/PM types, no change to
new-feature.sh's shell path (already guards onpackage.jsonper #847), no change to non-Python stacks.Conflict check: worktree for #1196 exists, clean, at
origin/maintip. Confirmed file overlap with #1197 and #1199 (both touchworktree-manager.ts, neither started yet) — don't run in the same wave; merge #1196 first.AC checklist
package.jsonfor JS;pyproject.toml/requirements*.txtfor Python). Root cause:resolvePackageManager's fallback (detectPackageManagerSync,stacks.ts:242-250) is JS-lockfile-only and defaults to"npm"even in a pure-Python worktree, soinstallWorktreeDeps(worktree-manager.ts:632) always attemptsnpm ci. Fix: addhasManifestForPackageManager(pm, root)tostacks.ts; gateinstallWorktreeDepsand (defensively)reinstallIfLockfileChangedon it before building the install command. Evidence:npx vitest run src/lib/workflow/worktree-manager.test.tspip install -q. Fix: extendresolvePackageManagerConfig(stacks.ts:465) with a pip-specific branch, parallel to the existing yarn classic/berry override — findrequirements*.txtinroot; found →pip install -q -r <file>; absent → shared skip sentinel. Update the 3ciInstallconsumers (installWorktreeDeps,reinstallIfLockfileChanged,combined-branch-test.ts) to check the sentinel beforespawnSync. Note: this requires editing the existingstacks.test.tstest "leaves every non-yarn package manager untouched" — it currently asserts pip's config is untouched by identity (.toBe(PM_CONFIG.pip)); that's precisely what this AC changes, sopipneeds its own dedicated cases instead of riding in that shared loop. Evidence:npx vitest run src/lib/stacks.test.tshasScript(root, scriptName)helper incombined-branch-test.ts(readspackage.json,falseon missing file or missingscripts[name]); gate thetest/buildblocks (:366,:387) independently — missing script →info-severity skip finding instead oferror-severity BLOCKED. Evidence:npx vitest run src/lib/merge-check/combined-branch-test.test.tsDesign notes
resolvePackageManagerConfig(pm, root)directory-dependent-override pattern already proven for yarn classic/berry (PM_CONFIG.yarn.ciInstall uses Yarn 2+--immutable, which Yarn 1 rejects — no berry detection exists #871), rather than teachingdetectPackageManagerSyncabout Python (bigger blast radius — that detector has other callers beyond install).reinstallIfLockfileChangedguard (part of AC-1) is currently unreachable in practice — its lockfile list is JS-only, so a Python fixture can't exercise it. Cheap insurance per the issue's "Also exposed" callout; call this out in the PR rather than claiming test coverage for it..claude/skills/{exec,qa}/SKILL.mdfiles listed as "may touch" on the issue appear to be graph file-overlap accounting, not files this fix needs — no worktree-install-skip documentation found there to go stale. Treating skill edits as out of scope unless implementation says otherwise.Open questions
requirements*.txtexist → recommend exactrequirements.txtfirst, else first match; low impact either way.Recommended workflow
Phases: exec → qa · Quality Loop: disabled
Reasoning: bug-labeled, mechanical-tier, SCOPE_OK, with 3 pre-named target test files — targeted
vitest runadditions during/execbeat stub generation.admarble commentedon Sep 29, 2026
QA Verdict: NEEDS_VERIFICATION
AC coverage: 3/3 met
Gaps:
admarble commentedon Sep 29, 2026
Runner verification (graph-run #1203, wave 1): QA verdict was
NEEDS_VERIFICATION. This comment discharges it against PR #1212 @b9ca87ab.Executed in the worktree:
npx vitest run src/lib/workflow/worktree-manager.test.ts src/lib/stacks.test.ts src/lib/merge-check/combined-branch-test.test.ts src/lib/workflow/worktree-manager.frozen-install.test.ts→ 4 files, 185/185 passed.installWorktreeDepsunreachable (type-preserving). Exactlyworktree-manager.test.ts > installWorktreeDeps skips install with no manifest (#1196 AC-1) > skips and logs why for a non-Node repofailed (1/7). Restored.worktree-manager.ts): clean.closingIssuesReferences= [fix(worktree): TS provisioning runsnpm ci/pip install -qin repos with no manifest to install from — the shell path guards, TS doesn't #1196] only.QA gaps, assessed:
not.toContain("pip install -q\n")is vacuous as QA says. The case still gates through its positiveSkipping dependency installassertion, so this is not an AC hole.requirements*.txtand nopyproject.toml: poetry is only resolved frompoetry.lock, which implies apyproject.toml, so this is theoretical.uvhas the same bare-install shape (PM_CONFIG.uv.ciInstall = "uv pip install -q", no-r). AC-2 names the pip stack only, so this issue is not grown for it. Auv.lockrepo should probably getuv sync --frozen.fix(#1196): worktree provisioning, pip install, merge-check skip non-…
fix(#1243): name the missing root package.json when skipping the npm …