From 9a996cf16e203304097d071942675939fbefa4ed Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Tue, 3 Nov 2026 05:32:25 -0800 Subject: [PATCH 1/4] test: remove 16 low-value behavior and UI tests --- config/reliability-gates.jsonc | 2 +- config/scripts/ci-shard-timings.json | 1 - .../onboarding-folder-cancellation.test.ts | 5 +- ...t-cold-park-remote-subscriber.unit.test.ts | 32 -- ...paint-retention-remote-viewer.unit.test.ts | 89 ----- ...ent-background-session-remote.unit.test.ts | 309 +----------------- ...-agent-in-new-tab-web-runtime.unit.test.ts | 92 +----- .../e2e/linear-issue-view-persistence.spec.ts | 59 ---- .../e2e/macos-press-and-hold-startup.spec.ts | 10 - tests/e2e/markdown-nested-toggle.spec.ts | 30 -- .../multi-client-navigation-isolation.spec.ts | 52 --- 11 files changed, 9 insertions(+), 672 deletions(-) delete mode 100644 tests/e2e/host-guest-paint-retention-remote-viewer.unit.test.ts diff --git a/config/reliability-gates.jsonc b/config/reliability-gates.jsonc index d3f8eddb5494..d0f70c3fe34e 100644 --- a/config/reliability-gates.jsonc +++ b/config/reliability-gates.jsonc @@ -19637,7 +19637,7 @@ "providers": ["local-daemon", "ssh-daemon", "paired-runtime"], "coveredPlatforms": ["macos"], "coveredProviders": ["local-daemon", "paired-runtime"], - "coverageNotes": "Deterministic policy and multiplex tests separate renderer parking from authoritative stream liveness, while runtime-graph tests cover exact parked leaf, pane runtime ID, title, multi-pane active-leaf, disposal behavior, and queued split routing to an exact cold-parked tab. A real Electron journey runs the shipped dev CLI against the app's isolated profile, proves the exact parked target alone remounts under a bounded lease, completes before the historical 10-second timeout without stealing active tab or focus, re-parks, then reveals two stable-identity panes with independent keyboard/output round trips. Focused mirror-recovery tests preserve a verified binding across pending-handle snapshots, quarantine positive PTY-identity mismatches, accept authoritative ready replacement or removal, and fence recovery to the pairing revision. Daemon attach-only tests prove a replacement runtime re-registers one active session and one history writer. Headed cold-park and headless runtime-restart paired journeys prove rendered output, input, resize convergence, process identity, authoritative close, checkpoint continuity, and post-restart history append against real daemon PTYs. The parked-leaf graph fixture now retains only PTY exit during the park handoff gap. Its standalone exact leaf/title, multi-pane active-leaf and disposal assertions were removed. web-runtime-session.test.ts no longer supplies the eager worktree-switch/post-create recovery assertion. Those alarms are lost; the remaining cold-park and recovery journeys do not establish equivalent replacement coverage. Recovery references are narrowed to retained retry/absence confirmation, old-host-to-new-tab mirroring, adoption/list recovery, blocked local ownership changes, coalescing/overtaking/global concurrency, adoption-conflict serialization and pane-resolution retries. Stable unsupported/malformed adoption tables, supplied inventory/topology/identity and verified-binding shape examples were removed. Their separate alarms are lost; remaining compositions are not equivalent coverage. Historical executed commands and results remain historical.", + "coverageNotes": "Deterministic policy and multiplex tests separate renderer parking from authoritative stream liveness, while runtime-graph tests cover exact parked leaf, pane runtime ID, title, multi-pane active-leaf, disposal behavior, and queued split routing to an exact cold-parked tab. A real Electron journey runs the shipped dev CLI against the app's isolated profile, proves the exact parked target alone remounts under a bounded lease, completes before the historical 10-second timeout without stealing active tab or focus, re-parks, then reveals two stable-identity panes with independent keyboard/output round trips. Focused mirror-recovery tests preserve a verified binding across pending-handle snapshots, quarantine positive PTY-identity mismatches, accept authoritative ready replacement or removal, and fence recovery to the pairing revision. Daemon attach-only tests prove a replacement runtime re-registers one active session and one history writer. Headed cold-park and headless runtime-restart paired journeys prove rendered output, input, resize convergence, process identity, authoritative close, checkpoint continuity, and post-restart history append against real daemon PTYs. The parked-leaf graph fixture now retains only PTY exit during the park handoff gap. Its standalone exact leaf/title, multi-pane active-leaf and disposal assertions were removed. web-runtime-session.test.ts no longer supplies the eager worktree-switch/post-create recovery assertion. Those alarms are lost; the remaining cold-park and recovery journeys do not establish equivalent replacement coverage. Recovery references are narrowed to retained retry/absence confirmation, old-host-to-new-tab mirroring, adoption/list recovery, blocked local ownership changes, coalescing/overtaking/global concurrency, adoption-conflict serialization and pane-resolution retries. Stable unsupported/malformed adoption tables, supplied inventory/topology/identity and verified-binding shape examples were removed. Their separate alarms are lost; remaining compositions are not equivalent coverage. Historical executed commands and results remain historical. The separate Unsubscribe-to-raw-subscriber-veto-clear sample was removed. Its exact raw-presence transition alarm is lost; remaining fake-provider streaming/attachment checks and real paired journeys do not establish equivalent replacement coverage. The deterministic second subscription is a second live connection, not a disconnect/reconnect proof.", "motivatingLinks": [ "https://linear.app/stably/issue/STA-2854", "https://github.com/stablyai/orca/pull/15514", diff --git a/config/scripts/ci-shard-timings.json b/config/scripts/ci-shard-timings.json index 773fcb95830d..75b5155cc426 100644 --- a/config/scripts/ci-shard-timings.json +++ b/config/scripts/ci-shard-timings.json @@ -12899,7 +12899,6 @@ "tests/e2e/host-agent-launch-preferences-work.unit.test.ts": 3882, "tests/e2e/host-agent-launch-settings-hook-bookkeeping.unit.test.ts": 21972, "tests/e2e/host-cold-park-remote-subscriber.unit.test.ts": 5314, - "tests/e2e/host-guest-paint-retention-remote-viewer.unit.test.ts": 5382, "tests/e2e/journal-restored-consumers.unit.test.ts": 33933, "tests/e2e/launch-agent-background-session-remote.unit.test.ts": 1016, "tests/e2e/launch-agent-in-new-tab-web-runtime.unit.test.ts": 14288, diff --git a/src/renderer/src/lib/onboarding-folder-cancellation.test.ts b/src/renderer/src/lib/onboarding-folder-cancellation.test.ts index d1bd597f1424..4ee0cec51c1a 100644 --- a/src/renderer/src/lib/onboarding-folder-cancellation.test.ts +++ b/src/renderer/src/lib/onboarding-folder-cancellation.test.ts @@ -33,7 +33,10 @@ vi.mock('@/lib/telemetry', async (importOriginal) => ({ track: vi.fn() })) -beforeAll(loadWebRuntimeSessionTabsApplyModulesForTests) +beforeAll(async () => { + await loadWebRuntimeSessionTabsApplyModulesForTests() + await import('./onboarding-folder-agent-launch') +}) afterEach(() => { clearHostAgentMenuSettingsForTests() resetWebSessionTabsSnapshotFreshnessForTests() diff --git a/tests/e2e/host-cold-park-remote-subscriber.unit.test.ts b/tests/e2e/host-cold-park-remote-subscriber.unit.test.ts index 8bb8f5e32a8a..4a6810d595c3 100644 --- a/tests/e2e/host-cold-park-remote-subscriber.unit.test.ts +++ b/tests/e2e/host-cold-park-remote-subscriber.unit.test.ts @@ -235,38 +235,6 @@ describe('STA-2854 B: remote subscriber survives a fully unmounted host renderer expect(provider.attachCalls).toEqual([]) expect(errorFrames(reconnected)).toBe(0) }) - - it('counterfactual: losing every subscriber is what clears the thinning veto', async () => { - const runtime = new OrcaRuntimeService() - const provider = createHostProvider() - provider.bind(runtime) - runtime.setPtyController(provider.controller as never) - const record = internals(runtime).recordPtyWorktree(provider.ptyId, WORKTREE_ID, { - connected: true - }) - const handle = internals(runtime).issuePtyHandle(record) - vi.spyOn(runtime, 'requestRendererTerminalTabMount').mockReturnValue(false) - - const harness = startMultiplex(runtime, 'conn-counterfactual') - await vi.waitFor(() => expect(harness.handlers.has(0)).toBe(true)) - sendSubscribe(harness, 1, handle, 'client-b') - await waitForSubscribed(harness, 1) - expect(runtime.hasRawTerminalViewSubscriber(provider.ptyId)).toBe(true) - - harness.handlers.get(1)?.( - decodeTerminalStreamFrame( - encodeTerminalStreamFrame({ - opcode: TerminalStreamOpcode.Unsubscribe, - streamId: 1, - seq: 3, - payload: encodeTerminalStreamJson({}) - }) - )! - ) - await vi.waitFor(() => expect(runtime.hasRawTerminalViewSubscriber(provider.ptyId)).toBe(false)) - expect(provider.session.attached).toBe(true) - expect(provider.emitData('post-unsubscribe\r\n')).toBe(true) - }) }) describe('STA-2854 C: an unattached host PTY with no mountable renderer pane', () => { diff --git a/tests/e2e/host-guest-paint-retention-remote-viewer.unit.test.ts b/tests/e2e/host-guest-paint-retention-remote-viewer.unit.test.ts deleted file mode 100644 index cc7f76307a53..000000000000 --- a/tests/e2e/host-guest-paint-retention-remote-viewer.unit.test.ts +++ /dev/null @@ -1,89 +0,0 @@ -// Test runtime subscribers → reload IPC snapshots → isBrowserPagePanePaintable across main/renderer. -// Nonmobile remote viewers must retain guest paint after automation leases expire and the host looks elsewhere. -import { describe, expect, it, vi } from 'vitest' -import type { OrcaRuntimeService } from '../../src/main/runtime/orca-runtime' -import { - createScreencastHarness, - HARNESS_PAGE_ID as PAGE -} from '../../src/main/runtime/browser-screencast-subscriber-test-harness' -import { - hasMobileDriverForAnyBrowserPage, - hydrateBrowserDrivers -} from '../../src/renderer/src/lib/pane-manager/browser-mobile-driver-state' -import { - hasRemoteViewerForAnyBrowserPage, - hydrateBrowserRemoteViewerPages -} from '../../src/renderer/src/lib/pane-manager/browser-remote-viewer-state' -import { isBrowserPagePanePaintable } from '../../src/renderer/src/components/browser-pane/host-guest/browser-page-paintability' - -vi.mock('electron', () => ({ - ipcMain: { on: vi.fn(), removeListener: vi.fn(), handle: vi.fn(), removeHandler: vi.fn() }, - webContents: { fromId: vi.fn() } -})) - -function hostGuestIsPaintable( - runtime: OrcaRuntimeService, - hostIsLookingAtThisPage: boolean -): boolean { - hydrateBrowserDrivers( - [...runtime.getAllBrowserDrivers()].map(([browserPageId, driver]) => ({ - browserPageId, - driver - })) - ) - hydrateBrowserRemoteViewerPages(runtime.getBrowserRemoteViewerPages()) - return isBrowserPagePanePaintable({ - isActive: hostIsLookingAtThisPage, - // A completed automation command releases its bootstrap lease, which cannot retain the guest. - isAutomationVisible: false, - isMobileDriven: hasMobileDriverForAnyBrowserPage([PAGE]), - hasRemoteViewer: hasRemoteViewerForAnyBrowserPage([PAGE]) - }) -} - -describe('host guest paint retention for a remote screencast subscriber', () => { - it('keeps the guest painting for a phone subscriber while the host looks elsewhere', async () => { - const { runtime, subscribe } = createScreencastHarness() - const phone = subscribe({ connectionId: 'conn-phone', clientKind: 'mobile' }) - await phone.streaming() - expect(hostGuestIsPaintable(runtime, false)).toBe(true) - phone.stop() - await phone.done - }) - - it('keeps the guest painting for a paired desktop or web subscriber while the host looks elsewhere', async () => { - const { runtime, subscribe } = createScreencastHarness() - const desktop = subscribe({ connectionId: 'conn-desktop', clientKind: 'runtime' }) - await desktop.streaming() - expect(hostGuestIsPaintable(runtime, false)).toBe(true) - desktop.stop() - await desktop.done - }) - - it('keeps a co-viewing desktop client painting after the phone is taken back', async () => { - const { runtime, subscribe } = createScreencastHarness() - const phone = subscribe({ connectionId: 'conn-phone', clientKind: 'mobile' }) - await phone.streaming() - const desktop = subscribe({ connectionId: 'conn-desktop', clientKind: 'runtime' }) - await desktop.streaming() - - runtime.reclaimBrowserForDesktop(PAGE) - await phone.done - expect(hostGuestIsPaintable(runtime, false)).toBe(true) - - desktop.stop() - await desktop.done - }) - - it('parks the guest once nothing is watching and the host looks elsewhere', async () => { - const { runtime, subscribe } = createScreencastHarness() - const desktop = subscribe({ connectionId: 'conn-desktop', clientKind: 'runtime' }) - await desktop.streaming() - desktop.stop() - await desktop.done - - // Positive control: looking at the page must still make this same oracle paintable. - expect(hostGuestIsPaintable(runtime, true)).toBe(true) - expect(hostGuestIsPaintable(runtime, false)).toBe(false) - }) -}) diff --git a/tests/e2e/launch-agent-background-session-remote.unit.test.ts b/tests/e2e/launch-agent-background-session-remote.unit.test.ts index 7fd9d8e33915..910c67b4814c 100644 --- a/tests/e2e/launch-agent-background-session-remote.unit.test.ts +++ b/tests/e2e/launch-agent-background-session-remote.unit.test.ts @@ -1,11 +1,8 @@ import { projectAgentLaunchSettings } from '../../src/shared/agent-launch-settings' -import { - independentActionEffortPlan, - consumePreparedBackgroundCommand -} from './prepared-action-launch.test-fixture' -import { createRuntimeAgentBackgroundTerminal } from '../../src/renderer/src/lib/runtime-agent-background-create' +import './prepared-action-launch.test-fixture' +import '../../src/renderer/src/lib/runtime-agent-background-create' import { createCompatibleRuntimeStatusResponseIfNeeded } from '@/runtime/runtime-compatibility-test-fixture' -import { AGENT_SESSION_KEYBOARD_RUNTIME_CAPABILITY } from '../../src/shared/agent-session/agent-session-runtime-capabilities' +import '../../src/shared/agent-session/agent-session-runtime-capabilities' import { beforeEach, describe, expect, it, vi } from 'vitest' import { AGENT_BACKGROUND_SESSION_UUID_RE as UUID_RE, @@ -175,80 +172,6 @@ describe('launchAgentBackgroundSession remote runtime and SSH startup delivery', } }) - it.each(['claude', 'codex'] as const)( - 'delivers independent %s effort through the real prepared background callback', - async (agent) => { - useRemoteAgentBackgroundRuntime(state) - const plan = independentActionEffortPlan(agent) - const spawn = vi.fn[1]>(async () => ({ - handle: 'prepared-background', - worktreeId: 'wt-1', - title: null, - savedStartupCwd: 'private' - })) - mockRuntimeEnvironmentCall.mockImplementation(async (request) => { - if (request.method !== 'terminal.create') { - throw new Error(`Unexpected create route ${request.method}`) - } - return { ok: true, result: await consumePreparedBackgroundCommand(request.params, spawn) } - }) - await expect( - createRuntimeAgentBackgroundTerminal({ - environmentId: 'env-1', - worktreeId: 'wt-1', - tabId: 'reserved-tab', - leafId: 'reserved-leaf', - agent, - prompt: 'Fix checks', - sessionOptions: plan.sessionOptions, - legacy: { - command: plan.launchCommand, - env: plan.env ?? {}, - launchConfig: plan.launchConfig, - startupCommandDelivery: plan.startupCommandDelivery, - launchToken: 'reserved-token' - } - }) - ).resolves.toEqual({ - terminal: { handle: 'prepared-background', worktreeId: 'wt-1', title: null } - }) - expect(spawn).toHaveBeenCalledExactlyOnceWith('id:wt-1', { - // A paired client's terminal.create is the user's act (E9). - wslUserAct: true, - command: plan.launchCommand, - env: { ACTION_PROFILE: 'captured' }, - envToDelete: undefined, - launchConfig: plan.launchConfig, - launchAgent: agent, - startupCommandDelivery: agent === 'codex' ? 'shell-ready' : undefined, - terminalImageViewerSupported: false, - terminalKittyKeyboardProtocol: true, - title: undefined, - focus: false, - activate: false, - presentation: 'background', - tabId: 'reserved-tab', - leafId: 'reserved-leaf', - launchToken: 'reserved-token', - // A paired window's create can't be told from its pane remounts, so it never stamps Recent. - reopensPane: true, - preAllocatedHandle: 'reserved-handle' - }) - expect(mockSpawn).not.toHaveBeenCalled() - expect(mockRuntimeEnvironmentCall).toHaveBeenCalledExactlyOnceWith( - expect.objectContaining({ - method: 'terminal.create', - params: expect.objectContaining({ - tabId: 'reserved-tab', - leafId: 'reserved-leaf', - launchToken: 'reserved-token', - presentation: 'background' - }) - }) - ) - } - ) - it('closes a runtime terminal when its worktree disappears before creation resolves', async () => { useRemoteAgentBackgroundRuntime(state) let resolveCreate!: (result: { @@ -303,136 +226,6 @@ describe('launchAgentBackgroundSession remote runtime and SSH startup delivery', expect(mockDispatchEvent).not.toHaveBeenCalled() }) - it.each(['claude', 'codex'] as const)( - 'has the relay type the %s launch line instead of writing it from the renderer', - async (agent) => { - vi.useFakeTimers() - try { - state.repos = [{ id: 'repo-1', connectionId: 'ssh-1', path: '/repo' }] - const { launchAgentBackgroundSession } = - await import('../../src/renderer/src/lib/launch-agent-background-session') - - await launchAgentBackgroundSession({ - agent, - worktreeId: 'wt-1', - prompt: 'run the automation' - }) - - expect(mockSpawn.mock.calls[0]?.[0]).toEqual( - expect.objectContaining({ - command: expect.stringContaining("'run the automation'"), - connectionId: 'ssh-1', - commandDelivery: 'provider', - startupCommandDelivery: 'shell-ready' - }) - ) - const dataSidecar = mockSubscribeToPtyData.mock.calls[0]?.[1] as (data: string) => void - dataSidecar('\x1b]777;orca-shell-ready\x07user@remote repo % ') - vi.advanceTimersByTime(20_000) - expect(mockWrite).not.toHaveBeenCalled() - } finally { - vi.useRealTimers() - } - } - ) - - it.each([true, false])( - 'creates background sessions with negotiated keyboard support: %s', - async (keyboardSupported) => { - useRemoteAgentBackgroundRuntime(state) - mockRuntimeEnvironmentTransportCall.mockImplementation((request: { method: string }) => { - const status = createCompatibleRuntimeStatusResponseIfNeeded(request) - if (status?.ok) { - return Promise.resolve({ - ...status, - result: { - ...status.result, - capabilities: status.result.capabilities?.filter( - (capability) => - keyboardSupported || capability !== AGENT_SESSION_KEYBOARD_RUNTIME_CAPABILITY - ) - } - }) - } - return mockRuntimeEnvironmentCall(request) - }) - const { launchAgentBackgroundSession } = - await import('../../src/renderer/src/lib/launch-agent-background-session') - - const result = await launchAgentBackgroundSession({ - agent: 'claude', - worktreeId: 'wt-1', - prompt: 'run the automation' - }) - - expect(mockSpawn).not.toHaveBeenCalled() - const params = mockRuntimeEnvironmentCall.mock.calls[0]?.[0]?.params - if (keyboardSupported) { - expect(params).toHaveProperty('terminalKittyKeyboardProtocol', true) - } else { - expect(params).not.toHaveProperty('terminalKittyKeyboardProtocol') - } - const leafId = params?.placement?.leafId - const tabId = params?.placement?.tabId - expect(leafId).toMatch(UUID_RE) - expect(tabId).toMatch(UUID_RE) - // Why: background launches have no explicit recipe override, so remote host settings win. - expect(params).not.toHaveProperty('agentArgs') - expect(mockRegisterAgentLaunchConfig).toHaveBeenCalledWith( - `${tabId}:${leafId}`, - { - agentCommand: "claude '--dangerously-skip-permissions'", - agentArgs: '--dangerously-skip-permissions', - agentEnv: {} - }, - { - agentType: 'claude', - launchToken: expect.stringMatching(UUID_RE), - tabId, - leafId - } - ) - expect(mockSetTabLayout).toHaveBeenCalledWith( - tabId, - expect.objectContaining({ - root: { type: 'leaf', leafId }, - activeLeafId: leafId, - ptyIdsByLeafId: { [leafId]: 'remote:env-1@@terminal-1' } - }) - ) - expect(mockRuntimeEnvironmentCall).toHaveBeenCalledWith({ - selector: 'env-1', - method: 'terminal.createAgentSession', - params: expect.objectContaining({ - clientOperationId: expect.stringMatching(/^\d{13}-[0-9a-f]{32}$/), - worktree: 'id:wt-1', - agent: 'claude', - prompt: 'run the automation', - promptDelivery: 'auto-submit', - placement: { tabId, leafId }, - presentation: 'background' - }), - timeoutMs: 15_000 - }) - expect(mockUpdateTabPtyId).toHaveBeenCalledWith(tabId, 'remote:env-1@@terminal-1') - expect(mockRegisterEagerPtyBuffer).not.toHaveBeenCalled() - expect(mockRuntimeEnvironmentSubscribe).toHaveBeenCalledWith( - expect.objectContaining({ - selector: 'env-1', - method: 'terminal.multiplex', - params: {} - }), - expect.any(Object) - ) - expect(result).toMatchObject({ - tabId, - paneKey: `${tabId}:${leafId}`, - ptyId: 'remote:env-1@@terminal-1', - terminalOwnership: null - }) - } - ) - it('aborts the remote exit wait and closes the stream when run observers are released', async () => { useRemoteAgentBackgroundRuntime(state) const streamSend = vi.fn() @@ -471,53 +264,6 @@ describe('launchAgentBackgroundSession remote runtime and SSH startup delivery', expect(streamSend.mock.calls.length).toBe(sendsBeforeRelease + 1) }) - it('preserves the legacy background spawn on an old remote host', async () => { - useRemoteAgentBackgroundRuntime(state) - mockRuntimeEnvironmentTransportCall.mockImplementation((request: { method: string }) => { - if (request.method === 'status.get') { - return Promise.resolve({ - id: 'status', - ok: true, - result: { - runtimeId: 'old-runtime', - graphStatus: 'ready', - runtimeProtocolVersion: 3, - minCompatibleRuntimeClientVersion: 2, - capabilities: [] - } - }) - } - return Promise.resolve({ - id: 'create', - ok: true, - result: { terminal: { handle: 'legacy-terminal-1' } } - }) - }) - const { launchAgentBackgroundSession } = - await import('../../src/renderer/src/lib/launch-agent-background-session') - - await expect( - launchAgentBackgroundSession({ - agent: 'claude', - worktreeId: 'wt-1', - prompt: 'run remotely' - }) - ).resolves.toMatchObject({ ptyId: 'remote:env-1@@legacy-terminal-1' }) - - expect(mockRuntimeEnvironmentTransportCall).toHaveBeenCalledWith( - expect.objectContaining({ - method: 'terminal.create', - params: expect.objectContaining({ - worktree: 'id:wt-1', - command: "claude '--dangerously-skip-permissions' 'run remotely'", - terminalKittyKeyboardProtocol: true, - launchAgent: 'claude', - presentation: 'background' - }) - }) - ) - }) - it('closes a created runtime terminal when its data subscription fails', async () => { useRemoteAgentBackgroundRuntime(state) const subscribe = mockRuntimeEnvironmentSubscribe.getMockImplementation() @@ -567,53 +313,4 @@ describe('launchAgentBackgroundSession remote runtime and SSH startup delivery', }) expect(mockDispatchEvent).not.toHaveBeenCalled() }) - - it('spawns an SSH folder-workspace automation on the owning host, not locally', async () => { - // Folder workspaces have no repo row, so launch ownership comes from their scope. - state.repos = [ - { id: 'repo-1', connectionId: 'ssh-1', path: '/srv/proj/api', projectGroupId: 'grp-1' } - ] - state.projectGroups = [{ id: 'grp-1', parentGroupId: null, connectionId: 'ssh-1' }] - state.folderWorkspaces = [ - { id: 'fw-1', projectGroupId: 'grp-1', folderPath: '/srv/proj', connectionId: 'ssh-1' } - ] - state.getKnownWorktreeById = (worktreeId: string) => - worktreeId === 'folder:fw-1' ? { id: 'folder:fw-1', path: '/srv/proj' } : undefined - const { launchAgentBackgroundSession } = - await import('../../src/renderer/src/lib/launch-agent-background-session') - - await launchAgentBackgroundSession({ - agent: 'codex', - worktreeId: 'folder:fw-1', - prompt: 'run the automation' - }) - - expect(mockSpawn).toHaveBeenCalledWith( - expect.objectContaining({ connectionId: 'ssh-1', cwd: '/srv/proj' }) - ) - }) - - it('keeps a local folder workspace on the local host', async () => { - state.repos = [ - { id: 'repo-1', connectionId: null, path: '/home/me/proj/api', projectGroupId: 'grp-1' } - ] - state.projectGroups = [{ id: 'grp-1', parentGroupId: null, connectionId: null }] - state.folderWorkspaces = [ - { id: 'fw-1', projectGroupId: 'grp-1', folderPath: '/home/me/proj', connectionId: null } - ] - state.getKnownWorktreeById = (worktreeId: string) => - worktreeId === 'folder:fw-1' ? { id: 'folder:fw-1', path: '/home/me/proj' } : undefined - const { launchAgentBackgroundSession } = - await import('../../src/renderer/src/lib/launch-agent-background-session') - - await launchAgentBackgroundSession({ - agent: 'claude', - worktreeId: 'folder:fw-1', - prompt: 'run the automation' - }) - - expect(mockSpawn).toHaveBeenCalledWith( - expect.objectContaining({ connectionId: null, cwd: '/home/me/proj' }) - ) - }) }) diff --git a/tests/e2e/launch-agent-in-new-tab-web-runtime.unit.test.ts b/tests/e2e/launch-agent-in-new-tab-web-runtime.unit.test.ts index 6ebfcb5bd49d..0510cbce6cf6 100644 --- a/tests/e2e/launch-agent-in-new-tab-web-runtime.unit.test.ts +++ b/tests/e2e/launch-agent-in-new-tab-web-runtime.unit.test.ts @@ -14,101 +14,11 @@ import { stubRuntimeEnvironmentBridge } from '@/runtime/runtime-environment-brid import { AGENT_LAUNCH_CHOICES_CAPABILITY } from '../../src/shared/agent-launch-runtime-capability' import { OrcaRuntimeService } from '../../src/main/runtime/orca-runtime' import { consumeOldHostPreparedCommand } from './prepared-action-launch.test-fixture' -import { clearHostAgentMenuSettingsForTests } from '@/runtime/agent-launch-settings/host-agent-launch-preferences-resource' +import '@/runtime/agent-launch-settings/host-agent-launch-preferences-resource' import { projectAgentLaunchSettings } from '../../src/shared/agent-launch-settings' import { describe, expect, it, vi } from 'vitest' describe('launchAgentInNewTab paired web runtime', () => { - it('awaits the capable host map once and preserves explicit/raw and prepared command ownership', async () => { - mocks.capability.mockResolvedValue(true) - store.settings.agentLaunchChoices = { claude: { model: 'sonnet', options: { effort: 'low' } } } - store.settings.agentDefaultArgs = { claude: '--verbose' } - store.settings.agentDefaultEnv = { claude: { KEEP: 'caller' } } - const pending = Promise.withResolvers<{ - settings: ReturnType - }>() - mocks.hostRpc.mockReturnValueOnce(pending.promise) - const { launchAgentInNewTab } = - await import('../../src/renderer/src/lib/launch-agent-in-new-tab') - const result = launchAgentInNewTab({ - requestId: newAgentLaunchRequestId(), - agent: 'claude', - worktreeId: 'wt-1', - requestedSurface: 'terminal' - }) - expect(mocks.createWebRuntimeSessionTerminal).not.toHaveBeenCalled() - pending.resolve({ - settings: projectAgentLaunchSettings({ - agentLaunchChoices: { claude: { model: 'opus', options: { effort: 'high' } } } - }) - }) - await result?.terminalCompletion - expect(mocks.createWebRuntimeSessionTerminal).toHaveBeenCalledTimes(1) - expect(mocks.createWebRuntimeSessionTerminal.mock.calls[0][0]).toMatchObject({ - command: expect.stringContaining("'opus'"), - env: { KEEP: 'caller' }, - launchConfig: { agentArgs: '--verbose' }, - preparedAgentCommand: false - }) - expect(mocks.createWebRuntimeSessionTerminal.mock.calls[0][0]).not.toHaveProperty( - 'launchPreferences' - ) - mocks.createWebRuntimeSessionTerminal.mockClear() - const picked = launchAgentInNewTab({ - requestId: newAgentLaunchRequestId(), - agent: 'claude', - worktreeId: 'wt-1', - requestedSurface: 'terminal', - agentArgs: '--model literal', - sessionOptions: { model: 'picked' } - }) - await picked?.terminalCompletion - expect(mocks.createWebRuntimeSessionTerminal.mock.calls[0][0]).toMatchObject({ - command: expect.stringContaining("'picked'"), - agentArgs: '--model literal', - launchPreferences: { model: 'picked' }, - launchConfig: { agentArgs: '' } - }) - clearHostAgentMenuSettingsForTests() - mocks.hostRpc.mockResolvedValue({ - settings: projectAgentLaunchSettings({ - agentLaunchChoices: { claude: { options: { effort: 'high' } } } - }) - }) - store.settings.agentCmdOverrides = { claude: 'cx' } - const prepared = launchAgentInNewTab({ - requestId: newAgentLaunchRequestId(), - agent: 'claude', - worktreeId: 'wt-1', - requestedSurface: 'terminal' - }) - await prepared?.terminalCompletion - expect(mocks.createWebRuntimeSessionTerminal.mock.calls.at(-1)?.[0]).toMatchObject({ - command: "cx '--verbose' '--effort' 'high'", - env: { KEEP: 'caller' }, - preparedAgentCommand: true, - launchConfig: { agentCommand: "cx '--verbose'", agentArgs: '--verbose' } - }) - expect(mocks.createTab).not.toHaveBeenCalled() - const dispatched = mocks.createWebRuntimeSessionTerminal.mock.calls.length - store.settings.agentCmdOverrides = { claude: 'claude --model sonnet' } - const refused = launchAgentInNewTab({ - requestId: newAgentLaunchRequestId(), - agent: 'claude', - worktreeId: 'wt-1', - requestedSurface: 'terminal', - prompt: 'keep this prompt', - sessionOptions: { model: 'opus' } - }) - await expect(refused?.terminalCompletion).resolves.toEqual({ - delivered: false, - failureNotified: true, - outcome: { status: 'failed', message: expect.stringContaining('Claude') } - }) - expect(mocks.createWebRuntimeSessionTerminal).toHaveBeenCalledTimes(dispatched) - expect(mocks.toastError).toHaveBeenCalledOnce() - }) - it.each(['deadline', 'prepared', 'authoritative', 'old'] as const)( 'delivers the actual %s operation once with the correct model owner and final result', async (route) => { diff --git a/tests/e2e/linear-issue-view-persistence.spec.ts b/tests/e2e/linear-issue-view-persistence.spec.ts index 8fa2567e291c..a39affb1669e 100644 --- a/tests/e2e/linear-issue-view-persistence.spec.ts +++ b/tests/e2e/linear-issue-view-persistence.spec.ts @@ -218,20 +218,6 @@ async function openLinearTasks(page: Page): Promise { }) } -async function closeTasksPage(page: Page): Promise { - await page.evaluate(() => { - const store = window.__store - if (!store) { - throw new Error('window.__store is not available') - } - // Why: store close is locale-stable; the Close tasks label is localized. - store.getState().closeTaskPage() - }) - await expect - .poll(async () => getStoreState(page, 'activeView'), { timeout: 5_000 }) - .not.toBe('tasks') -} - async function waitForLinearIssuesChrome(page: Page, issueTitle: string): Promise { await expect .poll(async () => getStoreState(page, 'activeView'), { timeout: 10_000 }) @@ -382,51 +368,6 @@ function seededRepoPathOrSkip(): string { } test.describe('Linear issue view persistence', () => { - test('preserves view mode, grouping, ordering, and filters across a tasks remount', async ({ - electronApp, - orcaPage - }) => { - await waitForSessionReady(orcaPage) - await waitForActiveWorktree(orcaPage) - await installLinearPersistenceBackend(electronApp) - await openLinearTasks(orcaPage) - await waitForLinearIssuesChrome(orcaPage, ISSUE_A.title) - - await setLinearViewPreferences(orcaPage, { - viewMode: 'Board', - groupBy: 'Status', - orderBy: 'Updated' - }) - await applyStatusFilter(orcaPage, STATE_A.name) - - await waitForLinearIssueViewPersisted(orcaPage, (view) => { - if ( - !view || - view.viewMode !== 'board' || - view.groupBy !== 'status' || - view.orderBy !== 'updated' - ) { - return false - } - const filter = view.filtersByWorkspaceId?.[WORKSPACE_A.id] - return Boolean(filter?.stateIds?.includes(STATE_A.id)) - }) - - await expectRestoredLinearView(orcaPage) - const statusChip = orcaPage.getByRole('button', { name: 'Remove Status filter' }).locator('..') - await expect(statusChip).toContainText(STATE_A.name) - - await closeTasksPage(orcaPage) - await openLinearTasks(orcaPage) - await waitForLinearIssuesChrome(orcaPage, ISSUE_A.title) - - await expectRestoredLinearView(orcaPage) - await expect( - orcaPage.getByRole('button', { name: 'Remove Status filter' }).locator('..') - ).toContainText(STATE_A.name) - await expect(orcaPage.getByText(STATE_A.name, { exact: true }).first()).toBeVisible() - }) - test('keeps attribute filters scoped per Linear workspace', async ({ electronApp, orcaPage }) => { await waitForSessionReady(orcaPage) await waitForActiveWorktree(orcaPage) diff --git a/tests/e2e/macos-press-and-hold-startup.spec.ts b/tests/e2e/macos-press-and-hold-startup.spec.ts index dd7095bee603..a1a122528682 100644 --- a/tests/e2e/macos-press-and-hold-startup.spec.ts +++ b/tests/e2e/macos-press-and-hold-startup.spec.ts @@ -69,13 +69,3 @@ test.describe('macOS press-and-hold default', () => { } }) }) - -test.describe('off macOS', () => { - test.skip(process.platform === 'darwin', 'covers the non-macOS branch') - - test('writes nothing at all', async ({ electronApp }) => { - const state = await readPressAndHoldStartupState(electronApp) - - expect(state.recordRaw).toBeNull() - }) -}) diff --git a/tests/e2e/markdown-nested-toggle.spec.ts b/tests/e2e/markdown-nested-toggle.spec.ts index 1a51a1147915..e771696a2ba0 100644 --- a/tests/e2e/markdown-nested-toggle.spec.ts +++ b/tests/e2e/markdown-nested-toggle.spec.ts @@ -26,36 +26,6 @@ test.describe('Markdown nested toggle regression', () => { await waitForActiveWorktree(orcaPage) }) - test('a plain details block opens as an editable toggle', async ({ orcaPage }, testInfo) => { - const context = await getActiveWorktreeContext(orcaPage) - let filePath: string | null = null - - try { - filePath = await createMarkdownFixture( - context, - NESTED_TOGGLE_FIXTURE_DIRECTORY, - 'plain-details', - testInfo.workerIndex, - '
\nToggle\n\nBody\n\n
\n' - ) - await openMarkdownFixture(orcaPage, context, filePath) - const editor = await waitForRichMarkdownEditor(orcaPage) - const toggle = editor.locator('[data-type="details"]') - - await expect(toggle).toHaveCount(1) - await expect(toggle.locator('summary')).toHaveText('Toggle') - await expect(editor.locator('[data-raw-markdown-html-block]')).toHaveCount(0) - const screenshotPath = testInfo.outputPath('plain-details-rich-editor.png') - await orcaPage.screenshot({ path: screenshotPath }) - await testInfo.attach('plain-details-rich-editor', { - path: screenshotPath, - contentType: 'image/png' - }) - } finally { - await cleanupMarkdownFixture(filePath) - } - }) - test('editing a nested toggle survives save and reopen', async ({ orcaPage }, testInfo) => { const context = await getActiveWorktreeContext(orcaPage) const sentinel = `editedInsideNestedToggle${Date.now()}` diff --git a/tests/e2e/multi-client-navigation-isolation.spec.ts b/tests/e2e/multi-client-navigation-isolation.spec.ts index 5fcfac0bd808..7e75ad3f4ccf 100644 --- a/tests/e2e/multi-client-navigation-isolation.spec.ts +++ b/tests/e2e/multi-client-navigation-isolation.spec.ts @@ -268,58 +268,6 @@ test('keeps a paired client workspace create-with-agent off the other client and } }) -test('shows only provider-backed creation actions in paired web', async ({ - electronApp, - orcaPage -}, testInfo) => { - const visibleWorktreeId = await orcaPage.evaluate( - () => window.__store?.getState().activeWorktreeId - ) - if (!visibleWorktreeId) { - throw new Error('Host worktree was not active before paired web validation') - } - - const offer = await createPairingOffer(orcaPage) - const client = await openPairedClient(electronApp, offer, visibleWorktreeId) - try { - await selectWorktree(client, visibleWorktreeId) - await expect - .poll(() => - client.evaluate(() => { - const state = window.__store?.getState() - if (!state) { - return false - } - const worktree = state - .allWorktrees() - .find((candidate) => candidate.id === state.activeWorktreeId) - const environmentId = worktree?.runtimeOwnerEnvironmentId - return environmentId - ? state.runtimeStatusByEnvironmentId - .get(environmentId) - ?.status?.capabilities?.includes('browser.screencast.v1') === true - : false - }) - ) - .toBe(true) - - await client.getByRole('button', { name: 'New tab' }).first().click() - await expect(client.getByRole('menuitem', { name: /New Terminal/i })).toBeVisible() - await expect(client.getByRole('menuitem', { name: /New Browser Tab/i })).toBeVisible() - await expect(client.getByRole('menuitem', { name: /New Markdown/i })).toBeVisible() - await expect(client.getByRole('menuitem', { name: /Mobile Emulator/i })).toHaveCount(0) - - const screenshotPath = testInfo.outputPath('paired-web-provider-backed-create-menu.png') - await client.screenshot({ path: screenshotPath }) - await testInfo.attach('paired-web-provider-backed-create-menu', { - path: screenshotPath, - contentType: 'image/png' - }) - } finally { - await client.close() - } -}) - test('routes Add Project folder browsing through the paired host', async ({ electronApp, orcaPage, From b1d5f77edd483df6bdec5fec6b497cc9acdccee9 Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Tue, 3 Nov 2026 05:33:11 -0800 Subject: [PATCH 2/4] test: remove 30 low-value client and benchmark tests --- config/reliability-gates.jsonc | 39 ++-- config/scripts/ci-shard-timings.json | 6 - ...ve-chat-image-runtime-context.unit.test.ts | 47 +---- .../e2e/native-chat-ssh-delivery.unit.test.ts | 12 -- tests/e2e/network-proxy-bypass-rules.spec.ts | 41 ---- tests/e2e/notification-settings.spec.ts | 94 --------- tests/e2e/omp-image-clipboard.spec.ts | 46 ----- tests/e2e/paced-terminal-typing.unit.test.ts | 157 -------------- ...-terminal-graph-sync-tab-retention.spec.ts | 7 - ...native-chat-routing-authority.unit.test.ts | 49 ----- ...rminal-layout-parity-snapshot.unit.test.ts | 131 ------------ ...t-activation-latency-artifact.unit.test.ts | 74 ------- ...lit-activation-latency-report.unit.test.ts | 192 ------------------ 13 files changed, 13 insertions(+), 882 deletions(-) delete mode 100644 tests/e2e/network-proxy-bypass-rules.spec.ts delete mode 100644 tests/e2e/notification-settings.spec.ts delete mode 100644 tests/e2e/omp-image-clipboard.spec.ts delete mode 100644 tests/e2e/paced-terminal-typing.unit.test.ts delete mode 100644 tests/e2e/structured-native-chat-routing-authority.unit.test.ts delete mode 100644 tests/e2e/terminal-layout-parity-snapshot.unit.test.ts delete mode 100644 tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts delete mode 100644 tests/e2e/terminal-split-activation-latency-report.unit.test.ts diff --git a/config/reliability-gates.jsonc b/config/reliability-gates.jsonc index d0f70c3fe34e..6e513eca5aac 100644 --- a/config/reliability-gates.jsonc +++ b/config/reliability-gates.jsonc @@ -670,7 +670,7 @@ "providers": ["local", "daemon", "ssh", "wsl", "remote-runtime", "mobile-relay"], "coveredPlatforms": ["macos"], "coveredProviders": ["local", "daemon", "ssh", "remote-runtime", "mobile-relay"], - "coverageNotes": "Production mobile controller, parser, presentation, overlay, view, question, permission and composer run with native surfaces mocked on macOS. Desktop selector groups traverse the real observed-write queue, verified helper, IPC chunker, SSH provider and transport callbacks; paired sends traverse the real dispatcher and runtime writer into that provider. Local/daemon contracts and released-version terminal codecs are covered. Provider labels describe contracts, not physical deployments; physical WSL/Linux/Windows remain gaps. Audit885 removes the isolated observed-send mock-call suite; no replacement-equivalence claim is made.", + "coverageNotes": "Production mobile controller, parser, presentation, overlay, view, question, permission and composer run with native surfaces mocked on macOS. Desktop selector groups traverse the real observed-write queue, verified helper, IPC chunker, SSH provider and transport callbacks; paired sends traverse the real dispatcher and runtime writer into that provider. Local/daemon contracts and released-version terminal codecs are covered. Provider labels describe contracts, not physical deployments; physical WSL/Linux/Windows remain gaps. Audit885 removes the isolated observed-send mock-call suite; no replacement-equivalence claim is made. Audit1107 removes the small healthy ordinary SSH-send byte/callback sample. Its exact clear/body/Enter sample alarm is lost; retained slow-answer, cancellation and simulated older-host sequence checks are not claimed as equivalent replacement coverage. The SSH delivery fixture uses controlled fake provider settlement, and its paired path uses the real runtime/dispatcher without a physical SSH or paired wire transport.", "motivatingLinks": ["https://github.com/stablyai/orca/pull/25761"], "invariant": "A prompt occurrence leaves the input region only when an accepted reply answers it (a current host's provider acknowledgment, or an older host's whole-write acceptance as before) or the user collapses it to a strip above the composer, which writes nothing and keeps the card mounted with its partial answer; status-backed occurrences are told apart by the host wait's start, so view toggles and remounts preserve them while real clear/replacement supersedes them, and a transcript-only one is dropped when the view stops observing it; obsolete results cannot change replacements; selector groups wait for complete writes before pacing; refusal or unknown handoff never causes replay; a card retires an unsubmitted composer send without writing under it or losing its text, and the hidden composer cannot send or interrupt; Collapse or Escape folds a card without writing, never during an in-flight answer, and a new occurrence shows expanded again; the phone blocks only Send while a card is expanded and shows one card per occurrence; cancellation stops unsent groups and active dictation can stop.", "oracle": "After acknowledged phone replies with stale host status, the exact card disappears and Send is enabled; unknown, refused or unverifiable-settlement replies retain enabled choices, while an older host's accepted reply dismisses like an acknowledged one; a same-occurrence view toggle retains pending acknowledgment and real replacements discard it. A slow 32 KiB SSH answer completes all chunks before Enter; cancellation preserves issued bytes but omits remaining groups. Paired settlement invokes the actual provider and lost callbacks remain unknown; older hosts deliver ordinary messages, launch and selector groups once and their accepted answers dismiss as before. An answered card stays hidden across a view remount; a collapsed card is a strip that frees the composer and expands back; an identical question in a new wait shows again; a composer send caught by a new card keeps its bubble without submitting or clearing the line under it.", @@ -8621,16 +8621,16 @@ "providers": ["local", "local-daemon", "ssh", "wsl", "remote-runtime"], "coveredPlatforms": ["macos"], "coveredProviders": ["local", "remote-runtime"], - "coverageNotes": "Deterministic renderer contracts hold CWD resolution behind an explicit promise, require the new pane to be created synchronously, and prove that close cancels the pending connection. A module-level stable-pane-key handoff preserves the exact CWD promise and bounded pre-connect input across whole-tab remounts, including a tab rehome between worktree buckets; stale owners are fenced, concrete PTY bind and definitive spawn failure clear the record, and explicit pane close discards it. Detach contracts reject cwd-pending and cwd-resolved deferred splits before PTY bind without mutation, carry resolved cwd for other unbound panes, and preserve persisted or live PTY handoff. Local IPC transport contracts exercise the real bounded pre-connect buffer and one live input FIFO across seeded and newly typed ordinary, acknowledged, and immediate writes, concurrent flushes, in-flight teardown, late spawn success or failure, attach failure, failed spawn, same-id reuse, stale-spawn retirement ownership, destroy, and mutable recovery metadata. The handoff registry is capped at 64 records for 15 seconds and shares the existing 1,024-entry/conservative UTF-16 input ceilings. A mocked direct-SSH authority-rotation contract proves a rejected stale spawn releases its deferred-CWD fence. The schema-v2 headful Electron benchmark records exact revision identity and attributes CWD request/settlement, PTY spawn request/result, bind, fixture unlock request/IPC write, fixture readiness, input, and first echo across 3 warmups and 20 measured cold-CWD cycles, requiring a distinct child PTY and observed child pty:exit before the next cycle. Remote-runtime coverage proves delegation remains host-owned; its host-delegated split path does not consume the local pre-connect input options, so remote-runtime input-remount replay and physical local-daemon, SSH, WSL, Linux, Windows, and folder-workspace latency journeys remain gaps.", + "coverageNotes": "Deterministic renderer contracts hold CWD resolution behind an explicit promise, require the new pane to be created synchronously, and prove that close cancels the pending connection. A module-level stable-pane-key handoff preserves the exact CWD promise and bounded pre-connect input across whole-tab remounts, including a tab rehome between worktree buckets; stale owners are fenced, concrete PTY bind and definitive spawn failure clear the record, and explicit pane close discards it. Detach contracts reject cwd-pending and cwd-resolved deferred splits before PTY bind without mutation, carry resolved cwd for other unbound panes, and preserve persisted or live PTY handoff. Local IPC transport contracts exercise the real bounded pre-connect buffer and one live input FIFO across seeded and newly typed ordinary, acknowledged, and immediate writes, concurrent flushes, in-flight teardown, late spawn success or failure, attach failure, failed spawn, same-id reuse, stale-spawn retirement ownership, destroy, and mutable recovery metadata. The handoff registry is capped at 64 records for 15 seconds and shares the existing 1,024-entry/conservative UTF-16 input ceilings. A mocked direct-SSH authority-rotation contract proves a rejected stale spawn releases its deferred-CWD fence. The schema-v2 headful Electron benchmark records exact revision identity and attributes CWD request/settlement, PTY spawn request/result, bind, fixture unlock request/IPC write, fixture readiness, input, and first echo across 3 warmups and 20 measured cold-CWD cycles, requiring a distinct child PTY and observed child pty:exit before the next cycle. Remote-runtime coverage proves delegation remains host-owned; its host-delegated split path does not consume the local pre-connect input options, so remote-runtime input-remount replay and physical local-daemon, SSH, WSL, Linux, Windows, and folder-workspace latency journeys remain gaps. The test-value audit retires the benchmark artifact and report unit suites. Their direct JSON write/readback, unwritable-path, path-redaction/string-bound, synthetic phase-attribution, revision/percentile and missing-unlock-event alarms are lost. The real benchmark and its capture/report/writer helpers remain; they do not provide equivalent isolated helper validation. Historical executed commands, counts and results remain historical.", "motivatingLinks": ["https://github.com/stablyai/orca/commit/572ed1a8882"], "invariant": "A terminal split creates and activates its renderer pane before an inherited-CWD lookup settles, starts its PTY only after the resolved directory is available, and cannot be externally detached while that deferred spawn remains unbound. A whole-tab remount or worktree rehome preserves the same stable pane's CWD promise and admitted local pre-connect bytes in order until a successor binds or the intent is definitively abandoned; stale owners cannot append or clear the successor's record. Other unbound panes preserve resolved cwd as startupCwd when detached. Bounded pre-connect input and later live local input share byte order, and teardown settles acknowledged writes without creating or rebinding a stale PTY. A disconnected or detached pending connect cannot bind its late fresh spawn, report its late failure through current callbacks, or ID-retire a newer same-ID owner; rejecting a stale direct-SSH spawn also releases the matching deferred-CWD fence. Natural exit cannot deliver queued work into a reused PTY id. Bound and remote-runtime splits remain owned by their execution host.", "oracle": "Hold CWD resolution behind a controllable promise, invoke the production split path, and require manager.splitPane plus split telemetry before resolving it. Before PTY bind, require both cwd-pending and cwd-resolved deferred detach attempts to return null without layout, pane, tab, ownership, or focus mutation; separately require resolved cwd on an allowed unbound detach and unchanged persisted/live PTY adoption. Exercise the stable-pane handoff registry through repeated remounts and a worktree rehome, requiring the identical CWD promise, ordered ordinary/acknowledged/immediate seed replay, stale-owner fencing, 64-record/15-second bounds, and discard on bind, failure, or explicit close. Rotate a mocked direct-SSH authority while its delayed spawn is in flight, reject and disconnect the stale PTY claim, then require exactly one deferred-CWD cleanup when the delayed connect settles. At the local IPC PTY boundary, require zero connect calls while pending, the resolved CWD in spawn and local recovery metadata, one shared FIFO across seeded/new pre-connect and live ordinary/acknowledged/immediate input, prompt predecessor acknowledged-promise settlement on teardown, retirement of an unowned late fresh spawn, preservation of a newer same-ID owner, and zero stale delivery after failure, close, destroy, detach, natural exit, or same-id reuse. Capture callback exceptions must not change admission results. In visible Electron, press the real split shortcut for 3 warmup cycles, then after a cold inherited-CWD interval for each of 20 measured cycles, require an exact clean revision identity, complete focus/CWD/spawn/bind/fixture/input/echo attribution, distinct child PTYs, pane count, and child exits for every cycle; a timed-out, missing-event, or cleanup-aborted run must publish no headline latency and fail.", "commands": [ - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts tests/e2e/terminal-split-activation-latency-main-probe.ts tests/e2e/terminal-split-activation-latency-phases.ts tests/e2e/terminal-split-activation-latency-report.unit.test.ts --reporter=dot", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts tests/e2e/terminal-split-activation-latency-main-probe.ts tests/e2e/terminal-split-activation-latency-phases.ts --reporter=dot", // Historical evidence maps to the surviving command below. "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts --reporter=dot", // Historical evidence maps to the surviving command below. - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts --reporter=dot", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts --reporter=dot", // Historical schema-v1 evidence records only; their labels do not verify the checkout or harness. "ORCA_TERMINAL_SPLIT_LATENCY_BENCH=1 ORCA_TERMINAL_SPLIT_LATENCY_LABEL=baseline-df14d1a2983d8339e788d0e521f1c4affd9c6d5f-headful-run1 ORCA_TERMINAL_SPLIT_LATENCY_OUTPUT=/private/tmp/orca-terminal-split-activation-baseline-df14d1a2983d8339e788d0e521f1c4affd9c6d5f-headful-run1.json pnpm exec playwright test tests/e2e/terminal-split-activation-latency.spec.ts --config tests/playwright.config.ts --project electron-headful --workers=1", "ORCA_TERMINAL_SPLIT_LATENCY_BENCH=1 ORCA_TERMINAL_SPLIT_LATENCY_LABEL=candidate-d453ffcdb704764daced1b2917fddee7224389f0-headful-run2 ORCA_TERMINAL_SPLIT_LATENCY_OUTPUT=/private/tmp/orca-terminal-split-activation-candidate-d453ffcdb704764daced1b2917fddee7224389f0-headful-run2.json pnpm exec playwright test tests/e2e/terminal-split-activation-latency.spec.ts --config tests/playwright.config.ts --project electron-headful --workers=1", @@ -8648,10 +8648,8 @@ "src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts", "src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts", "src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts", - "tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts", "tests/e2e/terminal-split-activation-latency-main-probe.ts", "tests/e2e/terminal-split-activation-latency-phases.ts", - "tests/e2e/terminal-split-activation-latency-report.unit.test.ts", "tests/e2e/terminal-split-activation-latency.spec.ts" ], "assertionRefs": [ @@ -8726,13 +8724,6 @@ "expires an abandoned handoff after the bounded remount window" ] }, - { - "file": "tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts", - "assertions": [ - "writes a passing benchmark report to the requested artifact path", - "fails when the benchmark artifact path cannot be written" - ] - }, { "file": "tests/e2e/terminal-split-activation-latency-main-probe.ts", "assertions": [ @@ -8749,14 +8740,6 @@ "reports each attributed phase distribution with non-negative cross-clock durations" ] }, - { - "file": "tests/e2e/terminal-split-activation-latency-report.unit.test.ts", - "assertions": [ - "attributes main-process phases to the matching source and child PTYs", - "embeds schema-v2 revision identity and summarizes the attributed phases", - "invalidates a sample when the actual fixture-unlock IPC write is missing" - ] - }, { "file": "tests/e2e/terminal-split-activation-latency.spec.ts", "assertions": [ @@ -8786,7 +8769,7 @@ "platform": "macos", "result": "passed", "command": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/lib/pane-manager/pane-split-close.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts --reporter=dot", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts --reporter=dot", + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts --reporter=dot", "durationSeconds": 44.43, "summary": "Nine focused files and 96 tests passed. Vitest reported 37.78 seconds and measured wall time was 44.43 seconds; the run adds stable-pane CWD/input handoff, repeated-remount stale-owner fencing, bounded 64-record/15-second retention, seeded-input caps, ordered ordinary/acknowledged/immediate replay, predecessor acknowledged-promise settlement, capture-callback failure containment, and benchmark-artifact write-failure coverage to the existing split, detach, CWD, and local transport contracts." }, @@ -8796,7 +8779,7 @@ "platform": "macos", "result": "passed", "command": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/lib/pane-manager/pane-split-close.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts tests/e2e/terminal-split-activation-latency-main-probe.ts tests/e2e/terminal-split-activation-latency-phases.ts tests/e2e/terminal-split-activation-latency-report.unit.test.ts --reporter=dot", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts tests/e2e/terminal-split-activation-latency-main-probe.ts tests/e2e/terminal-split-activation-latency-phases.ts tests/e2e/terminal-split-activation-latency-report.unit.test.ts --reporter=dot", + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-pane-split-with-inherited-cwd.test.ts src/renderer/src/components/terminal-pane/resolve-split-cwd.test.ts src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts src/renderer/src/components/terminal-pane/pty-preconnect-input-buffer.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/renderer/src/components/terminal-pane/deferred-split-pane-handoff.test.ts tests/e2e/terminal-split-activation-latency-main-probe.ts tests/e2e/terminal-split-activation-latency-phases.ts --reporter=dot", "durationSeconds": 4.14, "summary": "The updated twelve-path focused command passed 99 tests (10 runnable test files plus 2 benchmark support modules), including schema-v2 main-process phase attribution, report revision identity, fixture IPC-write validation, stable-pane handoff, ordered pre-connect/live input, cleanup, detach, failure, and same-ID ownership contracts." }, @@ -8876,7 +8859,8 @@ "The four stored schema-v1 artifacts predate the final harness attribution/reporting and do not embed revision identity; the clean schema-v2 candidate artifact is revision-verified, but both product revisions still need a paired schema-v2 rerun with one committed harness before promotion.", "No forced-failure visible benchmark artifact has been recorded; the focused artifact-write and missing-event report contracts verify local failure handling, while failure-report serialization remains unverified by a full visible run.", "No clean schema-v2 baseline phase artifact exists, so the attributed CWD, spawn, fixture-ready, bind, and echo timings diagnose where time is spent but do not establish a shell-readiness improvement or regression.", - "The audit removed a fake-DOM split/close suite. Its mocked focus, scroll, fit and WebGL alarms lose dedicated checks; surviving tests and historical runs do not establish equivalent coverage. Historical commands retain executed roots, while currentCommand maps surviving roots without claiming a new run." + "The audit removed a fake-DOM split/close suite. Its mocked focus, scroll, fit and WebGL alarms lose dedicated checks; surviving tests and historical runs do not establish equivalent coverage. Historical commands retain executed roots, while currentCommand maps surviving roots without claiming a new run.", + "The test-value audit retires the benchmark artifact and report unit suites. Their direct JSON write/readback, unwritable-path, path-redaction/string-bound, synthetic phase-attribution, revision/percentile and missing-unlock-event alarms are lost. The real benchmark and its capture/report/writer helpers remain; they do not provide equivalent isolated helper validation. Historical executed commands, counts and results remain historical." ], "demotionRule": "Keep experimental or demote if pane activation waits on CWD, a deferred split can detach before PTY bind, a remount or rehome loses its stable CWD/input handoff, stale owners mutate a successor record, detached cwd is lost, input reorders or remains pending after cleanup, a closed pane can spawn, stale retirement kills a newer same-ID owner, remote-runtime delegation creates a competing local pane, or the focused suite flakes without an identified product or harness cause." }, @@ -9000,7 +8984,7 @@ "providers": ["local", "daemon", "ssh", "runtime"], "coveredPlatforms": ["macos"], "coveredProviders": ["local", "daemon", "ssh", "runtime"], - "coverageNotes": "Live macOS Electron tests prove exact local PTY disappearance after parked-tab close and detached-pgid descendant death after agent close. A deterministic final-pane interleaving now proves durable tab retirement commits before externally owned PTY teardown can publish graph loss, and preserves an unrelated live canary through duplicate exit retirement. Deterministic tests also cover final-pane CLI close durability and same-incarnation handle continuity; persisted-empty restart suppression remains historical Electron evidence, alongside replacement and hard graph-loss stale fencing, preallocated-handle supersession, daemon and SSH routing, local/daemon pending-snapshot ownership across natural exit, stale-root descendant-signal suppression, graceful-to-immediate kill upgrades, duplicate-kill completion sharing, locale-stable bounded/fresh/coalesced process-table reads, deadline-safe successor scans, cycle-safe linear descendant traversal, target-only escalation indexing, 32-wide bulk teardown, source-scan timestamp identity, same-second PID ambiguity, ordinary runtime close ownership, unified-only hydration, split ownership, pane detach transfer, restart alias hydration, and late-hook suppression; live Linux, Windows, WSL, SSH, and remote-runtime process evidence remains pending. A paired macOS Electron journey (real attached-window desktop host plus a separate real paired desktop client, isolated profiles) covers the inverse authority direction for host-created terminals: a renderer graph sync must not retire a tab that `orca terminal create` made. That claim now covers BOTH shapes, including the incident shape the real CLI produces - a repo's FIRST host-created terminal, since src/cli/handlers/terminal.ts sends no clientMutationId - each asserted by its own test. An earlier reading of this gate called a preceding host-created terminal and a `clientMutationId` protective; main-process instrumentation refuted that. The renderer's stale session write deleted the host tab from persistence in every variant, and only the delete's timing relative to the measured sync differed, so those rows were false negatives of a single-sync oracle. The defect was in persistence: persistPtyBinding did not raise the repo's terminal topology fence for the first host-admitted tab, leaving the renderer's pre-create tab list free to replay over it. Elapsed time and paired-client mirroring never decided anything. A windowless `orca serve` parity arm runs the identical oracle and passes on both the merge-base and the branch, confirming that topology does not exhibit the defect (the gate it turns on is window-conditioned) and that making the host binding unconditional did not regress it. All of this is macOS-local only. The reported incident occurred on a physical Windows host; we did not run against one. The claim that the mechanism is platform-independent rests on the authoritative-window gate and publication-epoch inheritance being OS-agnostic, not on Windows evidence, so no ConPTY, Windows window-lifecycle, update, or sleep behavior is covered here. The synthetic default-tabs unit suite was retired: its explicit-empty/default-tab assertions no longer supply unit evidence. This retirement supplies no new persisted-restart, runtime-routing, cross-platform, or mobile evidence; existing historical runs and counts remain historical. The test-value audit removes the isolated re-retirement-token/epoch, activity-cutoff, idle-reattach and sibling-restore examples. The cited exact retirement and chained-detach cases remain unchanged, alongside closed-tab revival fencing and alias churn bounds. Their retained evidence is not equivalent coverage for every removed permutation; historical execution evidence is unchanged. The test-value audit removed shared-owner snapshot/cold-restore reference examples, a direct absent-tab PTY-index update, caller-supplied host-owned teardown boolean/no-dispatch, and a single local-provider rejection example. It also removed hand-built detach-retention comparator examples for different runs, handles, provider identities, and handle-less rows without independent identity ingress. Their specific snapshot, missing-tab, host-decision, rejection-count, and comparator alarms are lost. Current exact authority/ordering and chained-detach cases remain retained; they do not establish equivalent coverage for the removed examples. Historical commands, counts, results, and red-green narratives remain historical. The test-value audit retires terminals-explicit-empty-hydration.test.ts in full: its direct git/folder empty-tombstone assertions and literal-flag auto-create helper check are lost. The store test never mounted the initial-terminal effect or performed a persisted restart. The audit also removes terminal-tab-retirement.test.ts pure ownership/alias/routing plan inventories and sleeping-record map assertions; its former 100-tab scan-count case was subsequently retired too; no assertion remains in that suite. These retained and historical cases do not establish equivalent tombstone, default-create, provider teardown, cross-platform, or mobile coverage. Historical commands, results, counts, and red-green narratives remain historical. The subsequent test-value audit deletes the remaining terminal-tab-retirement.test.ts suite. Its 100-tab case asserted only returned plan count and one outer scan per ownership store; it never inspected per-tab plans or provider teardown. Those direct cardinality/work-count alarms are intentionally lost. Historical executed commands, results, counts and red-green narratives remain historical; no equivalent replacement or new runtime, platform or mobile evidence is claimed.", + "coverageNotes": "Live macOS Electron tests prove exact local PTY disappearance after parked-tab close and detached-pgid descendant death after agent close. A deterministic final-pane interleaving now proves durable tab retirement commits before externally owned PTY teardown can publish graph loss, and preserves an unrelated live canary through duplicate exit retirement. Deterministic tests also cover final-pane CLI close durability and same-incarnation handle continuity; persisted-empty restart suppression remains historical Electron evidence, alongside replacement and hard graph-loss stale fencing, preallocated-handle supersession, daemon and SSH routing, local/daemon pending-snapshot ownership across natural exit, stale-root descendant-signal suppression, graceful-to-immediate kill upgrades, duplicate-kill completion sharing, locale-stable bounded/fresh/coalesced process-table reads, deadline-safe successor scans, cycle-safe linear descendant traversal, target-only escalation indexing, 32-wide bulk teardown, source-scan timestamp identity, same-second PID ambiguity, ordinary runtime close ownership, unified-only hydration, split ownership, pane detach transfer, restart alias hydration, and late-hook suppression; live Linux, Windows, WSL, SSH, and remote-runtime process evidence remains pending. A paired macOS Electron journey (real attached-window desktop host plus a separate real paired desktop client, isolated profiles) covers the inverse authority direction for host-created terminals: a renderer graph sync must not retire a tab that `orca terminal create` made. The retained paired journey covers the incident shape the real CLI produces - a repo's FIRST host-created terminal, since src/cli/handlers/terminal.ts sends no clientMutationId. The repeated target-after-unrelated-terminal journey was retired; its separate ordering alarm is no longer provided. An earlier reading of this gate called a preceding host-created terminal and a `clientMutationId` protective; main-process instrumentation refuted that. The renderer's stale session write deleted the host tab from persistence in every variant, and only the delete's timing relative to the measured sync differed, so those rows were false negatives of a single-sync oracle. The defect was in persistence: persistPtyBinding did not raise the repo's terminal topology fence for the first host-admitted tab, leaving the renderer's pre-create tab list free to replay over it. Elapsed time and paired-client mirroring never decided anything. A windowless `orca serve` parity arm runs the identical oracle and passes on both the merge-base and the branch, confirming that topology does not exhibit the defect (the gate it turns on is window-conditioned) and that making the host binding unconditional did not regress it. All of this is macOS-local only. The reported incident occurred on a physical Windows host; we did not run against one. The claim that the mechanism is platform-independent rests on the authoritative-window gate and publication-epoch inheritance being OS-agnostic, not on Windows evidence, so no ConPTY, Windows window-lifecycle, update, or sleep behavior is covered here. The synthetic default-tabs unit suite was retired: its explicit-empty/default-tab assertions no longer supply unit evidence. This retirement supplies no new persisted-restart, runtime-routing, cross-platform, or mobile evidence; existing historical runs and counts remain historical. The test-value audit removes the isolated re-retirement-token/epoch, activity-cutoff, idle-reattach and sibling-restore examples. The cited exact retirement and chained-detach cases remain unchanged, alongside closed-tab revival fencing and alias churn bounds. Their retained evidence is not equivalent coverage for every removed permutation; historical execution evidence is unchanged. The test-value audit removed shared-owner snapshot/cold-restore reference examples, a direct absent-tab PTY-index update, caller-supplied host-owned teardown boolean/no-dispatch, and a single local-provider rejection example. It also removed hand-built detach-retention comparator examples for different runs, handles, provider identities, and handle-less rows without independent identity ingress. Their specific snapshot, missing-tab, host-decision, rejection-count, and comparator alarms are lost. Current exact authority/ordering and chained-detach cases remain retained; they do not establish equivalent coverage for the removed examples. Historical commands, counts, results, and red-green narratives remain historical. The test-value audit retires terminals-explicit-empty-hydration.test.ts in full: its direct git/folder empty-tombstone assertions and literal-flag auto-create helper check are lost. The store test never mounted the initial-terminal effect or performed a persisted restart. The audit also removes terminal-tab-retirement.test.ts pure ownership/alias/routing plan inventories and sleeping-record map assertions; its former 100-tab scan-count case was subsequently retired too; no assertion remains in that suite. These retained and historical cases do not establish equivalent tombstone, default-create, provider teardown, cross-platform, or mobile coverage. Historical commands, results, counts, and red-green narratives remain historical. The subsequent test-value audit deletes the remaining terminal-tab-retirement.test.ts suite. Its 100-tab case asserted only returned plan count and one outer scan per ownership store; it never inspected per-tab plans or provider teardown. Those direct cardinality/work-count alarms are intentionally lost. Historical executed commands, results, counts and red-green narratives remain historical; no equivalent replacement or new runtime, platform or mobile evidence is claimed.", "motivatingLinks": [ "https://linear.app/stably/issue/STA-4327", "https://github.com/stablyai/orca/pull/14590", @@ -9088,7 +9072,7 @@ "file": "tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts", "assertions": [ "an attached-window desktop host publishes the CLI-created terminal under the renderer publication epoch it inherits, proving the vulnerable classification path was taken rather than a headless or serve/SSH-shaped one", - "with an earlier host-created terminal already present, a renderer graph sync leaves the `terminal.create` tab in the host session inventory still naming its original daemon PTY", + "with the target as the first host-created terminal, a renderer graph sync leaves the `terminal.create` tab in the host session inventory still naming its original daemon PTY", "the original fixture process answers a write through that handle with its own pid and a single READY line, so a respawned replacement cannot pass as a survivor", "the paired client applied that same sync and kept the tab with no replacement or resume tab appended", "an unrelated workspace keeps its own CLI terminal and PTY, and the client raises no direct local connection attempt or uncaught renderer error" @@ -9240,7 +9224,8 @@ "The test-value audit removes the isolated re-retirement-token/epoch, activity-cutoff, idle-reattach and sibling-restore examples. The cited exact retirement and chained-detach cases remain unchanged, alongside closed-tab revival fencing and alias churn bounds. Their retained evidence is not equivalent coverage for every removed permutation; historical execution evidence is unchanged.", "The test-value audit removed shared-owner snapshot/cold-restore reference examples, a direct absent-tab PTY-index update, caller-supplied host-owned teardown boolean/no-dispatch, and a single local-provider rejection example. It also removed hand-built detach-retention comparator examples for different runs, handles, provider identities, and handle-less rows without independent identity ingress. Their specific snapshot, missing-tab, host-decision, rejection-count, and comparator alarms are lost. Current exact authority/ordering and chained-detach cases remain retained; they do not establish equivalent coverage for the removed examples. Historical commands, counts, results, and red-green narratives remain historical.", "The test-value audit retires terminals-explicit-empty-hydration.test.ts in full: its direct git/folder empty-tombstone assertions and literal-flag auto-create helper check are lost. The store test never mounted the initial-terminal effect or performed a persisted restart. The audit also removes terminal-tab-retirement.test.ts pure ownership/alias/routing plan inventories and sleeping-record map assertions; its retained 100-tab case measures one scan of each ownership store only. These retained and historical cases do not establish equivalent tombstone, default-create, provider teardown, cross-platform, or mobile coverage. Historical commands, results, counts, and red-green narratives remain historical.", - "The subsequent test-value audit deletes the remaining terminal-tab-retirement.test.ts suite. Its 100-tab case asserted only returned plan count and one outer scan per ownership store; it never inspected per-tab plans or provider teardown. Those direct cardinality/work-count alarms are intentionally lost. Historical executed commands, results, counts and red-green narratives remain historical; no equivalent replacement or new runtime, platform or mobile evidence is claimed." + "The subsequent test-value audit deletes the remaining terminal-tab-retirement.test.ts suite. Its 100-tab case asserted only returned plan count and one outer scan per ownership store; it never inspected per-tab plans or provider teardown. Those direct cardinality/work-count alarms are intentionally lost. Historical executed commands, results, counts and red-green narratives remain historical; no equivalent replacement or new runtime, platform or mobile evidence is claimed.", + "The duplicate paired CLI graph-sync journey with an earlier unrelated host-created terminal was retired. The first-host-created-terminal journey retains the same original-PTY reply, host/client inventory and unrelated live canary oracles; target-after-unrelated ordering is no longer separately asserted. A single sync does not prove persisted restart durability. Historical evidence runs/results/counts remain unchanged." ], "demotionRule": "Keep experimental or demote to protection none if exact PTY disappearance flakes, a sibling/detached pane is retired, late hooks can recreate closed authority, or a renderer graph sync retires a host-created tab that no explicit close retired." }, diff --git a/config/scripts/ci-shard-timings.json b/config/scripts/ci-shard-timings.json index 75b5155cc426..b79e4b7fcef3 100644 --- a/config/scripts/ci-shard-timings.json +++ b/config/scripts/ci-shard-timings.json @@ -12921,7 +12921,6 @@ "tests/e2e/orca-restart-navigation.unit.test.ts": 508, "tests/e2e/orchestration-run-pagination.unit.test.ts": 43, "tests/e2e/orchestration-worker-workspace-resolution.unit.test.ts": 5936, - "tests/e2e/paced-terminal-typing.unit.test.ts": 638, "tests/e2e/paired-cli-agent-launch.unit.test.ts": 8918, "tests/e2e/paired-runtime-rejected-input-remount.unit.test.ts": 9954, "tests/e2e/paired-worktree-agent-command-owner.unit.test.ts": 1767, @@ -12952,7 +12951,6 @@ "tests/e2e/structured-chat-tab-lifetime-cost.unit.test.ts": 10344, "tests/e2e/structured-chat-tab-lifetime.unit.test.ts": 5616, "tests/e2e/structured-chat-tab-unavailable-host.unit.test.ts": 7762, - "tests/e2e/structured-native-chat-routing-authority.unit.test.ts": 955, "tests/e2e/structured-permission-report-publication.unit.test.ts": 14852, "tests/e2e/structured-session-tab-close-regressions.unit.test.ts": 32432, "tests/e2e/structured-session-workspace-authority.unit.test.ts": 9479, @@ -12964,10 +12962,7 @@ "tests/e2e/terminal-binding-crash-hydration.unit.test.ts": 1769, "tests/e2e/terminal-foreground-confirmation.unit.test.ts": 644, "tests/e2e/terminal-inline-image-payload.unit.test.ts": 571, - "tests/e2e/terminal-layout-parity-snapshot.unit.test.ts": 70, "tests/e2e/terminal-perf-presentation.unit.test.ts": 60, - "tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts": 46, - "tests/e2e/terminal-split-activation-latency-report.unit.test.ts": 64, "tests/e2e/web-runtime-session-terminal-host-authority.unit.test.ts": 1061, "tests/e2e/worktree-status-warning.unit.test.ts": 2331, "tests/tools/branch-line-total-renderer.test.mjs": 1222, @@ -13108,7 +13103,6 @@ "tests/e2e/new-workspace-create-more.spec.ts": 36300, "tests/e2e/new-workspace-cross-project-dialog.spec.ts": 17100, "tests/e2e/new-workspace-linked-item-project-switch.spec.ts": 45200, - "tests/e2e/notification-settings.spec.ts": 23500, "tests/e2e/onboarding.spec.ts": 276800, "tests/e2e/orchestration-idle-mail-delivery.spec.ts": 220800, "tests/e2e/orchestration-idle-mail-restore.spec.ts": 27000, diff --git a/tests/e2e/native-chat-image-runtime-context.unit.test.ts b/tests/e2e/native-chat-image-runtime-context.unit.test.ts index d4db2414b7d7..698b6b4213fa 100644 --- a/tests/e2e/native-chat-image-runtime-context.unit.test.ts +++ b/tests/e2e/native-chat-image-runtime-context.unit.test.ts @@ -7,7 +7,7 @@ import type { AppState } from '@/store/types' import type { RuntimeFileOperationArgs } from '../../src/renderer/src/runtime/runtime-file-client-types' import { useAppStore } from '@/store' import type { TerminalTab } from '../../src/shared/terminal-tab-types' -import type { Tab } from '../../src/shared/tab-types' + import { FLOATING_TERMINAL_WORKTREE_ID, getDefaultSettings } from '../../src/shared/constants' import { resolveNativeChatImageRuntimeContext, @@ -205,51 +205,6 @@ describe('resolveNativeChatImageRuntimeContext', () => { } ) - it('resolves a floating chat to its pinned folder on the local host, and nothing before the pin', () => { - const floatingTab: Tab = { - id: 'floating-chat-1', - worktreeId: FLOATING_TERMINAL_WORKTREE_ID, - groupId: 'floating-group', - contentType: 'agent-session', - entityId: 'session-1', - label: 'Codex Chat', - customLabel: null, - color: null, - sortOrder: 0, - createdAt: 0, - isPinned: false, - agentSessionAgent: 'codex' - } - const floatingState: AppState = { - ...state(), - tabsByWorktree: {}, - unifiedTabsByWorktree: { [FLOATING_TERMINAL_WORKTREE_ID]: [floatingTab] }, - getKnownWorktreeById: () => undefined, - worktreesByRepo: {}, - // Why a focused runtime: floating must stay local even when one is selected. - settings: { ...getDefaultSettings('/home/me'), activeRuntimeEnvironmentId: 'env-1' }, - floatingWorkspacePath: '/home/me/changed-setting' - } - - expect(resolveNativeChatImageRuntimeContext(floatingState, 'floating-chat-1')).toBeNull() - expect( - resolveNativeChatImageRuntimeContext( - { - ...floatingState, - structuredSessionLaunchDirectoryByTabId: { - 'floating-chat-1': { sessionId: 'session-1', launchDirectory: '/home/me/pinned' } - } - }, - 'floating-chat-1' - ) - ).toMatchObject({ - worktreeId: FLOATING_TERMINAL_WORKTREE_ID, - worktreePath: '/home/me/pinned', - expectedExecutionHostId: 'local', - target: { kind: 'local' as const } - }) - }) - it('keeps selected-hook results equivalent to full-state resolution through ownership, pin and host transitions', () => { const base = state({ worktreesByRepo: { diff --git a/tests/e2e/native-chat-ssh-delivery.unit.test.ts b/tests/e2e/native-chat-ssh-delivery.unit.test.ts index da846ee01b91..7f0783dfff3b 100644 --- a/tests/e2e/native-chat-ssh-delivery.unit.test.ts +++ b/tests/e2e/native-chat-ssh-delivery.unit.test.ts @@ -8,7 +8,6 @@ import { } from './__mocks__/native-chat-ssh-delivery' import { sendNativeChatAskAnswer, - sendNativeChatMessage, sendNativeChatMessageVerified, resetNativeChatPtySendQueuesForTests } from '../../src/renderer/src/components/native-chat/native-chat-runtime-send' @@ -74,17 +73,6 @@ describe('prompt delivery through production IPC, provider and paired host', () expect(onSettled).not.toHaveBeenCalled() }) - it('keeps ordinary healthy SSH body and Enter complete', async () => { - vi.useFakeTimers() - const ssh = createSshDelivery() - close = ssh.close - const onDeliverySettled = vi.fn() - sendNativeChatMessage(ssh.id, 'body', { onDeliverySettled }) - await vi.advanceTimersByTimeAsync(600) - expect(ssh.bytes.join('')).toBe('\x15body\r') - expect(onDeliverySettled).toHaveBeenCalledExactlyOnceWith(true) - }) - it.each(['accepted', 'lost'] as const)( 'paired terminal.send uses provider settlement for %s acknowledgment', async (mode) => { diff --git a/tests/e2e/network-proxy-bypass-rules.spec.ts b/tests/e2e/network-proxy-bypass-rules.spec.ts deleted file mode 100644 index 9db71f2fe608..000000000000 --- a/tests/e2e/network-proxy-bypass-rules.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, expect } from './helpers/orca-app' -import { waitForSessionReady } from './helpers/store' - -test.describe('network proxy bypass rules', () => { - test('preserves newline-separated hosts and canonicalizes them on blur', async ({ orcaPage }) => { - await waitForSessionReady(orcaPage) - - const original = await orcaPage.evaluate(() => window.api.settings.get()) - try { - await orcaPage.evaluate(() => { - const state = window.__store?.getState() - state?.openSettingsTarget({ pane: 'advanced', repoId: null }) - state?.openSettingsPage() - }) - - await expect(orcaPage.getByRole('heading', { name: 'Advanced', exact: true })).toBeVisible() - await orcaPage.getByRole('button', { name: 'Configure proxy' }).click() - const bypassRules = orcaPage.locator('#settings-http-proxy-bypass-rules') - await expect(bypassRules).toBeVisible() - await expect(bypassRules).toHaveJSProperty('tagName', 'TEXTAREA') - - await bypassRules.fill('localhost\n127.0.0.1\n*.internal.corp') - await expect(bypassRules).toHaveValue('localhost\n127.0.0.1\n*.internal.corp') - await orcaPage.locator('#settings-http-proxy-url').focus() - - await expect - .poll( - async () => - (await orcaPage.evaluate(() => window.api.settings.get())).httpProxyBypassRules - ) - .toBe('localhost;127.0.0.1;*.internal.corp') - await expect(bypassRules).toHaveValue('localhost;127.0.0.1;*.internal.corp') - } finally { - await orcaPage.evaluate( - (settings) => - window.api.settings.set({ httpProxyBypassRules: settings.httpProxyBypassRules ?? '' }), - original - ) - } - }) -}) diff --git a/tests/e2e/notification-settings.spec.ts b/tests/e2e/notification-settings.spec.ts deleted file mode 100644 index 2b4f78fbc570..000000000000 --- a/tests/e2e/notification-settings.spec.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { test, expect } from './helpers/orca-app' -import { waitForSessionReady } from './helpers/store' -import type { GlobalSettings } from '../../src/shared/global-settings-types' - -async function getSettings( - page: Parameters[0] -): Promise { - return page.evaluate(() => window.api.settings.get()) -} - -async function openNotificationSettings( - page: Parameters[0] -): Promise { - await page.evaluate(() => { - const state = window.__store!.getState() - state.openSettingsTarget({ pane: 'notifications', repoId: null }) - state.openSettingsPage() - }) - await expect(page.getByPlaceholder('Search settings')).toBeVisible({ timeout: 10_000 }) - const featureTipDialog = page.getByRole('dialog', { name: 'Voice Dictation is here' }) - if (await featureTipDialog.isVisible().catch(() => false)) { - await page.getByRole('button', { name: 'Maybe Later' }).click() - } - await expect( - page - .locator('[data-settings-section="notifications"]') - .getByRole('heading', { name: 'Notifications', exact: true }) - ).toBeInViewport({ timeout: 10_000 }) -} - -test.describe('Notification settings', () => { - test.beforeEach(async ({ orcaPage }) => { - await waitForSessionReady(orcaPage) - }) - - test('can be toggled from settings and disables child controls', async ({ orcaPage }) => { - await openNotificationSettings(orcaPage) - - const notificationsSection = orcaPage.locator('[data-settings-section="notifications"]') - const enableNotificationsSwitch = notificationsSection.getByRole('switch', { - name: 'Enable Notifications' - }) - const agentTaskCompleteSwitch = notificationsSection.getByRole('switch', { - name: 'Agent Task Complete' - }) - const terminalBellSwitch = notificationsSection.getByRole('switch', { name: 'Terminal Bell' }) - const suppressWhileFocusedSwitch = notificationsSection.getByRole('switch', { - name: 'Suppress While Focused' - }) - const sendTestButton = notificationsSection.getByRole('button', { - name: 'Send Test Notification' - }) - - await expect(enableNotificationsSwitch).toHaveAttribute('aria-checked', 'true') - await expect(agentTaskCompleteSwitch).toBeEnabled() - await expect(terminalBellSwitch).toBeEnabled() - await expect(suppressWhileFocusedSwitch).toBeEnabled() - await expect(sendTestButton).toBeEnabled() - - await agentTaskCompleteSwitch.click() - await expect(agentTaskCompleteSwitch).toHaveAttribute('aria-checked', 'false') - await expect - .poll(async () => (await getSettings(orcaPage)).notifications.agentTaskComplete, { - timeout: 5_000, - message: 'agent task-complete notification setting did not persist after disabling' - }) - .toBe(false) - - await enableNotificationsSwitch.click() - await expect(enableNotificationsSwitch).toHaveAttribute('aria-checked', 'false') - await expect(agentTaskCompleteSwitch).toBeDisabled() - await expect(terminalBellSwitch).toBeDisabled() - await expect(suppressWhileFocusedSwitch).toBeDisabled() - await expect(sendTestButton).toBeDisabled() - await expect - .poll(async () => (await getSettings(orcaPage)).notifications.enabled, { - timeout: 5_000, - message: 'master notification setting did not persist after disabling' - }) - .toBe(false) - - await enableNotificationsSwitch.click() - await agentTaskCompleteSwitch.click() - await expect - .poll(async () => { - const settings = await getSettings(orcaPage) - return { - enabled: settings.notifications.enabled, - agentTaskComplete: settings.notifications.agentTaskComplete - } - }) - .toEqual({ enabled: true, agentTaskComplete: true }) - }) -}) diff --git a/tests/e2e/omp-image-clipboard.spec.ts b/tests/e2e/omp-image-clipboard.spec.ts deleted file mode 100644 index e231df0237eb..000000000000 --- a/tests/e2e/omp-image-clipboard.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { writeFile } from 'node:fs/promises' -import { test, expect } from './helpers/orca-app' -import { ensureTerminalVisible, waitForActiveWorktree, waitForSessionReady } from './helpers/store' -import { showActivePaneAsNativeChat } from './helpers/native-chat-view' -import { waitForActiveTerminalManager } from './helpers/terminal' - -const PNG = - 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAYUlEQVR4nO3PIREAIBAAMFqhMWgyUYMun4QQaBQZEO92twIrZ/RUde1URUBAQEBAQEBAQEBAQEBAQEBAQEBAQEDgO9BiprrRUgkICAgICAgICAgICAgICAgICAgICAgIfHuebLmH1pKnMwAAAABJRU5ErkJggg==' - -test('OMP composer accepts an image clipboard event', async ({ - orcaPage, - electronApp -}, testInfo) => { - await waitForSessionReady(orcaPage) - await waitForActiveWorktree(orcaPage) - await ensureTerminalVisible(orcaPage) - await waitForActiveTerminalManager(orcaPage) - const imagePath = testInfo.outputPath('omp-image-proof.png') - await writeFile(imagePath, Buffer.from(PNG, 'base64')) - await showActivePaneAsNativeChat(orcaPage, 'omp', 'OMP') - const composer = orcaPage.getByRole('textbox', { - name: 'Ask anything, @ to mention files, / for commands', - exact: true - }) - await expect(composer).toBeVisible() - // Substitute only clipboard persistence; never overwrite the user's system clipboard. - await electronApp.evaluate( - ({ ipcMain }, { imagePath }) => { - ipcMain.removeHandler('clipboard:saveImageAsTempFile') - ipcMain.handle('clipboard:saveImageAsTempFile', () => imagePath) - }, - { imagePath } - ) - await composer.evaluate((element, png) => { - const data = new DataTransfer() - const bytes = Uint8Array.from(atob(png), (character) => character.charCodeAt(0)) - data.items.add(new File([bytes], 'omp-image-proof.png', { type: 'image/png' })) - element.dispatchEvent( - new ClipboardEvent('paste', { bubbles: true, cancelable: true, clipboardData: data }) - ) - }, PNG) - await expect( - orcaPage.getByRole('img', { name: 'omp-image-proof.png', exact: true }) - ).toBeVisible() - await orcaPage.screenshot({ path: testInfo.outputPath('omp-image-attached.png') }) -}) diff --git a/tests/e2e/paced-terminal-typing.unit.test.ts b/tests/e2e/paced-terminal-typing.unit.test.ts deleted file mode 100644 index 4f4f4dcb032b..000000000000 --- a/tests/e2e/paced-terminal-typing.unit.test.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { - buildPacedTypingMeasurement, - parseKeyArrivalSidecar, - type KeyArrivalRecord -} from './paced-terminal-typing' - -function validMeasurementArgs(): Parameters[0] { - return { - keyCount: 2, - plannedAtBySeq: new Map([ - [1, 1_000], - [2, 1_020] - ]), - sentAtBySeq: new Map([ - [1, 1_003], - [2, 1_026] - ]), - arrivals: new Map([ - [1, { seq: 1, atMs: 1_010, char: 'a' }], - [2, { seq: 2, atMs: 1_035, char: 'b' }] - ]), - echoSeenAt: new Map([ - [1, 1_014], - [2, 1_041] - ]), - maxTimerDriftMs: 7 - } -} - -describe('parseKeyArrivalSidecar', () => { - it('parses character-attributed arrival records', () => { - const arrivals = parseKeyArrivalSidecar( - '{"seq":1,"atMs":1010,"char":"a"}\n{"seq":2,"atMs":1035,"char":"b"}\n' - ) - - expect([...arrivals]).toEqual([ - [1, { seq: 1, atMs: 1_010, char: 'a' }], - [2, { seq: 2, atMs: 1_035, char: 'b' }] - ]) - }) - - it('ignores only a torn final write', () => { - const arrivals = parseKeyArrivalSidecar('{"seq":1,"atMs":1010,"char":"a"}\n{"seq":2,"atMs"') - - expect([...arrivals.keys()]).toEqual([1]) - expect(() => parseKeyArrivalSidecar('{bad}\n{"seq":1')).toThrow( - 'Invalid typing arrival sidecar line 1' - ) - }) - - it.each([ - ['missing character', '{"seq":1,"atMs":1010}\n'], - ['noninteger sequence', '{"seq":1.5,"atMs":1010,"char":"a"}\n'], - ['non-finite timestamp', '{"seq":1,"atMs":"1010","char":"a"}\n'], - ['empty character', '{"seq":1,"atMs":1010,"char":""}\n'] - ])('rejects a %s', (_label, raw) => { - expect(() => parseKeyArrivalSidecar(raw)).toThrow('Invalid typing arrival record on line 1') - }) - - it('rejects duplicate sequence attribution', () => { - expect(() => - parseKeyArrivalSidecar('{"seq":1,"atMs":1010,"char":"a"}\n{"seq":1,"atMs":1011,"char":"b"}\n') - ).toThrow('Duplicate typing arrival sequence 1') - }) -}) - -describe('buildPacedTypingMeasurement', () => { - it('reports schedule delay and both arrival phases', () => { - const measurement = buildPacedTypingMeasurement(validMeasurementArgs()) - - expect(measurement).toMatchObject({ - dispatchModel: 'absolute-targets-serialized-cdp', - echoObservation: 'xterm-buffer-poll', - keyCount: 2, - dispatchDelayMs: { count: 2, max: 6 }, - plannedToPtyArrivalMs: { count: 2, max: 15 }, - plannedToBufferEchoMs: { count: 2, max: 21 }, - totalMs: { count: 2, max: 15 }, - inputHalfMs: { count: 2, max: 9 }, - echoHalfMs: { count: 2, max: 6 }, - maxTimerDriftMs: 7 - }) - expect(measurement.samples).toEqual([ - { - seq: 1, - expectedChar: 'a', - receivedChar: 'a', - plannedAt: 1_000, - sentAt: 1_003, - ptyArrivedAt: 1_010, - echoSeenAt: 1_014, - dispatchDelayMs: 3, - plannedToPtyArrivalMs: 10, - plannedToBufferEchoMs: 14 - }, - { - seq: 2, - expectedChar: 'b', - receivedChar: 'b', - plannedAt: 1_020, - sentAt: 1_026, - ptyArrivedAt: 1_035, - echoSeenAt: 1_041, - dispatchDelayMs: 6, - plannedToPtyArrivalMs: 15, - plannedToBufferEchoMs: 21 - } - ]) - }) - - it('rejects missing and unexpected sequences', () => { - const missing = validMeasurementArgs() - missing.arrivals = new Map([[1, { seq: 1, atMs: 1_010, char: 'a' }]]) - expect(() => buildPacedTypingMeasurement(missing)).toThrow( - 'PTY arrival sequence mismatch: missing [2], unexpected []' - ) - - const unexpected = validMeasurementArgs() - unexpected.echoSeenAt = new Map([...unexpected.echoSeenAt, [3, 1_050]]) - expect(() => buildPacedTypingMeasurement(unexpected)).toThrow( - 'buffer echo sequence mismatch: missing [], unexpected [3]' - ) - }) - - it('rejects a received character attributed to the wrong sequence', () => { - const args = validMeasurementArgs() - args.arrivals = new Map([ - [1, { seq: 1, atMs: 1_010, char: 'a' }], - [2, { seq: 2, atMs: 1_035, char: 'x' }] - ]) - - expect(() => buildPacedTypingMeasurement(args)).toThrow( - 'Typing sample 2 received "x", expected "b"' - ) - }) - - it('rejects invalid clock ordering and non-finite timestamps', () => { - const reversed = validMeasurementArgs() - reversed.echoSeenAt = new Map([ - [1, 1_009], - [2, 1_041] - ]) - expect(() => buildPacedTypingMeasurement(reversed)).toThrow( - 'Typing sample 1 has invalid clock order' - ) - - const nonFinite = validMeasurementArgs() - nonFinite.sentAtBySeq = new Map([ - [1, Number.NaN], - [2, 1_026] - ]) - expect(() => buildPacedTypingMeasurement(nonFinite)).toThrow( - 'Typing sample 1 has a non-finite timestamp' - ) - }) -}) diff --git a/tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts b/tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts index 5dd9dd8b9205..390bc77d3c92 100644 --- a/tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts +++ b/tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts @@ -246,13 +246,6 @@ async function runCliTerminalRetentionJourney( } } -test('keeps a host-created CLI terminal when an earlier host-created terminal exists', async ({ - orcaPage -}, testInfo) => { - test.setTimeout(600_000) - await runCliTerminalRetentionJourney(orcaPage, testInfo, 'cli-terminal-graph-sync', true) -}) - // The real CLI omits clientMutationId: its first host-admitted tab must establish persistence authority. // Reverting store.ts/pty.ts fails at host inventory retention. test('keeps a host-created CLI terminal that is the first one on the host', async ({ diff --git a/tests/e2e/structured-native-chat-routing-authority.unit.test.ts b/tests/e2e/structured-native-chat-routing-authority.unit.test.ts deleted file mode 100644 index b231dd127777..000000000000 --- a/tests/e2e/structured-native-chat-routing-authority.unit.test.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { EVERY_AGENT_CHAT } from '../../src/shared/native-chat/every-agent-chat.test-fixture' -import { afterEach, describe, expect, it, vi } from 'vitest' -import type * as SharedLaunchRoute from '../../src/shared/structured-native-chat-launch-route' -import { decideWorkerStartMode } from '../../src/main/runtime/rpc/methods/orchestration-worker-start-mode' -import { resolveStructuredNativeChatSupport } from '../../src/shared/structured-native-chat-launch-route' - -vi.mock('../../src/shared/structured-native-chat-launch-route', async (importOriginal) => { - const actual = await importOriginal() - return { - ...actual, - resolveStructuredNativeChatSupport: vi.fn(actual.resolveStructuredNativeChatSupport) - } -}) - -const settings = { - nativeChatProviders: EVERY_AGENT_CHAT, - experimentalStructuredNativeChat: true, - openAgentTabsInChatByDefault: true -} -const predicate = vi.mocked(resolveStructuredNativeChatSupport) -afterEach(() => predicate.mockReset()) - -const placements = [ - {}, - { on: 'server-1' }, - { on: 'local' }, - { terminal: 'term_1' }, - { worktree: 'current' }, - { worktree: 'new-child' }, - { worktree: 'new-top-level' }, - { model: 'opus', effort: 'high' }, - { worktree: 'new-child', model: 'opus', effort: 'high' } -] -describe('shared feasibility owns every caller decision', () => { - // Federated workers start terminal-only on another runtime, so this host must not decide native feasibility for them. - it.each(placements.filter((placement) => 'on' in placement))( - 'places a worker on another runtime as a terminal agent for %j', - (placement) => { - predicate.mockReturnValue({ supported: true }) - const receipt = decideWorkerStartMode({ params: { agent: 'claude', ...placement }, settings }) - expect(receipt).toMatchObject({ - mode: 'terminal', - preferred: 'structured', - reason: 'remote_execution_host' - }) - expect(predicate).not.toHaveBeenCalled() - } - ) -}) diff --git a/tests/e2e/terminal-layout-parity-snapshot.unit.test.ts b/tests/e2e/terminal-layout-parity-snapshot.unit.test.ts deleted file mode 100644 index 7cc81bdf774d..000000000000 --- a/tests/e2e/terminal-layout-parity-snapshot.unit.test.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { - compareParityCaptures, - isParityClean, - type DeclaredParityDifference, - type RawParityCapture -} from './terminal-layout-parity-snapshot' - -const ids = { - a: { - repo: '3e6c2c4c-adf9-4316-ba08-8c009886da6c', - tab: 'ac89c78e-5baa-4c06-be9b-3594b95b8974', - leafA: 'f79c6b84-37eb-491c-bb55-d238166cb478', - leafB: '0faa8a32-15dc-432c-a682-10fe5f8cb29d', - pty: '@@9bb36b1f', - path: '/private/var/folders/x/T/orca-e2e-repo-AAAA', - now: 1791231171039 - }, - b: { - repo: 'daf8bee5-de36-4217-8eaf-f2cb5c684bcc', - tab: '07413b91-7cb7-4925-8d48-99f125cdc8ad', - leafA: 'e5bd116c-8cfb-4165-946a-bfab35aba500', - leafB: '3ca564d4-1d13-4a96-91a2-6d523c0dbb4c', - pty: '@@484c9b33', - path: '/private/var/folders/x/T/orca-e2e-repo-BBBB', - now: 1791231209172 - } -} - -/** One split tab with every volatile value drawn from `run`, so two runs differ only in noise. */ -function capture(run: (typeof ids)['a'], ratio = 0.5): RawParityCapture { - const worktreeId = `${run.repo}::${run.path}` - const layout = { - root: { - type: 'split', - direction: 'vertical', - ratio, - first: { type: 'leaf', leafId: run.leafA }, - second: { type: 'leaf', leafId: run.leafB } - }, - activeLeafId: run.leafB, - // Id-keyed map whose raw key order disagrees between runs. - ptyIdsByLeafId: - run === ids.a - ? { [run.leafA]: `${worktreeId}${run.pty}`, [run.leafB]: `${worktreeId}@@00000001` } - : { [run.leafB]: `${worktreeId}@@00000002`, [run.leafA]: `${worktreeId}${run.pty}` }, - buffersByLeafId: { [run.leafA]: `prompt at ${run.now}` } - } - const session = { - activeWorktreeId: worktreeId, - tabsByWorktree: { [worktreeId]: [{ id: run.tab, createdAt: run.now, title: 'Terminal 1' }] }, - terminalLayoutsByTabId: { [run.tab]: layout }, - lastVisitedAtByWorktreeId: { [`local|${worktreeId}`]: run.now } - } - return { - scenario: 'split', - pathLabels: { [run.path]: '' }, - checkpoints: [{ label: 'after-quit', renderer: session, persisted: { local: session } }] - } -} - -const one = (value: RawParityCapture): Map => - new Map([[value.scenario, value]]) - -describe('terminal layout parity', () => { - it('treats two runs of one commit as equal despite ids, paths, times and key order', () => { - const report = compareParityCaptures(one(capture(ids.a)), one(capture(ids.b)), []) - expect(report.undeclared).toEqual([]) - expect(isParityClean(report)).toBe(true) - }) - - it('detects an injected layout difference and names where it is', () => { - const report = compareParityCaptures(one(capture(ids.a)), one(capture(ids.b, 0.6)), []) - expect(isParityClean(report)).toBe(false) - expect(report.undeclared.map((difference) => difference.path)).toEqual([ - '[0].renderer.terminalLayoutsByTabId.#2.root.ratio', - '[0].persisted.local.terminalLayoutsByTabId.#2.root.ratio' - ]) - }) - - it('treats an absent map and an empty one as equal', () => { - const withEmpty = capture(ids.b) - withEmpty.checkpoints[0]!.persisted = { local: { tombstones: {} } } - const withoutMap = capture(ids.a) - withoutMap.checkpoints[0]!.persisted = { local: {} } - expect(compareParityCaptures(one(withoutMap), one(withEmpty), []).undeclared).toEqual([]) - }) - - it('detects a scenario that only one side captured', () => { - const report = compareParityCaptures(one(capture(ids.a)), new Map(), []) - expect(report.undeclared).toMatchObject([{ scenario: 'split', head: '' }]) - }) - - it('accepts a difference declared for its scenario and bug, and only there', () => { - const declaration: DeclaredParityDifference = { - scenario: 'split', - bugId: 'STA-0000', - paths: ['[0].renderer.terminalLayoutsByTabId', '[0].persisted.local.terminalLayoutsByTabId'], - reason: 'test' - } - const report = compareParityCaptures(one(capture(ids.a)), one(capture(ids.b, 0.6)), [ - declaration - ]) - expect(isParityClean(report)).toBe(true) - expect(report.declared.map((difference) => difference.bugId)).toEqual(['STA-0000', 'STA-0000']) - - const elsewhere = compareParityCaptures(one(capture(ids.a)), one(capture(ids.b, 0.6)), [ - { ...declaration, scenario: 'other' } - ]) - expect(elsewhere.undeclared).toHaveLength(2) - }) - - it('reports a path main does not reproduce without failing on it', () => { - const report = compareParityCaptures( - one(capture(ids.a)), - one(capture(ids.b, 0.6)), - [], - [{ scenario: 'split', paths: ['[0].renderer', '[0].persisted'], evidence: 'test' }] - ) - expect(isParityClean(report)).toBe(true) - expect(report.unstableOnMain).toHaveLength(2) - }) - - it('fails a declared fix that changed nothing', () => { - const report = compareParityCaptures(one(capture(ids.a)), one(capture(ids.b)), [ - { scenario: 'split', bugId: 'STA-0000', paths: ['[0]'], reason: 'test' } - ]) - expect(isParityClean(report)).toBe(false) - expect(report.unusedDeclarations).toHaveLength(1) - }) -}) diff --git a/tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts b/tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts deleted file mode 100644 index 5e52d7227e58..000000000000 --- a/tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs' -import { tmpdir } from 'node:os' -import { join } from 'node:path' -import { afterEach, describe, expect, it } from 'vitest' -import { - sanitizeTerminalSplitLatencyReport, - writeTerminalSplitLatencyArtifact -} from './terminal-split-activation-latency-artifact' - -const temporaryDirectories: string[] = [] - -afterEach(() => { - while (temporaryDirectories.length > 0) { - const directory = temporaryDirectories.pop() - if (directory) { - rmSync(directory, { recursive: true, force: true }) - } - } -}) - -describe('writeTerminalSplitLatencyArtifact', () => { - it('writes the report body to the requested path', () => { - const directory = mkdtempSync(join(tmpdir(), 'orca-split-latency-artifact-')) - temporaryDirectories.push(directory) - const outputPath = join(directory, 'report.json') - const body = '{"status":"passed"}\n' - - writeTerminalSplitLatencyArtifact(outputPath, body) - - expect(existsSync(outputPath)).toBe(true) - expect(readFileSync(outputPath, 'utf8')).toBe(body) - }) - - it('throws when the report path cannot be written', () => { - const directory = mkdtempSync(join(tmpdir(), 'orca-split-latency-artifact-')) - temporaryDirectories.push(directory) - const outputPath = join(directory, 'missing-parent', 'report.json') - - expect(() => writeTerminalSplitLatencyArtifact(outputPath, '{}')).toThrow( - `[terminal-split-activation-latency] unable to write ${outputPath}` - ) - }) -}) - -describe('sanitizeTerminalSplitLatencyReport', () => { - it('replaces the machine-local test repo path', () => { - expect( - sanitizeTerminalSplitLatencyReport({ testRepoPath: '/var/folders/ab/T/orca-seeded-repo' }) - .testRepoPath - ).toBe('') - }) - - it('redacts absolute paths and bounds free-form cleanup text', () => { - const sanitized = sanitizeTerminalSplitLatencyReport({ - abortReason: 'ENOENT: /Users/someone/secret/dir missing', - measuredSamples: [{ shortcutToFocusMs: 12, cleanupError: `x /tmp/a ${'y'.repeat(500)}` }] - }) - - expect(sanitized.abortReason).toBe('ENOENT: missing') - const [sample] = sanitized.measuredSamples as { cleanupError: string }[] - expect(sample?.cleanupError).not.toContain('/tmp/a') - expect(sample?.cleanupError.length).toBeLessThanOrEqual(200) - }) - - it('keeps timing fields and non-string cleanup values intact', () => { - const sanitized = sanitizeTerminalSplitLatencyReport({ - headlineMs: { shortcutToFocusP50: 12 }, - measuredSamples: [{ shortcutToFocusMs: 12, cleanupError: null }] - }) - - expect(sanitized.headlineMs).toEqual({ shortcutToFocusP50: 12 }) - expect(sanitized.measuredSamples).toEqual([{ shortcutToFocusMs: 12, cleanupError: null }]) - }) -}) diff --git a/tests/e2e/terminal-split-activation-latency-report.unit.test.ts b/tests/e2e/terminal-split-activation-latency-report.unit.test.ts deleted file mode 100644 index 8c19e5b544dd..000000000000 --- a/tests/e2e/terminal-split-activation-latency-report.unit.test.ts +++ /dev/null @@ -1,192 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { buildBenchmarkReport, summarizeSamples } from './terminal-split-activation-latency-report' -import { - createSplitLatencySample, - mergeSplitLatencyMainProbeEvents, - type RendererPhaseStamps, - type SplitLatencyMainProbeEvent -} from './terminal-split-activation-latency-phases' - -function createRendererStamps(): RendererPhaseStamps { - return { - marker: 'echo-marker', - sourcePaneId: 1, - sourcePtyId: 'pty-source', - newPaneId: 2, - newPtyId: 'pty-child', - rendererTimeOriginEpochMs: 1_000, - keydownAtMs: 10, - focusAtMs: 20, - cwdRequestAtMs: null, - cwdSettledAtMs: null, - ptySpawnRequestAtMs: null, - ptySpawnResultAtMs: null, - ptyBoundAtMs: 82, - fixtureUnlockRequestedAtMs: 83, - fixtureUnlockIpcWriteAtMs: null, - fixtureUnlockIpcWriteChannel: null, - fixtureReadyParsedAtMs: 100, - inputAtMs: 101, - firstEchoAtMs: 103 - } -} - -function createMainProbeEvents(): SplitLatencyMainProbeEvent[] { - return [ - { - kind: 'cwd-request', - operationId: 99, - atEpochMs: 1_010, - ptyId: 'pty-other', - writeChannel: null - }, - { - kind: 'cwd-request', - operationId: 1, - atEpochMs: 1_011, - ptyId: 'pty-source', - writeChannel: null - }, - { - kind: 'cwd-settled', - operationId: 1, - atEpochMs: 1_060, - ptyId: 'pty-source', - writeChannel: null - }, - { - kind: 'pty-spawn-request', - operationId: 2, - atEpochMs: 1_061, - ptyId: null, - writeChannel: null - }, - { - kind: 'pty-spawn-result', - operationId: 3, - atEpochMs: 1_070, - ptyId: 'pty-other', - writeChannel: null - }, - { - kind: 'pty-spawn-result', - operationId: 2, - atEpochMs: 1_080, - ptyId: 'pty-child', - writeChannel: null - }, - { - kind: 'pty-write-cr', - operationId: null, - atEpochMs: 1_081, - ptyId: 'pty-other', - writeChannel: 'pty:write' - }, - { - kind: 'pty-write-cr', - operationId: null, - atEpochMs: 1_084, - ptyId: 'pty-child', - writeChannel: 'pty:writeAccepted' - } - ] -} - -describe('terminal split activation latency report', () => { - it('attributes main-process phases to the matching source and child PTYs', () => { - const stamps = mergeSplitLatencyMainProbeEvents(createRendererStamps(), createMainProbeEvents()) - const sample = createSplitLatencySample({ - phase: 'measured', - iteration: 0, - stamps, - completedWithinTimeout: true, - paneCountAfterProbe: 2, - ptyExitObserved: true, - cleanupError: null - }) - - expect(sample).toMatchObject({ - cwdRequestAtMs: 11, - cwdSettledAtMs: 60, - ptySpawnRequestAtMs: 61, - ptySpawnResultAtMs: 80, - fixtureUnlockIpcWriteAtMs: 84, - fixtureUnlockIpcWriteChannel: 'pty:writeAccepted', - shortcutToCwdRequestMs: 1, - cwdLookupMs: 49, - cwdSettleToPtySpawnRequestMs: 1, - ptySpawnRequestToResultMs: 19, - ptySpawnResultToBindMs: 2, - fixtureUnlockRequestToIpcWriteMs: 1, - fixtureUnlockIpcWriteToReadyParseMs: 16, - success: true, - missing: [] - }) - }) - - it('embeds revision identity and summarizes the attributed phases', () => { - const stamps = mergeSplitLatencyMainProbeEvents(createRendererStamps(), createMainProbeEvents()) - const sample = createSplitLatencySample({ - phase: 'measured', - iteration: 0, - stamps, - completedWithinTimeout: true, - paneCountAfterProbe: 2, - ptyExitObserved: true, - cleanupError: null - }) - const revision = { headSha: 'a'.repeat(40), dirty: false } - const result = buildBenchmarkReport({ - label: 'candidate', - revision, - headfulRun: true, - windowState: { browserWindowVisible: true, windowCount: 1 }, - documentVisibility: 'visible', - testRepoPath: '/tmp/repo', - warmupSamples: [{ ...sample, phase: 'warmup' }], - measuredSamples: [sample], - abortError: null, - config: { - warmupCycles: 1, - measuredCycles: 1, - maxMeasuredCycles: 200, - testTimeoutMs: 30_000, - splitChord: 'Meta+d', - closeChord: 'Meta+w', - sampleTimeoutMs: 15_000, - cleanupTimeoutMs: 15_000, - processCwdCacheExpiryWaitMs: 1_650 - } - }) - - expect(result.report).toMatchObject({ - schemaVersion: 2, - revision, - status: 'passed', - valid: true - }) - expect(result.measuredSummary.distributions.cwdLookupMs.p50).toBe(49) - expect(result.measuredSummary.distributions.ptySpawnRequestToResultMs.p50).toBe(19) - expect(result.measuredSummary.distributions.fixtureUnlockIpcWriteToReadyParseMs.p50).toBe(16) - }) - - it('invalidates a sample when the actual fixture-unlock IPC write is missing', () => { - const stamps = mergeSplitLatencyMainProbeEvents( - createRendererStamps(), - createMainProbeEvents().filter((event) => event.kind !== 'pty-write-cr') - ) - const sample = createSplitLatencySample({ - phase: 'measured', - iteration: 0, - stamps, - completedWithinTimeout: true, - paneCountAfterProbe: 2, - ptyExitObserved: true, - cleanupError: null - }) - - expect(sample.success).toBe(false) - expect(sample.missing).toContain('fixture-unlock-ipc-write') - expect(summarizeSamples([sample], 1).counts.missingEvents.fixtureUnlockIpcWrite).toBe(1) - }) -}) From 957a99e94d9dbed0596ac6726220e2bb6580b948 Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Tue, 3 Nov 2026 05:39:59 -0800 Subject: [PATCH 3/4] test: prune timeout ratchet after test removal --- config/flaky-test-pattern-baseline.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/flaky-test-pattern-baseline.txt b/config/flaky-test-pattern-baseline.txt index a98f55be7164..c7580151108d 100644 --- a/config/flaky-test-pattern-baseline.txt +++ b/config/flaky-test-pattern-baseline.txt @@ -1343,7 +1343,7 @@ 2 test-timeout-needs-reason:tests/e2e/packaged-mixed-version-browser-placement.spec.ts 2 test-timeout-needs-reason:tests/e2e/paired-browser-create-navigation-deadline.spec.ts 3 test-timeout-needs-reason:tests/e2e/paired-browser-creation-reconciliation-failure.spec.ts -2 test-timeout-needs-reason:tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts +1 test-timeout-needs-reason:tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts 1 test-timeout-needs-reason:tests/e2e/paired-client-first-terminal-unopened-host-worktree.spec.ts 1 test-timeout-needs-reason:tests/e2e/paired-client-host-repo-id-change-rows.spec.ts 1 test-timeout-needs-reason:tests/e2e/paired-client-hosted-browser-cookie-survival.spec.ts From f28f05cee56724749aae4882331b0624266a19fc Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Tue, 3 Nov 2026 05:55:27 -0800 Subject: [PATCH 4/4] test: correct remaining split benchmark coverage claims --- config/reliability-gates.jsonc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/reliability-gates.jsonc b/config/reliability-gates.jsonc index 6e513eca5aac..864b7910d3e0 100644 --- a/config/reliability-gates.jsonc +++ b/config/reliability-gates.jsonc @@ -8832,7 +8832,7 @@ "evidenceProcedure": "Run the benchmark spec in a visible macOS Electron project from a clean primary worktree, complete 3 warmups followed by 20 measured cold-CWD cycles, require zero missing events and successful cleanup, save the schema-v2 JSON report, and record its SHA-256 plus embedded revision identity. The four older records are schema-v1 historical audit records whose labels do not verify the checkout or include phase attribution; the clean schema-v2 record is the current candidate evidence. A paired baseline/final rerun with one revision-verifying harness remains required before promotion or a readiness comparison claim.", "runtimeBudget": { "p95Seconds": 240, - "scope": "the full listed gate command set: one current twelve-path focused invocation (ten runnable test files plus two benchmark support modules), one historical nine-file unit invocation, one historical seven-file unit invocation, and five opt-in 3-warmup/20-measured visible Electron benchmark invocations (four schema-v1 historical records plus one clean schema-v2 record)" + "scope": "the full listed gate command set: one current nine-path focused invocation (seven runnable test files plus two benchmark support modules that register no tests), one historical nine-file unit invocation, one historical seven-file unit invocation, and five opt-in 3-warmup/20-measured visible Electron benchmark invocations (four schema-v1 historical records plus one clean schema-v2 record)" }, "flakeHistory": { "status": "not-started", @@ -8857,7 +8857,7 @@ "No physical local-daemon, SSH, WSL, Linux, Windows, or folder-workspace latency journey has run; the synthetic fixture is currently skipped on Windows because it requires a POSIX shell.", "Remote-runtime split creation remains host-delegated and its transport does not consume the local pre-connect seed/capture options; CWD handoff is covered, but remote-runtime pre-connect input replay has no implementation or evidence.", "The four stored schema-v1 artifacts predate the final harness attribution/reporting and do not embed revision identity; the clean schema-v2 candidate artifact is revision-verified, but both product revisions still need a paired schema-v2 rerun with one committed harness before promotion.", - "No forced-failure visible benchmark artifact has been recorded; the focused artifact-write and missing-event report contracts verify local failure handling, while failure-report serialization remains unverified by a full visible run.", + "No forced-failure visible benchmark artifact has been recorded. The audit removed the focused artifact-write and missing-event report contracts, so neither their isolated failure handling nor full-run failure-report serialization has current verification here.", "No clean schema-v2 baseline phase artifact exists, so the attributed CWD, spawn, fixture-ready, bind, and echo timings diagnose where time is spent but do not establish a shell-readiness improvement or regression.", "The audit removed a fake-DOM split/close suite. Its mocked focus, scroll, fit and WebGL alarms lose dedicated checks; surviving tests and historical runs do not establish equivalent coverage. Historical commands retain executed roots, while currentCommand maps surviving roots without claiming a new run.", "The test-value audit retires the benchmark artifact and report unit suites. Their direct JSON write/readback, unwritable-path, path-redaction/string-bound, synthetic phase-attribution, revision/percentile and missing-unlock-event alarms are lost. The real benchmark and its capture/report/writer helpers remain; they do not provide equivalent isolated helper validation. Historical executed commands, counts and results remain historical."