From 86bc42585b38ed88588b8f4a88cef3a2daab3438 Mon Sep 17 00:00:00 2001 From: Dotta Date: Thu, 12 Nov 2026 15:19:46 -0600 Subject: [PATCH] test(recovery): admission keeps a fresh isolated continuation of a projectless task runnable Co-Authored-By: Claude Opus 5.5 --- server/src/__tests__/execution-workspace-policy.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/src/__tests__/execution-workspace-policy.test.ts b/server/src/__tests__/execution-workspace-policy.test.ts index e44ea327f3a..6253cba8841 100644 --- a/server/src/__tests__/execution-workspace-policy.test.ts +++ b/server/src/__tests__/execution-workspace-policy.test.ts @@ -154,6 +154,14 @@ describe("execution workspace policy helpers", () => { ).toEqual({ type: "git_worktree", existingBranch: "PAP-14754-run-redaction" }); }); + it("admits a fresh isolated continuation of a projectless task whose binding the fallback cleared", () => { + const issue = { projectId: null, projectWorkspaceId: null, executionWorkspaceId: null, + executionWorkspacePreference: "reuse_existing" }; + expect(isUnrunnableWorktreeCombo({ issue, resolvedMode: "isolated_workspace", resolvedStrategy: "git_worktree" })).toBe(true); + expect(isUnrunnableWorktreeCombo({ issue, resolvedMode: "isolated_workspace", resolvedStrategy: "git_worktree", + freshIsolatedContinuation: true })).toBe(false); + }); + it("centralizes unrunnable isolated worktree detection", () => { expect( isUnrunnableWorktreeCombo({