FN-9164: select per-repository workspace base branches
Workspace worktrees now honor and persist the appropriate base branch for each sub-repository throughout their lifecycle.
- Resolve requested bases per repository, normalize remote-only refs, and fall back safely to repository integration branches.
- Reuse recorded bases for landing, recovery, and revert flows with privacy-safe audit breadcrumbs.
- Surface base and fallback details in task UI, documentation, tests, and release notes.
Files changed:
.changeset/fn-9164-workspace-base-branch.md | 7 +
AGENTS.md | 1 +
docs/task-management.md | 2 +-
docs/workspaces.md | 8 +-
packages/core/src/types/task/task-core.ts | 12 ++
.../dashboard/app/components/TaskDetailModal.css | 14 ++
.../app/components/WorkspaceWorktreesSummary.tsx | 2 +
.../__tests__/WorkspaceWorktreesSummary.test.tsx | 13 ++
.../src/routes/register-task-workflow-routes.ts | 2 +
.../task-revert.workspace.real-git.test.ts | 25 +++
.../src/__tests__/workspace-base-branch.test.ts | 93 +++++++++++
.../worktree-acquisition-workspace.test.ts | 27 ++++
packages/engine/src/execution/task-revert.ts | 58 +++++--
packages/engine/src/merge/merger-ai.ts | 30 +++-
packages/engine/src/self-healing.ts | 50 +++++-
packages/engine/src/util/run-audit.ts | 6 +
.../engine/src/worktree/workspace-base-branch.ts | 180 +++++++++++++++++++++
.../engine/src/worktree/worktree-acquisition.ts | 62 ++++---
18 files changed, 548 insertions(+), 44 deletions(-)
Fusion-Task-Id: FN-9164
Fusion-Task-Lineage: 487a1c77-32cb-47dd-bf43-297a146951ba
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>