fix(FN-2356): improve pre-merge rebase abort observability
- Log explicit warning details when pre-merge `git rebase --abort` cleanup fails - Keep merger fallback behavior intact so smart/AI merge still proceeds after rebase issues - Add merger tests covering successful abort execution in the task worktree after rebase conflict - Add regression test asserting abort failure warnings include stderr details while merge continues
This commit is contained in:
@@ -1905,7 +1905,11 @@ export async function aiMergeTask(
|
||||
const msg = rebaseErr instanceof Error ? rebaseErr.message : String(rebaseErr);
|
||||
mergerLog.warn(`${taskId}: pre-merge rebase failed (${msg}) — aborting rebase and falling through to smart/AI merge`);
|
||||
if (worktreePath) {
|
||||
await execAsync("git rebase --abort", { cwd: worktreePath }).catch(() => {});
|
||||
try {
|
||||
await execAsync("git rebase --abort", { cwd: worktreePath });
|
||||
} catch (abortError: unknown) {
|
||||
mergerLog.warn(`${taskId}: failed to abort pre-merge rebase: ${getCommandErrorMessage(abortError)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user