fix(FN-4086): clarify recovered-task origin state logging
Fusion-Task-Id: FN-4086 Fusion-Task-Lineage: b2338fbc-960c-4540-9c19-216462525f0c
This commit is contained in:
@@ -2120,12 +2120,13 @@ export class TaskExecutor {
|
||||
return false;
|
||||
}
|
||||
await this.persistTokenUsage(task.id);
|
||||
if (task.column === "todo") {
|
||||
const originColumn = task.column;
|
||||
if (originColumn === "todo") {
|
||||
await this.store.moveTask(task.id, "in-progress");
|
||||
}
|
||||
await this.store.moveTask(task.id, "in-review");
|
||||
this.clearCompletedTaskWatchdog(task.id);
|
||||
await this.store.logEntry(task.id, "Auto-recovered: task work was complete but stuck in in-progress — moved to in-review");
|
||||
await this.store.logEntry(task.id, `Auto-recovered: task work was complete but stranded in ${originColumn} — moved to in-review`);
|
||||
executorLog.log(`✓ ${task.id} auto-recovered completed task → in-review`);
|
||||
this.options.onComplete?.(task);
|
||||
return true;
|
||||
|
||||
@@ -84,13 +84,12 @@ export interface SelfHealingOptions {
|
||||
/** Canonical stale-lease recovery manager. */
|
||||
leaseManager?: MeshLeaseManager;
|
||||
/**
|
||||
* Callback to recover a completed task that is stuck in in-progress.
|
||||
* Called by the periodic maintenance cycle when it detects a task whose
|
||||
* work is done but was never transitioned to in-review (e.g., killed by
|
||||
* stuck detector after task_done but before moveTask).
|
||||
* Callback to recover a completed task that is stranded in todo/in-progress.
|
||||
* Called by periodic self-healing passes when task work is complete but the
|
||||
* final transition never happened (for example killed after task_done).
|
||||
*
|
||||
* Should return true if the task was successfully transitioned out of
|
||||
* in-progress, false if recovery failed.
|
||||
* Should return true if the task was successfully transitioned, false if
|
||||
* recovery failed.
|
||||
*/
|
||||
recoverCompletedTask?: (task: Task) => Promise<boolean>;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user