feat(FN-5349): add integration branch resolver with auto-recovery fallback

FN-5349 adds a dedicated integration branch resolution module (`packages/engine/src/integration-branch.ts`) replacing ad-hoc dynamic fallbacks, routes merger branch conflict resolution through it, wires auto-recovery handlers (branch-worktree, contamination) to use integration branch fallback, and w

Fusion-Task-Id: FN-5349
This commit is contained in:
Fusion (runfusion.ai)
2026-05-21 12:04:19 -07:00
committed by gsxdsm
parent e58530aa37
commit 79850b233f
28 changed files with 525 additions and 50 deletions

View File

@@ -61,7 +61,7 @@ describe("reliability interaction: foreign-only contamination recovery", () => {
baseCommitSha: baseSha,
baseBranch: "main",
executionStartBranch: "fusion/fn-y",
} as any, { repoDir, taskStore: store, runAudit });
} as any, { repoDir, taskStore: store, runAudit, integrationBranch: "main" });
expect(result.recovered).toBe(true);
expect(["reanchor", "branch-discard"]).toContain(result.subtype);
@@ -90,7 +90,7 @@ describe("reliability interaction: foreign-only contamination recovery", () => {
baseCommitSha: baseSha,
baseBranch: "main",
executionStartBranch: "fusion/fn-y",
} as any, { repoDir, taskStore: store, runAudit });
} as any, { repoDir, taskStore: store, runAudit, integrationBranch: "main" });
expect(result.recovered).toBe(false);
expect(result.reason).toBe("active-session");