test(FN-4397): align worktree conflict tests with stale-resolved + tripwire assertions

Fusion-Task-Id: FN-4397
Fusion-Task-Lineage: 1ffac4f7-adf5-4115-b588-108d75eadde7
This commit is contained in:
Fusion
2026-05-13 16:25:15 -07:00
committed by gsxdsm
parent bb65002842
commit 1941d2133e
2 changed files with 9 additions and 1 deletions

View File

@@ -885,7 +885,7 @@ describe("TaskExecutor worktree recovery", () => {
} }
expect(handleSpy).toHaveBeenCalledTimes(5); expect(handleSpy).toHaveBeenCalledTimes(5);
const tripwireLogCall = vi.mocked(store.logEntry).mock.calls.find((call) => const tripwireLogCall = vi.mocked(store.logEntry).mock.calls.find((call: unknown[]) =>
call[0] === "FN-050" && String(call[1]).includes("Branch conflict tripwire fired after 6 events"), call[0] === "FN-050" && String(call[1]).includes("Branch conflict tripwire fired after 6 events"),
); );
expect(tripwireLogCall).toBeDefined(); expect(tripwireLogCall).toBeDefined();

View File

@@ -276,6 +276,14 @@ describe("WorktreePool", () => {
); );
throw err; throw err;
} }
if (cmdStr === "git worktree list --porcelain") {
return Buffer.from([
"worktree /other/wt",
"HEAD 1111111",
"branch refs/heads/fusion/fn-042",
"",
].join("\n"));
}
if (cmdStr.includes("git rev-parse --verify 'fusion/fn-042^{commit}'")) { if (cmdStr.includes("git rev-parse --verify 'fusion/fn-042^{commit}'")) {
return Buffer.from("abc123def456\n"); return Buffer.from("abc123def456\n");
} }