fix(FN-1284): move terminal execution failures to in-review

- Move single-session and step-session executor failure paths to in-review after marking tasks failed
- Route exhausted transient recovery retries to in-review instead of leaving tasks outside review flow
- Move stuck-kill budget exhaustion failures in self-healing to in-review and update failure log wording
- Add regression tests in executor and self-healing suites to verify in-review transitions on these failure states
This commit is contained in:
gsxdsm
2026-04-08 11:01:04 -07:00
parent 4f48d2d186
commit 03ac3258a7
4 changed files with 41 additions and 7 deletions

View File

@@ -975,11 +975,15 @@ export class TaskExecutor {
recoveryRetryCount: null,
nextRecoveryAt: null,
});
await this.store.moveTask(task.id, "in-review");
executorLog.log(`${task.id} transient retries exhausted → in-review`);
this.options.onError?.(task, err);
} else {
executorLog.error(`${task.id} step-session execution failed:`, err.message);
await this.store.logEntry(task.id, `Step-session execution failed: ${err.message}`);
await this.store.updateTask(task.id, { status: "failed", error: err.message });
await this.store.moveTask(task.id, "in-review");
executorLog.log(`${task.id} step-session execution failed → in-review`);
this.options.onError?.(task, err);
}
} finally {
@@ -1514,12 +1518,16 @@ export class TaskExecutor {
recoveryRetryCount: null,
nextRecoveryAt: null,
});
await this.store.moveTask(task.id, "in-review");
executorLog.log(`${task.id} transient retries exhausted → in-review`);
this.options.onError?.(task, err);
return;
}
executorLog.error(`${task.id} execution failed:`, err.message);
await this.store.logEntry(task.id, `Execution failed: ${err.message}`);
await this.store.updateTask(task.id, { status: "failed", error: err.message });
await this.store.moveTask(task.id, "in-review");
executorLog.log(`${task.id} execution failed → in-review`);
this.options.onError?.(task, err);
}
} finally {