Repository navigation
fix(#846): ensureWorktree surfaces failed provisioning install instead of swallowing it - #854
Merged
admarble merged 1 commit intoJul 29, 2026
Conversation
…d of swallowing it Extract the frozen provisioning install into installWorktreeDeps, which mirrors reinstallIfLockfileChanged's status check: on a non-zero exit it warns (chalk.yellow) naming the resolved command so the user can rerun it, and warn-and-continues rather than aborting. Previously ensureWorktree ran the install and discarded the result, so after #816/#826 switched to a frozen npm ci a repo with no/stale lockfile yielded a silently dependency-less worktree whose breakage only surfaced later as a confusing phase error. Adds a mocked unit test (no lockfile => npm ci exit 1) asserting the failure is reported, the stderr is surfaced, and the command is named even when stderr is empty. Entire-Checkpoint: 8e84f0faf466
3 tasks
admarble
deleted the
feature/846-ensureworktree-swallows-the-provisioning-install-e
branch
July 29, 2026 13:55
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
ensureWorktreeran the frozen provisioning install and discarded the result with nostatuscheck, while the siblingreinstallIfLockfileChangedalready warned on failure. After fix(worktree): frozen installs so provisioning cannot dirty the lockfile #816/fix(worktree): new-feature.sh still usesnpm install, so provisioning dirties the lockfile (#816 gap) #826 switched provisioning to a frozennpm ci, a repo with no/stale lockfile hard-fails (exit 1, nonode_modules) and the swallowed status left a silently dependency-less worktree whose breakage only surfaced later as a confusing phase error.installWorktreeDepshelper that mirrors the sibling's status check and, on a non-zero exit, emits achalk.yellowwarning naming the resolved command (Dependency install failed (npm ci): …) so the user can rerun it — warn-and-continue, matching the sibling's contract.worktree-manager.frozen-install.test.ts.Pre-PR AC Verification
:1191installWorktreeDepsinworktree-manager.ts—if (installResult.status !== 0)→chalk.yellowwarning carrying trimmed stderr; returnsfalse(warn-and-continue)Dependency install failed (${command})…wherecommand = [cmd, ...args].join(" "); command named even when stderr is emptyinstallWorktreeDeps surfaces a failed provisioning install (#846)suite: mocksspawnSync→status: 1, spiesconsole.log, asserts warning fired + containsnpm ciTest plan
npm run build— passesnpm run lint— passes (0 warnings)npx vitest run src/lib/workflow/worktree-manager— 14 passed (6 in frozen-install file)Closes #846
🤖 Generated with Claude Code