Repository navigation
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 intoOct 8, 2026
Conversation
…install Entire-Checkpoint: 4f25fab2c0ce
Entire-Checkpoint: acc97ab1726c
admarble
deleted the
feature/1243-fix-worktree-npm-ci-runs-at-the-worktree-root-even
branch
October 8, 2026 06:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The fix is in
installWorktreeDeps(src/lib/workflow/worktree-manager.ts). Node package managers now logSkipping dependency install — no package.json at the worktree root. Python managers (pip, poetry, uv) keep the oldno 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 onlyagent/package.jsonandagent/package-lock.json. It asserts the function returnstrue, logs the new message, and never logsDependency install failed. I also updated the older #1196 assertion to expect the new text, and added a### Fixedentry toCHANGELOG.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
npx vitest run src/lib/workflow/worktree-manager.test.ts -t "no root package.json"gives 1 passed, 0 failedsrc/lib/workflow/worktree-manager.frozen-install.test.tspasses (15 tests), including the one that checksnpm ciruns with a rootpackage.jsonand lockfileMutation-verified: AC-1 — disabled the manifest guard; the
no root package.jsontest failed; restored.Checks
npm run buildandnpm run lintboth pass.-t "no root package.json"run above, plus a--changed origin/mainrun overworktree-manager.frozen-install.test.tsandscripts/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
pip,poetryanduv. A new Python manager would need adding to that list.templates/scripts/new-feature.shwas not checked for the same unconditionalnpm ci. That is the follow-up the spec asked to note, and I did not open an issue for it.Next steps
/qa 1243.run.installDiroption and the root-package.json-without-lockfile case stay out of scope, as the spec recommended.Fixes #1243
🤖 Generated by
sequant run