Reuse saved worktrees when continuing recovered branches - #11
Merged
Merged
Conversation
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.
After recovery renamed a task branch, a follow-up recomputed its worktree directory from the new branch name instead of using the saved path. The existing branch then triggered "Task branch already exists without its worktree", even though the original worktree and published work were intact.
Use the checkpointed worktree path consistently for preparation, verification, and push. Preserve its contents and pinned base. Validate that it is the exact Git worktree root directly inside the managed directory, with the expected branch and shared repository. A missing saved directory blocks recovery without creating a replacement.
Validation: npm run check passes (143 tests, including an expanded real-Git recovery regression). The regression renames an already-published branch, preserves uncommitted follow-up work, resumes preparation, verifies, commits and pushes; it also rejects missing checkpoints, outside paths, wrong branches, and foreign repositories. Documentation and release notes updated.
This fixes the continuation failure encountered in wiiii653/yoomp-#18 after recovering its implementation as PR #19.