From c9736009eccfb214ca50b7f4e468868923f7c7aa Mon Sep 17 00:00:00 2001 From: yelgabo Date: Sun, 1 Nov 2026 17:17:20 -0800 Subject: [PATCH 1/2] fix(server): use native paths in real filesystem startup tests --- .../ProviderTurnStartService.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts b/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts index 05fc1b8545bb..5eca90709083 100644 --- a/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts +++ b/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts @@ -65,9 +65,9 @@ const normalize = (target: string) => { } return `/${parts.join("/")}`; }; -const layerWorktreeLocation = (worktreesDir = managedWorktreesDir) => +const layerWorktreeLocation = (worktreesDir = managedWorktreesDir, pathLayer = Path.layer) => Layer.mergeAll( - Path.layer, + pathLayer, Layer.mock(ServerConfig.ServerConfig)({ worktreesDir } as ServerConfig.ServerConfig["Service"]), ServerSettings.layerTest(), ); @@ -272,6 +272,7 @@ function makeLocalCommandHarness(input: { readonly workspaceRoot?: string; readonly gitWorkflow?: GitWorkflow.GitWorkflowService["Service"]; readonly fileSystem?: FileSystem.FileSystem; + readonly path?: Path.Path; readonly previousNativeSession?: boolean; readonly previousMessages?: ReadonlyArray; readonly logoutFailure?: string; @@ -893,7 +894,10 @@ function makeLocalCommandHarness(input: { }), }), IdAllocator.layer, - layerWorktreeLocation(input.worktreesDir), + layerWorktreeLocation( + input.worktreesDir, + input.path === undefined ? Path.layer : Layer.succeed(Path.Path, input.path), + ), input.fileSystem === undefined ? FileSystem.layerNoop({ exists: () => Effect.succeed(true) }) : Layer.succeed(FileSystem.FileSystem, input.fileSystem), @@ -1082,6 +1086,7 @@ effectIt.effect( worktreePath, worktreesDir, fileSystem, + path, gitWorkflow, failReadsAfterRunning: true, }); @@ -1136,6 +1141,7 @@ effectIt.effect( worktreesDir, worktreePath, fileSystem, + path, failReadsAfterRunning: true, }); harness.createWorktree.mockImplementationOnce(() => Effect.interrupt); @@ -1368,6 +1374,7 @@ effectIt.effect.each(["cleanup-first", "startup-first"])( worktreePath, worktreesDir: workspaceRoot, fileSystem, + path, failReadsAfterRunning: true, }); harness.createWorktree.mockImplementation(() => From feb3060f071495f4d5dcd9a7ca83c9374b147ff2 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 14 Nov 2026 11:34:47 +0000 Subject: [PATCH 2/2] fix(server): give the leftover-worktree test the native Path too Co-Authored-By: Claude Opus 5.5 --- .../server/src/orchestration-v2/ProviderTurnStartService.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts b/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts index 375ca020a804..8e9069e6ca0a 100644 --- a/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts +++ b/apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts @@ -1429,6 +1429,7 @@ effectIt.effect("leaves a managed worktree folder without .git that holds user f worktreePath, worktreesDir, fileSystem, + path, failReadsAfterRunning: true, }); yield* harness.start;