From a5dfddf6fa2f396392f21faef7d48f6a3a9597bc Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 10 Sep 2026 18:16:35 -0700 Subject: [PATCH] test(runtime): supply the host home the SSH orphan-cleanup gate now requires The scenario registers an SSH filesystem provider directly. In production that provider is minted by the relay session that also reports the host's `$HOME`, so the test has to supply the other half rather than rely on the recursive-delete gate falling open on an unknown home. --- .../worktree-removal-and-reconciliation-part-03.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-03.spec.ts b/src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-03.spec.ts index 06982cf179e..9daec4aec70 100644 --- a/src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-03.spec.ts +++ b/src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-03.spec.ts @@ -35,6 +35,7 @@ import { store } from '../orca-runtime-test-fixtures.spec' import { createWorktreeRemovalRuntime } from '../orca-runtime-test-scenario-builders.spec' +import { setWorktreeRemovalSshHostHomeResolver } from '../../worktree-removal-execution-host-route' describe('OrcaRuntimeService', () => { it('force-deletes a preserved branch on the qualified host when repo ids collide', async () => { @@ -453,6 +454,10 @@ describe('OrcaRuntimeService', () => { } registerSshGitProvider(repo.connectionId, gitProvider as never) registerSshFilesystemProvider(repo.connectionId, fsProvider as never) + // The recursive-delete gate needs the execution host to have reported its `$HOME`. In + // production that comes from the same relay session that minted this fs provider; the test + // registers the provider directly, so it has to supply the other half. + setWorktreeRemovalSshHostHomeResolver(() => '/remote/home/alice') const runtime = new OrcaRuntimeService(runtimeStore as never, undefined, { getSshProvider: () => ptyProvider as never }) @@ -460,6 +465,7 @@ describe('OrcaRuntimeService', () => { try { await expect(runtime.removeManagedWorktree(`id:${worktreeId}`, true)).resolves.toEqual({}) } finally { + setWorktreeRemovalSshHostHomeResolver(() => null) unregisterSshGitProvider(repo.connectionId) unregisterSshFilesystemProvider(repo.connectionId) }