fix(FN-4606): stabilize resolver callsites and test expectations

Ref: Runfusion/Fusion#321
Fusion-Task-Id: FN-4606
Fusion-Task-Lineage: 94b23f37-944e-4bcd-bfa1-67d0a8c0a267
This commit is contained in:
Fusion
2026-05-15 08:55:33 -07:00
committed by gsxdsm
parent edfd6e42ac
commit a8bde08d26
5 changed files with 7 additions and 6 deletions

View File

@@ -357,7 +357,7 @@ describe("TaskExecutor worktree naming", () => {
worktree: "/tmp/test/.worktrees/swift-falcon",
branch: "fusion/fn-030",
});
expect(mockedGenerateWorktreeName).toHaveBeenCalledWith("/tmp/test");
expect(mockedGenerateWorktreeName).toHaveBeenCalledWith("/tmp/test", expect.any(Object));
});
it("does NOT use task ID as worktree directory name for fresh worktrees", async () => {
@@ -421,7 +421,7 @@ describe("TaskExecutor worktree naming", () => {
await executor.execute(makeTask("FN-032", stalePath));
expect(store.updateTask).toHaveBeenCalledWith("FN-032", { worktree: null, branch: null });
expect(mockedGenerateWorktreeName).toHaveBeenCalledWith("/tmp/test");
expect(mockedGenerateWorktreeName).toHaveBeenCalledWith("/tmp/test", expect.any(Object));
const worktreeAddCalls = mockedExecSync.mock.calls.filter(
(call) => typeof call[0] === "string" && call[0].includes("git worktree add"),
);
@@ -524,7 +524,7 @@ describe("TaskExecutor worktree naming", () => {
worktree: "/tmp/test/.worktrees/swift-falcon",
branch: "fusion/fn-045",
});
expect(mockedGenerateWorktreeName).toHaveBeenCalledWith("/tmp/test");
expect(mockedGenerateWorktreeName).toHaveBeenCalledWith("/tmp/test", expect.any(Object));
});
it("defaults to random naming when worktreeNaming is undefined", async () => {
@@ -546,7 +546,7 @@ describe("TaskExecutor worktree naming", () => {
worktree: "/tmp/test/.worktrees/swift-falcon",
branch: "fusion/fn-046",
});
expect(mockedGenerateWorktreeName).toHaveBeenCalledWith("/tmp/test");
expect(mockedGenerateWorktreeName).toHaveBeenCalledWith("/tmp/test", expect.any(Object));
});
it("ignores worktreeNaming setting when using pooled worktree (recycle mode)", async () => {