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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user