feat(FN-5485): clear userPaused state on manual retry reset with regression

Adds retry-reset logic that clears the user-paused flag on tasks, ensuring they can resume automatically after a retry is triggered, with regression tests covering the behavior across the CLI extension and core manual-reset module.

Fusion-Task-Id: FN-5485
This commit is contained in:
Fusion (runfusion.ai)
2026-05-22 08:16:49 -07:00
committed by gsxdsm
parent 2d661df870
commit 4b484fd818
5 changed files with 83 additions and 46 deletions

View File

@@ -2522,6 +2522,31 @@ describe("fn pi extension (runnable structured-output regression slice)", () =>
expectRetryCountersReset(updated);
expect(updated?.mergeRetries).toBe(0);
});
it("clears userPaused when retrying a manually paused failed task", async () => {
const store = new TaskStore(tmpDir);
await store.init();
const task = await store.createTask({
title: "manually paused failed task",
description: "test",
column: "todo",
});
await store.updateTask(task.id, {
status: "failed",
error: "verification failed",
userPaused: true,
});
const retryTool = api.tools.get("fn_task_retry")!;
const result = await retryTool.execute("retry-user-paused", { id: task.id }, undefined, undefined, makeCtx(tmpDir));
expect(result.isError).toBeFalsy();
const updated = await store.getTask(task.id);
expect(updated?.column).toBe("todo");
expect(updated?.status).toBeFalsy();
expect(updated?.userPaused).toBeUndefined();
});
});
describe("fn_list_agents", () => {