fix(FN-4476): handle fully-subsumed branch conflicts across reclaim paths

Fusion-Task-Id: FN-4476
Fusion-Task-Lineage: 8673c1d9-f47e-4d02-89e6-646040b9be32
This commit is contained in:
Fusion
2026-05-14 08:21:15 -07:00
committed by gsxdsm
parent ab4729099c
commit d8255c2bb0
4 changed files with 116 additions and 4 deletions

View File

@@ -286,6 +286,19 @@ export class WorktreePool {
};
}
if (inspection.kind === "fully-subsumed") {
worktreePoolLog.log(
`reclaimed fully-subsumed branch conflict for ${branchName}: tip=${inspection.tipSha} strandedSince${base}=0`,
);
return {
branch: branchName,
worktreePath: inspection.livePath,
reclaimed: true,
existingTipSha: inspection.tipSha,
strandedCommitCount: 0,
};
}
if (!options?.allowSiblingBranchRename) {
if (inspection.kind === "live-foreign") {
throw inspection.error;