mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
refactor: colocate remote runtime error classification (#33024)
This commit is contained in:
@@ -13317,7 +13317,7 @@
|
||||
"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/startup/ssh-startup-reconnect.test.ts src/renderer/src/lib/resolved-worktree-execution-host.test.ts src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts src/renderer/src/runtime/sync-runtime-graph-scheduling.test.ts src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.test.ts src/renderer/src/components/terminal-pane/pty-connection-spawn-and-startup.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/runtime/remote-runtime-session-tabs-inflight.test.ts src/renderer/src/runtime/web-session-terminal-handle-events.test.ts src/renderer/src/store/slices/terminal-pty-identity-replacement.test.ts",
|
||||
"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport-reattach-admission.test.ts src/renderer/src/components/terminal-pane/pty-transport-detach-attach-handoff.test.ts",
|
||||
"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-error-accumulation.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-attach-subscription.test.ts --reporter=dot",
|
||||
"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-attach-subscription.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-expired-pane-recovery.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-outcome-recovery.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-recovery-state.test.ts src/renderer/src/components/terminal-pane/TerminalRemoteRuntimeReconnectBanner.test.tsx src/renderer/src/components/terminal-pane/terminal-remote-runtime-recovery-ui-state.test.ts src/shared/remote-runtime-socket-liveness.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-socket-generation.test.ts src/shared/remote-runtime-client-error-classification.test.ts src/main/runtime/rpc/remote-runtime-server-heartbeat.test.ts src/main/runtime/rpc/methods/terminal-create-idempotency.test.ts src/main/runtime/orca-runtime-terminal-create-idempotency.test.ts",
|
||||
"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-attach-subscription.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-expired-pane-recovery.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-outcome-recovery.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-recovery-state.test.ts src/renderer/src/components/terminal-pane/TerminalRemoteRuntimeReconnectBanner.test.tsx src/renderer/src/components/terminal-pane/terminal-remote-runtime-recovery-ui-state.test.ts src/shared/remote-runtime-socket-liveness.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-socket-generation.test.ts src/shared/remote-runtime/remote-runtime-client-error-classification.test.ts src/main/runtime/rpc/remote-runtime-server-heartbeat.test.ts src/main/runtime/rpc/methods/terminal-create-idempotency.test.ts src/main/runtime/orca-runtime-terminal-create-idempotency.test.ts",
|
||||
"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/hooks/ipc-events/direct-ssh-connect-reply-routing.test.ts src/renderer/src/store/slices/terminals-hydration.test.ts src/renderer/src/store/slices/repos-ssh-host-reconciliation.test.ts src/renderer/src/hooks/direct-ssh-state-routing.test.ts src/renderer/src/components/terminal-pane/pty-connection-spawn-and-startup.test.ts src/renderer/src/components/terminal-pane/terminal-pane-tab-detach.test.ts --reporter=dot",
|
||||
"pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/ssh/ssh.test.ts src/main/ipc/worktrees-ssh-repo-owner-resolution.test.ts src/main/ipc/worktrees-lineage-hydration.test.ts src/main/runtime/public-ssh-state.test.ts src/main/ssh/connection/ssh-connection-manager.test.ts src/main/ssh/connection/ssh-connection.test.ts src/main/ssh/ssh-provider-authority.test.ts src/preload/ssh-authority-forwarding.test.ts src/renderer/src/runtime/runtime-client-events.test.ts src/renderer/src/runtime/runtime-environment-ssh-state.test.ts src/shared/ssh-retained-payload-admission.test.ts --reporter=dot",
|
||||
"pnpm exec electron-vite build --mode e2e",
|
||||
@@ -13352,7 +13352,7 @@
|
||||
"src/shared/remote-runtime-socket-liveness.test.ts",
|
||||
"src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts",
|
||||
"src/shared/remote-runtime/control/remote-runtime-shared-control-socket-generation.test.ts",
|
||||
"src/shared/remote-runtime-client-error-classification.test.ts",
|
||||
"src/shared/remote-runtime/remote-runtime-client-error-classification.test.ts",
|
||||
"src/main/runtime/rpc/remote-runtime-server-heartbeat.test.ts",
|
||||
"src/main/runtime/rpc/methods/terminal-create-idempotency.test.ts",
|
||||
"src/main/runtime/orca-runtime-terminal-create-idempotency.test.ts",
|
||||
@@ -13673,7 +13673,7 @@
|
||||
"date": "2026-07-21",
|
||||
"runner": "local",
|
||||
"platform": "macos",
|
||||
"command": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-attach-subscription.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-expired-pane-recovery.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-outcome-recovery.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-recovery-state.test.ts src/renderer/src/components/terminal-pane/TerminalRemoteRuntimeReconnectBanner.test.tsx src/renderer/src/components/terminal-pane/terminal-remote-runtime-recovery-ui-state.test.ts src/shared/remote-runtime-socket-liveness.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-socket-generation.test.ts src/shared/remote-runtime-client-error-classification.test.ts src/main/runtime/rpc/remote-runtime-server-heartbeat.test.ts src/main/runtime/rpc/methods/terminal-create-idempotency.test.ts src/main/runtime/orca-runtime-terminal-create-idempotency.test.ts",
|
||||
"command": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-attach-subscription.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-expired-pane-recovery.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-outcome-recovery.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/components/terminal-pane/remote-runtime-pty-recovery-state.test.ts src/renderer/src/components/terminal-pane/TerminalRemoteRuntimeReconnectBanner.test.tsx src/renderer/src/components/terminal-pane/terminal-remote-runtime-recovery-ui-state.test.ts src/shared/remote-runtime-socket-liveness.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-socket-generation.test.ts src/shared/remote-runtime/remote-runtime-client-error-classification.test.ts src/main/runtime/rpc/remote-runtime-server-heartbeat.test.ts src/main/runtime/rpc/methods/terminal-create-idempotency.test.ts src/main/runtime/orca-runtime-terminal-create-idempotency.test.ts",
|
||||
"result": "passed",
|
||||
"durationSeconds": 5,
|
||||
"summary": "Eleven fault-injection and recovery-UI files and 127 tests passed, covering suspended heartbeat clocks, stale socket, PTY, and create generations, canonical pre-ready close recovery with one replacement subscription, cold and repeated PTY reattachment, authoritative health, bounded PTY and terminal-create recovery, post-probe timeout clipping, manually retryable create cutoff, accurate capability-probe failures, same-PTY manual reconnect, pane-state cleanup, fatal error deduplication, stable create identity, cross-process PTY adoption, and fail-closed legacy inventory."
|
||||
|
||||
@@ -11784,7 +11784,7 @@
|
||||
"src/shared/remote-pairing-address.test.ts": 239,
|
||||
"src/shared/remote-pairing-verification.test.ts": 202,
|
||||
"src/shared/remote-rpc-content-budget.test.ts": 95,
|
||||
"src/shared/remote-runtime-client-error-classification.test.ts": 42,
|
||||
"src/shared/remote-runtime/remote-runtime-client-error-classification.test.ts": 42,
|
||||
"src/shared/remote-runtime-client.test.ts": 5160,
|
||||
"src/shared/remote-runtime/remote-runtime-connect-bound.test.ts": 572,
|
||||
"src/shared/remote-runtime-memory-limits.test.ts": 120,
|
||||
|
||||
@@ -511,7 +511,7 @@ describe('managed-SSH remote sources routing', () => {
|
||||
'src/main/ipc/runtime-environments/runtime-environment-status-probe.ts',
|
||||
'src/main/ipc/runtime-environments/orcad-runtime-lifecycle-handlers.ts',
|
||||
'src/shared/protocol-version.ts',
|
||||
'src/shared/remote-runtime-client-error-classification.ts',
|
||||
'src/shared/remote-runtime/remote-runtime-client-error-classification.ts',
|
||||
// #30047 and #30060: sidebar sleep and project removal.
|
||||
'src/renderer/src/components/sidebar/sleep-worktree-flow.ts',
|
||||
'src/renderer/src/components/sidebar/ssh-host-remove-resolution.ts',
|
||||
|
||||
@@ -3,7 +3,7 @@ import { RemoteRuntimeClientError } from '../../shared/remote-runtime-client-err
|
||||
import {
|
||||
isRecoverableRemoteRuntimeConnectionError,
|
||||
toRemoteRuntimeClientErrorLike
|
||||
} from '../../shared/remote-runtime-client-error-classification'
|
||||
} from '../../shared/remote-runtime/remote-runtime-client-error-classification'
|
||||
import { nextBrowserHostReconnectDelay } from './browser-host-lease-reconnect-delay'
|
||||
import type { BrowserHostReconnectDelay } from './browser-host-lease-reconnect-delay'
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { ORCAD_MANAGED_REMOTE_PORT } from '../../../shared/orcad-managed-runtime
|
||||
import {
|
||||
isRecoverableRemoteRuntimeConnectionError,
|
||||
toRemoteRuntimeClientErrorLike
|
||||
} from '../../../shared/remote-runtime-client-error-classification'
|
||||
} from '../../../shared/remote-runtime/remote-runtime-client-error-classification'
|
||||
import { RemoteRuntimeClientError } from '../../../shared/remote-runtime-client-error'
|
||||
import {
|
||||
getPreferredPairedRuntimeConnection,
|
||||
|
||||
@@ -28,7 +28,7 @@ import { retrySkillTransferRpc } from './skill-transfer-rpc-retry'
|
||||
import {
|
||||
isRecoverableRemoteRuntimeConnectionError,
|
||||
toRemoteRuntimeClientErrorLike
|
||||
} from '../../shared/remote-runtime-client-error-classification'
|
||||
} from '../../shared/remote-runtime/remote-runtime-client-error-classification'
|
||||
|
||||
const DIRECT_DOWNLOAD_FAILURE = 'skill-download-transport-failed'
|
||||
const DEVELOPMENT_DOWNLOAD_POLICY_FAILURES = new Set([
|
||||
|
||||
+1
-1
@@ -197,7 +197,7 @@ describe('remote runtime outage: toast flood and stuck reconnect (issue3)', () =
|
||||
|
||||
it('sanity: the exact reported timeout+funnel toast text classifies as recoverable, so flood text must come from unclassified surfaces', async () => {
|
||||
const { isRecoverableRemoteRuntimeConnectionError, toRemoteRuntimeClientErrorLike } =
|
||||
await import('../../../../shared/remote-runtime-client-error-classification')
|
||||
await import('../../../../shared/remote-runtime/remote-runtime-client-error-classification')
|
||||
const rendererSide = toRemoteRuntimeClientErrorLike(
|
||||
electronIpcRejection('RemoteRuntimeClientError', TIMEOUT_WITH_TAILSCALE_HINT)
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
isRecoverableRemoteRuntimeConnectionError,
|
||||
isRuntimeRpcQueueOverloadError,
|
||||
toRemoteRuntimeClientErrorLike
|
||||
} from '../../../../shared/remote-runtime-client-error-classification'
|
||||
} from '../../../../shared/remote-runtime/remote-runtime-client-error-classification'
|
||||
import type {
|
||||
RuntimeCreateAgentSessionResult,
|
||||
RuntimeEnsureAgentSessionResult
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RuntimeRpcResponse } from '../../../shared/runtime-rpc-envelope'
|
||||
import { isRecoverableRemoteRuntimeConnectionError } from '../../../shared/remote-runtime-client-error-classification'
|
||||
import { isRecoverableRemoteRuntimeConnectionError } from '../../../shared/remote-runtime/remote-runtime-client-error-classification'
|
||||
import {
|
||||
encodeTerminalStreamFrame,
|
||||
type TerminalStreamOpcode
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
import {
|
||||
isRecoverableRemoteRuntimeConnectionError,
|
||||
toRemoteRuntimeClientErrorLike
|
||||
} from '../../../shared/remote-runtime-client-error-classification'
|
||||
} from '../../../shared/remote-runtime/remote-runtime-client-error-classification'
|
||||
import {
|
||||
callRuntimeFileMutationWithCapabilities,
|
||||
isRuntimeConnectionChangedError
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { RuntimeRpcResponse } from '../../../shared/runtime-rpc-envelope'
|
||||
import {
|
||||
isRecoverableRemoteRuntimeConnectionError,
|
||||
toRemoteRuntimeClientErrorLike
|
||||
} from '../../../shared/remote-runtime-client-error-classification'
|
||||
} from '../../../shared/remote-runtime/remote-runtime-client-error-classification'
|
||||
import { hasRuntimeRpcErrorCode } from '../../../shared/runtime-rpc-error-code'
|
||||
import { cacheStableSurfaceRecoveryFailure } from './web-session-terminal-orphan-recovery-cache'
|
||||
import { runInTerminalRecoveryRpcLane } from './web-session-terminal-orphan-recovery-rpc-lane'
|
||||
|
||||
@@ -4,7 +4,7 @@ import { isWebClient } from '../components/sidebar/worktree-card-model'
|
||||
import {
|
||||
isRecoverableRemoteRuntimeConnectionError,
|
||||
toRemoteRuntimeClientErrorLike
|
||||
} from '../../../shared/remote-runtime-client-error-classification'
|
||||
} from '../../../shared/remote-runtime/remote-runtime-client-error-classification'
|
||||
import type { RuntimeHostStatusSnapshot } from '../../../shared/runtime-host-status'
|
||||
|
||||
// Web transport messages the shared classifier doesn't list: the connection waiter's deadline and
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
isRecoverableRemoteRuntimeConnectionError,
|
||||
isRuntimeRpcQueueOverloadError,
|
||||
toRemoteRuntimeClientErrorLike
|
||||
} from '../../../../../../shared/remote-runtime-client-error-classification'
|
||||
} from '../../../../../../shared/remote-runtime/remote-runtime-client-error-classification'
|
||||
import { getRepoIdFromWorktreeId } from '../../../../../../shared/worktree/id'
|
||||
import type { Worktree } from '../../../../../../shared/worktree/types'
|
||||
import type { WorktreeSliceGet } from '../listing/worktree-slice-types'
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
isRuntimeRpcQueueOverloadError,
|
||||
toRemoteRuntimeClientErrorLike,
|
||||
type RemoteRuntimeClientErrorLike
|
||||
} from './remote-runtime-client-error-classification'
|
||||
} from './remote-runtime/remote-runtime-client-error-classification'
|
||||
import {
|
||||
WS_HANDSHAKE_TIMEOUT_MESSAGE,
|
||||
remoteRuntimeConnectFailureMessage
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import { RemoteRuntimeSharedControlConnection } from './remote-runtime-shared-control-connection'
|
||||
import { isRecoverableRemoteRuntimeConnectionError } from '../../remote-runtime-client-error-classification'
|
||||
import { isRecoverableRemoteRuntimeConnectionError } from '../remote-runtime-client-error-classification'
|
||||
import {
|
||||
closeSharedControlTestServers,
|
||||
createSharedControlTestServer
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createServer, type Server, type Socket } from 'node:net'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import { generateKeyPair, publicKeyToBase64 } from '../e2ee-crypto'
|
||||
import type { RemoteRuntimeClientError } from '../remote-runtime-client-error'
|
||||
import { isRecoverableRemoteRuntimeConnectionError } from '../remote-runtime-client-error-classification'
|
||||
import { isRecoverableRemoteRuntimeConnectionError } from './remote-runtime-client-error-classification'
|
||||
import {
|
||||
REMOTE_RUNTIME_CONNECT_TIMEOUT_MS,
|
||||
WS_HANDSHAKE_TIMEOUT_MESSAGE,
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import { RemoteRuntimeClientError } from '../../remote-runtime-client-error'
|
||||
import {
|
||||
isRecoverableRemoteRuntimeConnectionError,
|
||||
toRemoteRuntimeClientErrorLike
|
||||
} from '../../remote-runtime-client-error-classification'
|
||||
} from '../remote-runtime-client-error-classification'
|
||||
import { subscribeRemoteRuntimeTransport } from './remote-runtime-subscription-transport'
|
||||
import { withRemoteRuntimeTailscaleHint } from '../remote-runtime-tailscale-hint'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user