fix(KB-647): add conflict recovery to worktree creation fallback

- Add conflict recovery to createFromExistingBranch fallback in executor\n- Add tests for worktree conflict recovery scenarios\n- Add changeset documenting the worktree recovery fix\n- Clean up removed central-core modules and AGENTS.md content\n- Update CLI command descriptions and extension tools
This commit is contained in:
gsxdsm
2026-03-31 20:01:35 -07:00
parent 80ab88db3d
commit 9fd7b667d5
3 changed files with 176 additions and 23 deletions

View File

@@ -0,0 +1,9 @@
---
"@gsxdsm/fusion": patch
---
Fix worktree conflict recovery in createFromExistingBranch fallback path.
Previously, when `createWithBranch()` failed with an error other than "already used by worktree" (e.g., "branch already exists"), the code would fall back to `createFromExistingBranch()`. If this fallback also failed with "already used by worktree", the error was not being handled by the conflict recovery logic, causing tasks to fail with "Failed to create worktree after 3 attempts" even when recovery was possible.
The fix extracts the conflict handling logic into a reusable `handleWorktreeConflict()` method and calls it from both the primary error handler and the fallback catch block. This ensures consistent recovery behavior regardless of which git worktree command triggered the conflict.