fix(FN-1952): recover failed review tasks

This commit is contained in:
gsxdsm
2026-04-16 20:52:50 -07:00
parent 95ced20e40
commit a313037cca
15 changed files with 314 additions and 50 deletions

View File

@@ -639,8 +639,17 @@ export async function runTaskRetry(id: string, projectName?: string) {
throw new Error(`Task ${id} is not in a retryable state (status: ${task.status || 'none'})`);
}
// Clear failure state
await store.updateTask(id, { status: null, error: null });
// Clear failure state and stale branch refs so retry can choose a fresh base.
await store.updateTask(id, {
status: null,
error: null,
worktree: null,
branch: null,
baseBranch: null,
baseCommitSha: null,
recoveryRetryCount: null,
nextRecoveryAt: null,
});
// Move to todo column
await store.moveTask(id, 'todo');