feat: add --no-setup for worktree creation #5
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/no-setup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Allows repair checkouts to be created when dependency setup cannot yet succeed. Callers can repair their lockfile in the new checkout, then run the required setup themselves.
An explicit opt-out avoids deliberately attempting a failing install or changing failure cleanup. Default setup remains enabled. Built CLI fixtures preserve copied local files, skip installation and Next.js type generation, and retain cleanup on copy failures.
Consumers must wait for publication and verify the installed artifact before using the flag. Native lock repairs and frozen-install validation remain separate work.
Review
01M5KYKJ8CSYC0N6NN53NV6KNS— headdc92d05f3ad8f59df61ab2dd20a193cb5ba56580Review — j4k-oss/worktree-add @
f56cdec3b8Scope: diff against base tree
9ee75924a31fStatus: dispatched — coverage complete (9/9 slots terminal)
Facts: current review-wide projection
Computed under:
Findings (1)
low — The unborn-HEAD creation test derives its expected outcome from the production guard
01M5KYQPY3NZD1KME8DGD71ZFZsrc/cli/run-worktree-add.test.ts(snippet)01M5KYR2F200SRCZKJX002BAJM· valid: The grounded excerpt confirms that the test calls the production helper findTooOldGitForUnbornHead() to set oldGitVersion. The reviewer quotes the assertion expect(worktreeBranch).toBe(oldGitVersion === undefined ? "feature/new" : "no worktree") and the guard in runWorktreeAdd, which throws formatUnbornHeadGitMessage(oldGitVersion) whenever that same helper returns a value. The trace is coherent, so the oracle is the implementation's own decision. That matches the test guideline's 'expectation copied from the implementation' disconnect. The claim supplies the promised behavior (on supported Git, creation succeeds for an unborn HEAD), the weakness (the expected outcome follows the helper), and a regression it would miss: if the helper returns a version for every unborn HEAD, production refuses and the test's expectations shift to accept the refusal, so it stays green. Adapting to the installed Git is a legitimate need, but it does not require the production helper as the oracle. The proposed remedy keeps the integration test and the refusal check and only replaces the oracle with an independent probe, which matches the guideline's preference for repair over deletion. A separate unit test of unborn-head-support.ts might cover the helper itself, but the batch shows none, and that would not restore this test's own end-to-end protection. Low severity is appropriate.Other claims
01M5KYQ5CXFHGY0ZVSFY0KG1JXlow — The--no-setupskip notice is split into a dry-run branch and a rawconsole.errorbranch, each restating whatsetupProjectdoesCoverage
Coverage pass: 01M5KYKJB04473MTF1PMWQ139P
Accounting: complete
Slot health: healthy
The low-severity claim
01M5KYQPY3NZD1KME8DGD71ZFZidentifies an existing test weakness. Both unborn-HEAD tests and theirfindTooOldGitForUnbornHead()expectations are unchanged from base45765d21f1575e7e53348c60ba85b9de695eb7ffin this PR's headdc92d05f3ad8f59df61ab2dd20a193cb5ba56580.The weakness is not fixed here. It falls outside this change's accepted setup opt-out, default, copy, cleanup and dry-run criteria. The user's instruction is to report findings outside those criteria instead of starting another round, so no follow-up PR or issue is being created. The independent reviews and built-CLI checks cover this PR's behavior.