Skip to content

Reuse saved worktrees when continuing recovered branches - #11

Merged
d3cker merged 1 commit into
releasefrom
codex/reuse-saved-worktree
Sep 14, 2026
Merged

d3cker merged 1 commit into
releasefrom
codex/reuse-saved-worktree

Conversation

@d3cker

@d3cker d3cker commented Sep 14, 2026

Copy link
Copy Markdown
Owner

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.

@d3cker
d3cker merged commit 4ddfaa2 into release Sep 14, 2026
2 checks passed
github-actions Bot added a commit that referenced this pull request Sep 14, 2026
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.

1 participant