feat(FN-5329): remove orphan rescue and branch-recovery primitives from eng

Removes the branch-recovery CLI surface, orphan-rescue engine primitives, and their associated tests (over 1,500 lines deleted), while restoring a minimal prune-only orphan branch sweep with proper git audit mutation types. Documentation across `cli-reference.md`, `task-management.md`, and `AGENTS.m

Fusion-Task-Id: FN-5329
This commit is contained in:
Fusion (runfusion.ai)
2026-05-20 16:42:50 -07:00
committed by gsxdsm
parent 0e5cb4d292
commit fd202e9356
33 changed files with 131 additions and 1644 deletions

View File

@@ -3,12 +3,11 @@ import { EventEmitter } from "node:events";
import type { RunAuditEventInput, Settings, TaskStore } from "@fusion/core";
import { SelfHealingManager } from "../../self-healing.js";
const { execSpy, execSyncSpy, resolveBackendSpy, scanIdleSpy, scanOrphanedBranchesSpy, readdirSpy, existsSpy, inspectBranchConflictSpy } = vi.hoisted(() => ({
const { execSpy, execSyncSpy, resolveBackendSpy, scanIdleSpy, readdirSpy, existsSpy, inspectBranchConflictSpy } = vi.hoisted(() => ({
execSpy: vi.fn(),
execSyncSpy: vi.fn(),
resolveBackendSpy: vi.fn(),
scanIdleSpy: vi.fn(),
scanOrphanedBranchesSpy: vi.fn().mockResolvedValue([]),
readdirSpy: vi.fn(),
existsSpy: vi.fn().mockReturnValue(false),
inspectBranchConflictSpy: vi.fn(),
@@ -38,7 +37,6 @@ vi.mock("../../worktree-pool.js", async () => {
...actual,
resolveWorktreeBackend: resolveBackendSpy,
scanIdleWorktrees: scanIdleSpy,
scanOrphanedBranches: scanOrphanedBranchesSpy,
isUsableTaskWorktree: vi.fn().mockResolvedValue(true),
};
});
@@ -93,8 +91,6 @@ describe("reliability interactions: worktrunk x self-healing", () => {
execSyncSpy.mockReset();
resolveBackendSpy.mockReset();
scanIdleSpy.mockReset();
scanOrphanedBranchesSpy.mockReset();
scanOrphanedBranchesSpy.mockResolvedValue([]);
readdirSpy.mockReset();
existsSpy.mockReset();
existsSpy.mockReturnValue(false);