feat(FN-4625): complete Step 7 — verification and docs updates

Fusion-Task-Id: FN-4625
Fusion-Task-Lineage: c1d9b414-b5dd-4786-ba51-0b8adec4acf5
This commit is contained in:
Fusion (runfusion.ai)
2026-05-15 20:53:07 -07:00
committed by gsxdsm
parent 7c364da077
commit 8b371bae04
4 changed files with 17 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ describe("acquireTaskWorktree backend wiring", () => {
const task = { id: "FN-1", title: "Task", description: "Desc", branch: null, worktree: null } as any;
const store = {
updateTask: vi.fn().mockResolvedValue(undefined),
pauseTask: vi.fn().mockResolvedValue(undefined),
logEntry: vi.fn().mockResolvedValue(undefined),
} as any;
@@ -30,6 +31,7 @@ describe("acquireTaskWorktree backend wiring", () => {
execMock.mockReset();
store.updateTask.mockClear();
store.logEntry.mockClear();
store.pauseTask.mockClear();
});
it("uses native backend by default and emits no worktrunk audit", async () => {

View File

@@ -21,6 +21,7 @@ import {
} from "./worktrunk-installer.js";
import {
handleWorktrunkOperationFailure,
type WorktreeOperationResult,
type WorktrunkOpName,
} from "./worktrunk-failure-handler.js";
import type { RunAuditor } from "./run-audit.js";
@@ -125,7 +126,7 @@ export async function acquireTaskWorktree(opts: AcquireTaskWorktreeOptions): Pro
runContext,
runAudit: audit,
notify: ({ op: failedOp, stderr: failedStderr }) => notifyFallback(failedOp, failedStderr),
nativeFallback: nativeFallback as (() => Promise<any>) | undefined,
nativeFallback: nativeFallback as (() => Promise<WorktreeOperationResult>) | undefined,
});
if (disposition.kind === "fallback-native") {
return disposition.result;