From 26d7b249e12155fb7137ae554f75e6b3e4a0268f Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Tue, 17 Nov 2026 06:27:53 -0800 Subject: [PATCH] test: remove low-value WSL and identity lookup tests (#43621) Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> --- .../identity/pane-agent-identities.test.ts | 53 ------------------- .../wsl-interop-spawn-directory.test.ts | 9 ---- 2 files changed, 62 deletions(-) diff --git a/src/main/agent-hooks/identity/pane-agent-identities.test.ts b/src/main/agent-hooks/identity/pane-agent-identities.test.ts index 2917122f673..9b19dd6176b 100644 --- a/src/main/agent-hooks/identity/pane-agent-identities.test.ts +++ b/src/main/agent-hooks/identity/pane-agent-identities.test.ts @@ -417,59 +417,6 @@ it('answers unavailable when the worker cannot load, or is stopped while loading await vi.waitFor(() => expect(workers.every(exited)).toBe(true)) }) -describe('PaneAgentIdentities explicit lookups', () => { - it.each([12, 120])( - 'asks the store once for %i simultaneous callers of one id', - async (callers) => { - const client = new InProcessAgentIdentityClient() - const { identities } = inProcessService(databasePath(), client) - const id = await identities.identify(sighting({ id: 'dormant' })) - client.hasRequests = 0 - - const answers = await Promise.all( - Array.from({ length: callers }, () => identities.isTerminalIdentity(id!)) - ) - - expect(answers.every((known) => known === true)).toBe(true) - expect(client.hasRequests).toBe(1) - } - ) - - it('answers reverse lookups only through their indexes, once a busy writer lets them be built', () => { - const path = databasePath() - const store = new AgentIdentityStore(path) - opened.push(store) - const id = store.identify({ - executionHost: 'local', - wslDistro: '', - agent: 'claude', - providerSessionId: 'session-a', - locator: '' - }) - const writer = new SyncDatabase(path) - opened.push(writer) - writer.exec('BEGIN IMMEDIATE') - // Never a scan of every link: a store that cannot build the indexes cannot answer yet. - expect(() => store.providerKeyOf(id!)).toThrow() - writer.exec('COMMIT') - - expect(store.providerKeyOf(id!)).toMatchObject({ providerSessionId: 'session-a' }) - expect(store.idsOfProviderSession('session-a')).toEqual([id]) - const plans = [ - 'SELECT locator FROM provider_links WHERE orca_session_id = ?', - 'SELECT DISTINCT orca_session_id FROM provider_links WHERE provider_session_id = ?' - ].map((sql) => - writer - .prepare(`EXPLAIN QUERY PLAN ${sql}`) - .all('x') - .map((row) => String(row.detail)) - .join('; ') - ) - expect(plans[0]).toContain('USING INDEX provider_links_by_orca_session') - expect(plans[1]).toContain('USING INDEX provider_links_by_provider_session') - }) -}) - /** A newer build's read-only identity file with `links` links and only `indexSql`'s indexes. */ function newerReadOnlyFile(links: number, indexSql: string[]) { const path = databasePath() diff --git a/src/main/wsl/execution/wsl-interop-spawn-directory.test.ts b/src/main/wsl/execution/wsl-interop-spawn-directory.test.ts index 504359c7b0c..c7fab8c7e4d 100644 --- a/src/main/wsl/execution/wsl-interop-spawn-directory.test.ts +++ b/src/main/wsl/execution/wsl-interop-spawn-directory.test.ts @@ -60,15 +60,6 @@ describe('resolveWslInteropSpawnCwd', () => { expect(resolveWslInteropSpawnCwd()).toBe(systemRoot) }) - it('never falls back to the profile or user folder when no system directory resolves', () => { - const profile = makeExistingDirectory() - const userFolder = makeExistingDirectory() - process.env.ORCA_USER_DATA_PATH = profile - process.env.USERPROFILE = userFolder - - expect([profile, userFolder]).not.toContain(resolveWslInteropSpawnCwd()) - }) - it('skips a candidate that does not resolve instead of naming it', () => { process.env.SystemRoot = join(tmpdir(), 'orca-wsl-spawn-cwd-never-created') const windir = makeExistingDirectory()