From 7b26725ff4b38e1981ad2e1153118fa24faa7ac3 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Wed, 7 Oct 2026 13:39:28 -0700 Subject: [PATCH] Keep native watcher contracts in Node and reset runtime test caches (#26315) * test: keep native filesystem watcher contract under Node * test: reset canonical repository keys with runtime mocks --- config/scripts/vitest-node-runtime-files.mjs | 1 + src/main/runtime/orca-runtime-test-lifecycle.spec.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/config/scripts/vitest-node-runtime-files.mjs b/config/scripts/vitest-node-runtime-files.mjs index 791e38f209f..09029f3c6d2 100644 --- a/config/scripts/vitest-node-runtime-files.mjs +++ b/config/scripts/vitest-node-runtime-files.mjs @@ -84,6 +84,7 @@ export const NODE_RUNTIME_INCLUDE = [ 'src/main/runtime/structured-agent-session-startup-tab-restore.test.ts', 'src/shared/remote-runtime-shared-control-connection.test.ts', 'src/main/runtime/relay/relay-control-client.test.ts', + 'src/main/ipc/filesystem-watcher-ignore-real.test.ts', 'src/main/ipc/runtime-environment-preference.test.ts', 'src/main/ipc/runtime-environment-transport-routing-tailscale-hint.test.ts', 'src/renderer/src/components/emulator-pane/emulator-device-frame-visibility.test.tsx', diff --git a/src/main/runtime/orca-runtime-test-lifecycle.spec.ts b/src/main/runtime/orca-runtime-test-lifecycle.spec.ts index 413035af509..522a1ca2ac5 100644 --- a/src/main/runtime/orca-runtime-test-lifecycle.spec.ts +++ b/src/main/runtime/orca-runtime-test-lifecycle.spec.ts @@ -1,6 +1,7 @@ import * as mocks from './orca-runtime-test-mocks.spec' import { awaitBackgroundRemovalsInRuntimeTests } from './orca-runtime-background-removal-test-support' import { _resetPendingWorktreeRemovalsForTests } from '../worktree-background-removal' +import { _resetCanonicalRepoKeyCacheForTests } from '../git/canonical-repo-key' const { MOCK_GIT_WORKTREES, RuntimeBrowserCommands, _resetTerminalViewAttributesForTest } = mocks const { addGitHubIssueCommentMock, addGitHubPRReviewCommentMock } = mocks @@ -63,6 +64,7 @@ const { updateGitLabIssueMock, updateGitLabMRMock, updateGitLabMRReviewersMock, awaitBackgroundRemovalsInRuntimeTests(mocks.OrcaRuntimeService.prototype as never) function resetRuntimeTestMocks(): void { + _resetCanonicalRepoKeyCacheForTests() _resetPendingWorktreeRemovalsForTests() // Why: constructing the browser commands is what pulls the Chromium cluster in, so // production installs this at the Electron entry. A Node host installs none and the