fix(FN-4379): honor paused tasks in orphan-only recovery
Fusion-Task-Id: FN-4379 Fusion-Task-Lineage: 88ee0f49-1db2-40e6-8781-7ecbc4dcbdc8
This commit is contained in:
@@ -2322,6 +2322,7 @@ export class SelfHealingManager {
|
|||||||
const tasks = await this.store.listTasks({ column: "in-review", slim: true });
|
const tasks = await this.store.listTasks({ column: "in-review", slim: true });
|
||||||
const candidates = tasks.filter((task) =>
|
const candidates = tasks.filter((task) =>
|
||||||
task.column === "in-review" &&
|
task.column === "in-review" &&
|
||||||
|
!task.paused &&
|
||||||
task.status === "failed" &&
|
task.status === "failed" &&
|
||||||
task.scopeOverride !== true &&
|
task.scopeOverride !== true &&
|
||||||
task.mergeDetails?.mergeConfirmed !== true &&
|
task.mergeDetails?.mergeConfirmed !== true &&
|
||||||
@@ -2333,9 +2334,8 @@ export class SelfHealingManager {
|
|||||||
let recovered = 0;
|
let recovered = 0;
|
||||||
for (const task of candidates) {
|
for (const task of candidates) {
|
||||||
try {
|
try {
|
||||||
const getAgentLogs = (this.store as { getAgentLogs?: (taskId: string, options?: { limit?: number; offset?: number }) => Promise<Array<{ type: string; detail?: string }>> }).getAgentLogs;
|
const recentLogs = "getAgentLogs" in this.store && typeof this.store.getAgentLogs === "function"
|
||||||
const recentLogs = typeof getAgentLogs === "function"
|
? await this.store.getAgentLogs(task.id, { limit: 50 })
|
||||||
? await getAgentLogs.call(this.store, task.id, { limit: 50 })
|
|
||||||
: [];
|
: [];
|
||||||
const scopeViolationLog = recentLogs.find((entry) =>
|
const scopeViolationLog = recentLogs.find((entry) =>
|
||||||
entry.type === "tool_error" &&
|
entry.type === "tool_error" &&
|
||||||
|
|||||||
Reference in New Issue
Block a user