fix(FN-4485): preserve userPaused intent during reclaim sweep
Fusion-Task-Id: FN-4485 Fusion-Task-Lineage: 034088dc-ebc4-4e12-8314-39419d41b23f
This commit is contained in:
@@ -107,4 +107,19 @@ describe("self-healing reclaim paused review", () => {
|
||||
expect(recovered).toBe(0);
|
||||
expect(inspectSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("does not reclaim userPaused tasks even when pausedReason is branch-conflict-unrecoverable", async () => {
|
||||
(store.listTasks as any)
|
||||
.mockResolvedValueOnce([])
|
||||
.mockResolvedValueOnce([
|
||||
{ id: "FN-4490", column: "in-progress", checkedOutBy: null, branch: "fusion/fn-4490", worktree: "/tmp/fn-4490", userPaused: true, paused: true, pausedReason: "branch-conflict-unrecoverable" },
|
||||
])
|
||||
.mockResolvedValueOnce([]);
|
||||
|
||||
const inspectSpy = vi.spyOn(branchConflicts, "inspectBranchConflict");
|
||||
const recovered = await manager.reclaimSelfOwnedBranchConflicts();
|
||||
|
||||
expect(recovered).toBe(0);
|
||||
expect(inspectSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1428,7 +1428,7 @@ export class SelfHealingManager {
|
||||
let recovered = 0;
|
||||
for (const task of candidates) {
|
||||
if (task.checkedOutBy || activeTaskIds.has(task.id.toUpperCase()) || !task.branch || !task.worktree) continue;
|
||||
if (task.userPaused && task.pausedReason !== "branch-conflict-unrecoverable") continue;
|
||||
if (task.userPaused) continue;
|
||||
if (!await isUsableTaskWorktree(this.options.rootDir, task.worktree)) continue;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user