Skip to content

fix(#1243): npm ci runs at the worktree root even when the package lives in a subdirectory — EUSAGE on every provision - #1371

Merged
admarble merged 2 commits into
mainfrom
feature/1243-fix-worktree-npm-ci-runs-at-the-worktree-root-even
Oct 8, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/1243-fix-worktree-npm-ci-runs-at-the-worktree-root-even

Conversation

@admarble

@admarble admarble commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The fix is in installWorktreeDeps (src/lib/workflow/worktree-manager.ts). Node package managers now log Skipping dependency install — no package.json at the worktree root. Python managers (pip, poetry, uv) keep the old no manifest found for <pm> wording.

I added the test no root package.json: skips with a root-naming message (package in a subdirectory). It builds a temp dir with only agent/package.json and agent/package-lock.json. It asserts the function returns true, logs the new message, and never logs Dependency install failed. I also updated the older #1196 assertion to expect the new text, and added a ### Fixed entry to CHANGELOG.md.

I did not open a PR, because the orchestrator does that. The branch is feature/1243-fix-worktree-npm-ci-runs-at-the-worktree-root-even.

Pre-PR AC Verification

AC Status Evidence
AC-1 ✅ npx vitest run src/lib/workflow/worktree-manager.test.ts -t "no root package.json" gives 1 passed, 0 failed
AC-2 ✅ src/lib/workflow/worktree-manager.frozen-install.test.ts passes (15 tests), including the one that checks npm ci runs with a root package.json and lockfile

Mutation-verified: AC-1 — disabled the manifest guard; the no root package.json test failed; restored.

Checks

  • Build and lint: npm run build and npm run lint both pass.
  • Tests run: the -t "no root package.json" run above, plus a --changed origin/main run over worktree-manager.frozen-install.test.ts and scripts/qa/tautology-detector-cli.test.ts. Only one file ran in that second command, and it passed all 15 tests. I can't tell whether the tautology-detector test was among the files selected.

Pre-PR confidence

  • Weakest part: the new message is chosen by a hard-coded check for pip, poetry and uv. A new Python manager would need adding to that list.
  • Coverage gaps: templates/scripts/new-feature.sh was not checked for the same unconditional npm ci. That is the follow-up the spec asked to note, and I did not open an issue for it.

Next steps

  • Run /qa 1243.
  • The run.installDir option and the root-package.json-without-lockfile case stay out of scope, as the spec recommended.

Fixes #1243

QA verdict: AC_MET_BUT_NOT_A_PLUS — acceptance criteria met, but not A+. The run broke to this PR for review rather than entering the quality loop; see the QA review comment for improvement notes.


🤖 Generated by sequant run

Entire-Checkpoint: acc97ab1726c
@admarble
admarble merged commit 2ce4da4 into main Oct 8, 2026
8 checks passed
@admarble
admarble deleted the feature/1243-fix-worktree-npm-ci-runs-at-the-worktree-root-even branch October 8, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(worktree): npm ci runs at the worktree root even when the package lives in a subdirectory — EUSAGE on every provision

1 participant