Files
fusion/packages
gsxdsm 2c3a777bca FN-8132: recover bare worktree branch collisions
Recover safe worktree creation when a dangling task branch already exists.

- Classify bare branch collisions and preserve foreign or mixed commit history.
- Reuse task-owned branches or recreate merged branches from the pinned start point.
- Audit recovery outcomes and cover native, fallback, and workspace acquisition paths.

Files changed:
 .../fn-8132-worktree-branch-collision-recovery.md  |   7 ++
 docs/architecture.md                               |   1 +
 .../__tests__/worktree-acquisition-backend.test.ts |  69 +++++++++++
 .../worktree-acquisition-workspace.test.ts         |  21 ++++
 .../worktree-backend-branch-collision.test.ts      | 132 +++++++++++++++++++++
 packages/engine/src/branch-conflicts.ts            | 121 +++++++++++++++++++
 packages/engine/src/run-audit.ts                   |   1 +
 packages/engine/src/worktree-acquisition.ts        |   3 +-
 packages/engine/src/worktree-backend.ts            |  94 +++++++++++++++-
 9 files changed, 447 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-8132

Fusion-Task-Lineage: f09d140f-4fcd-48a6-99b1-a351630f37bd

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 13:48:00 -07:00
..
2026-07-13 10:32:12 -07:00
2026-07-13 10:32:12 -07:00
2026-07-13 10:32:12 -07:00
2026-07-13 10:32:12 -07:00