From fed1eca486f9c88bceab5ce471658e9b092fe294 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Tue, 29 Sep 2026 17:06:09 -0700 Subject: [PATCH] test: stop restating internal tuning constants, keep the ones that are contracts (#23950) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes ~74 assertions of the form `expect(SOME_CONSTANT).toBe()` where the literal is an internal tuning value — a timeout, retry count, debounce interval, cache TTL, circuit-breaker window, Tailwind class string. Those cannot fail for any reason a user would notice: they fail only when someone deliberately changes the number, and then the test is simply updated. They are copies of the declaration. The same pattern is NOT junk when the exact value is observable outside this process, so those were deliberately kept: - terminal byte contracts: `\r`, `\x03` ETX, Kitty escapes, `\x1b[?1;2c`; - wire and capability values: `agent.launch.v2`, protocol 3 / min-compatible 2, daemon per-feature boundary versions (a daemon survives app updates, so those pin what an old field daemon may be trusted with), relay header tokens; - security invariants: the `127.0.0.1` bind default, an empty iframe `sandbox`; - values external processes read: exit code 78 (EX_CONFIG) and exit code 3 (systemd `RestartPreventExitStatus`), `ORCA_AGENT_SESSION_SPAWN_TOKEN`, `npx skills …` commands users paste, on-disk journal schema versions, the `orca_` filename prefix the fish sweeper matches; - third-party names: expo-router's `unstable_settings` / `ErrorBoundary`, iOS Safari's 16px zoom threshold. Where a case asserted a relation rather than a literal — `A < B`, a sum of parts, a cap compared against a sibling budget — the relation stays and only the literal went. Test-only changes: no production file is touched and no test file is deleted. --- config/scripts/ci-unit-selection.test.mjs | 1 - ...web-app-session-dictation-capture.test.mjs | 14 -------- ...ile-dictation-pending-audio-budget.test.ts | 7 +--- .../bridge/bridge-caps.test.ts | 5 --- .../media-handle-registry.test.ts | 8 ----- .../desktop-notification-channel.test.ts | 6 +--- .../dictation-capture-bridge-budget.test.tsx | 1 - .../mobile-tab-close-selection.test.ts | 9 +----- .../bridged-parity/divergence-classes.test.ts | 6 ---- .../windows-powershell-hook-launcher.test.ts | 1 - ...-client-host-authority-replacement.test.ts | 11 +------ .../codex-session-index-heal-state.test.ts | 2 -- .../expected-teardown-state.test.ts | 5 --- .../gpu-crash-fallback-decision.test.ts | 7 ---- .../renderer-recovery-circuit-breaker.test.ts | 11 +------ .../git-command-timeout.test.ts | 10 +----- .../git-subprocess-admission.test.ts | 6 +--- src/main/git/remote-url-probe.test.ts | 1 - .../git/worktree-add-timeout-override.test.ts | 12 +------ src/main/git/worktree-graph-listing.test.ts | 1 - ...uctured-agent-session-failure-text.test.ts | 1 - ...-hosted-page-reconciliation-window.test.ts | 5 --- ...mobile-web-bundle-read-concurrency.test.ts | 6 ---- ...rminal-multiplex-pty-wait-capacity.test.ts | 1 - src/main/ssh/ssh-connection-utils.test.ts | 26 +-------------- src/main/ssh/ssh-reconnect-ladder.test.ts | 1 - .../components/StateIndicatorTooltip.test.tsx | 3 +- .../artifact-list-windowing.test.tsx | 7 ---- .../automation-list-search.test.ts | 5 --- ...red-client-hosted-recovery-window.test.tsx | 8 ++--- .../native-chat-runtime-send.test.ts | 4 --- ...art-workspace-source-popover-focus.test.ts | 9 +----- .../SourceControl.compare-summary.test.ts | 5 --- .../ai-vault-scope-state.test.ts | 7 ---- .../pr-comment-presentation.test.ts | 4 --- ...ight-sidebar-titlebar-drag-regions.test.ts | 4 --- .../worktree-list/rows/indentation.test.ts | 1 - .../tab-group/useTabDragSplit.test.ts | 1 - .../pane-terminal-mouse-wheel.test.ts | 5 --- src/shared/agent-status-types.test.ts | 1 - src/shared/commit-message-agent-spec.test.ts | 5 --- src/shared/feature-interactions.test.ts | 32 ------------------- src/shared/image-paste-following-text.test.ts | 6 +--- src/shared/orca-session-address.test.ts | 2 -- src/shared/repo-search-limits.test.ts | 1 - src/shared/setup-agent-sequencing.test.ts | 6 +--- src/shared/terminal-scrollback-policy.test.ts | 11 ------- .../windows-transient-lock-removal.test.ts | 4 --- src/shared/worktree/card-properties.test.ts | 1 - 49 files changed, 15 insertions(+), 281 deletions(-) diff --git a/config/scripts/ci-unit-selection.test.mjs b/config/scripts/ci-unit-selection.test.mjs index 69370a675f6..936b8874f65 100644 --- a/config/scripts/ci-unit-selection.test.mjs +++ b/config/scripts/ci-unit-selection.test.mjs @@ -92,7 +92,6 @@ describe('conservative unit selection', () => { count: FULL_SHARD_COUNT })) ) - expect(FULL_SHARD_COUNT).toBe(5) }) it('records failures that would have been missed while shadow runs remain full', () => { diff --git a/config/scripts/mobile-web-app-session-dictation-capture.test.mjs b/config/scripts/mobile-web-app-session-dictation-capture.test.mjs index 1ec672f1127..1c97d515f2e 100644 --- a/config/scripts/mobile-web-app-session-dictation-capture.test.mjs +++ b/config/scripts/mobile-web-app-session-dictation-capture.test.mjs @@ -52,15 +52,6 @@ const DICTATION_GRANTS = ['native.audio.start', 'native.audio.read', 'native.aud * web builds are a denied microphone and a no-op screen lock. */ const NATIVE_AUDIO_MODULES = ['@orca/expo-two-way-audio', 'expo-keep-awake'] -/** - * How many of their modules re-enter the session closure when the seam's web half is moved aside. - * - * Recorded rather than measured here, because measuring it means walking the closure a second time - * against a mutated tree. Five from `@orca/expo-two-way-audio` (its module, `core`, `events`, - * `hooks` and the index) and three from `expo-keep-awake`. The docstring above carries the run. - */ -const NATIVE_AUDIO_MODULES_BEHIND_THE_SEAM = 8 - const SESSION_PATHNAME = '/h/[hostId]/session/[worktreeId]' const SESSION = 'app/h/[hostId]/session/[worktreeId].tsx' @@ -216,11 +207,6 @@ describe('the census rule itself', () => { expect(dictationGrantsNeeded({ local: ['src/platform/media-picker.web.ts'] })).toEqual([]) }) - it('records what the seam keeps out, in the number that was measured', () => { - expect(NATIVE_AUDIO_MODULES_BEHIND_THE_SEAM).toBe(8) - expect(NATIVE_AUDIO_MODULES).toHaveLength(2) - }) - /** * Gated on the mobile install, not merely deferred behind `import()`. * diff --git a/mobile/src/hooks/mobile-dictation-pending-audio-budget.test.ts b/mobile/src/hooks/mobile-dictation-pending-audio-budget.test.ts index 249f923c33f..7f210226546 100644 --- a/mobile/src/hooks/mobile-dictation-pending-audio-budget.test.ts +++ b/mobile/src/hooks/mobile-dictation-pending-audio-budget.test.ts @@ -1,13 +1,8 @@ import { describe, expect, it } from 'vitest' -import { - MOBILE_DICTATION_MAX_PENDING_AUDIO_BYTES, - MobileDictationPendingAudioBudget -} from './mobile-dictation-pending-audio-budget' +import { MobileDictationPendingAudioBudget } from './mobile-dictation-pending-audio-budget' describe('MobileDictationPendingAudioBudget', () => { it('caps pending raw PCM audio at five seconds', () => { - expect(MOBILE_DICTATION_MAX_PENDING_AUDIO_BYTES).toBe(160_000) - const budget = new MobileDictationPendingAudioBudget() expect(budget.tryReserve(159_999)).toBe(true) expect(budget.tryReserve(1)).toBe(true) diff --git a/mobile/src/mobile-web-shell/bridge/bridge-caps.test.ts b/mobile/src/mobile-web-shell/bridge/bridge-caps.test.ts index 719b21f54f7..189de6bd85b 100644 --- a/mobile/src/mobile-web-shell/bridge/bridge-caps.test.ts +++ b/mobile/src/mobile-web-shell/bridge/bridge-caps.test.ts @@ -8,7 +8,6 @@ import { BRIDGE_MAX_PENDING_REQUESTS, BRIDGE_MAX_REPLY_BYTES, BRIDGE_MAX_REPLY_PARTS, - BRIDGE_DIRECTIONS, BRIDGE_MAX_SUBSCRIPTIONS, isBridgeExternalLinkUrl, readBridgeExternalLinkUrl, @@ -179,10 +178,6 @@ describe('derived caps', () => { }) describe('parseBridgeMessage direction', () => { - it('names both directions and nothing else', () => { - expect(BRIDGE_DIRECTIONS).toEqual(['page-to-shell', 'shell-to-page']) - }) - it('lets a reply past the node cap through, and refuses the same document from the page', () => { const raw = listingReply(5_000) expect(utf8ByteLength(raw)).toBeLessThan(BRIDGE_MAX_MESSAGE_BYTES) diff --git a/mobile/src/mobile-web-shell/media-handle-registry.test.ts b/mobile/src/mobile-web-shell/media-handle-registry.test.ts index 4a96fc955a4..a41c900f5a8 100644 --- a/mobile/src/mobile-web-shell/media-handle-registry.test.ts +++ b/mobile/src/mobile-web-shell/media-handle-registry.test.ts @@ -24,14 +24,6 @@ function refusalOf(run: () => unknown): string | null { throw new Error('that call was expected to refuse and did not') } -describe('the lifetime this registry states', () => { - it('sweeps a staged file five minutes after the last touch', () => { - // A literal, because five minutes is the number the body claims and the docstring derives. - expect(MEDIA_HANDLE_TTL_MS).toBe(5 * 60 * 1000) - expect(MEDIA_HANDLE_TTL_MS).toBe(300_000) - }) -}) - describe('minting handles', () => { let clock = 1_000 let deleted: string[] = [] diff --git a/mobile/src/notifications/desktop-notification-channel.test.ts b/mobile/src/notifications/desktop-notification-channel.test.ts index 283f3f668d4..01ae373b34c 100644 --- a/mobile/src/notifications/desktop-notification-channel.test.ts +++ b/mobile/src/notifications/desktop-notification-channel.test.ts @@ -1,10 +1,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' import * as Notifications from 'expo-notifications' import { Platform } from 'react-native' -import { - DESKTOP_NOTIFICATION_CHANNEL_ID, - ensureDesktopNotificationChannel -} from './desktop-notification-channel' +import { ensureDesktopNotificationChannel } from './desktop-notification-channel' vi.mock('expo-notifications', () => ({ AndroidImportance: { HIGH: 'high' }, @@ -30,7 +27,6 @@ describe('ensureDesktopNotificationChannel', () => { 'orca-desktop', expect.objectContaining({ importance: 'high' }) ) - expect(DESKTOP_NOTIFICATION_CHANNEL_ID).toBe('orca-desktop') }) it('does nothing on iOS, which has no notification channels', () => { diff --git a/mobile/src/platform/dictation-capture-bridge-budget.test.tsx b/mobile/src/platform/dictation-capture-bridge-budget.test.tsx index 4568fbed910..5bc267d82a9 100644 --- a/mobile/src/platform/dictation-capture-bridge-budget.test.tsx +++ b/mobile/src/platform/dictation-capture-bridge-budget.test.tsx @@ -272,7 +272,6 @@ describe('what one dictation spends of the bridge', () => { }, 60_000) it('ships the batched drain, not the native event rate', () => { - expect(DICTATION_CAPTURE_DRAIN_INTERVAL_MS).toBe(500) expect(DICTATION_CAPTURE_DRAIN_INTERVAL_MS).toBeGreaterThan(DICTATION_NATIVE_EVENT_INTERVAL_MS) }) }) diff --git a/mobile/src/session/mobile-tab-close-selection.test.ts b/mobile/src/session/mobile-tab-close-selection.test.ts index 992e0074884..cac9f181a32 100644 --- a/mobile/src/session/mobile-tab-close-selection.test.ts +++ b/mobile/src/session/mobile-tab-close-selection.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { BULK_TAB_CLOSE_ACTIONS, selectBulkCloseTabs } from './mobile-tab-close-selection' +import { selectBulkCloseTabs } from './mobile-tab-close-selection' const tab = (id: string, isDirty?: boolean, isPinned?: boolean) => ({ id, @@ -10,13 +10,6 @@ const tab = (id: string, isDirty?: boolean, isPinned?: boolean) => ({ describe('selectBulkCloseTabs', () => { const tabs = [tab('a'), tab('b'), tab('c'), tab('d')] - it('offers only close-others and close-left actions', () => { - expect(BULK_TAB_CLOSE_ACTIONS).toEqual([ - { mode: 'others', label: 'Close Other Tabs' }, - { mode: 'left', label: 'Close Tabs to the Left' } - ]) - }) - it('selects every tab except the anchor for mode "others"', () => { expect(selectBulkCloseTabs(tabs, 'b', 'others').map((t) => t.id)).toEqual(['a', 'c', 'd']) }) diff --git a/mobile/src/test-support/bridged-parity/divergence-classes.test.ts b/mobile/src/test-support/bridged-parity/divergence-classes.test.ts index ac5fd17cb70..e262157ac2a 100644 --- a/mobile/src/test-support/bridged-parity/divergence-classes.test.ts +++ b/mobile/src/test-support/bridged-parity/divergence-classes.test.ts @@ -7,7 +7,6 @@ import { classifyBridgedParity, BRIDGED_PARITY_BASELINE, BRIDGED_PARITY_EXCLUSIONS, - BRIDGED_PARITY_FLAG, BRIDGED_PARITY_MEMBERS, BRIDGED_PARITY_OFF, BRIDGED_PARITY_NAMEABLE, @@ -37,12 +36,7 @@ const droppedUndefinedKey: BridgedParityEvidence = { } describe('the bridged-parity flag', () => { - it('is the name the suite and the pin both spell', () => { - expect(BRIDGED_PARITY_FLAG).toBe('RPC_FOUNDATION_BRIDGE') - }) - it('skips on one value only, so an unset or mistyped variable still runs the gate', () => { - expect(BRIDGED_PARITY_OFF).toBe('0') const skips = (value: string | undefined): boolean => value === BRIDGED_PARITY_OFF expect([undefined, '', '1', 'false', 'off'].filter(skips)).toEqual([]) expect(skips('0')).toBe(true) diff --git a/src/main/agent-hooks/windows-powershell-hook-launcher.test.ts b/src/main/agent-hooks/windows-powershell-hook-launcher.test.ts index df307d87035..6be74f65bbf 100644 --- a/src/main/agent-hooks/windows-powershell-hook-launcher.test.ts +++ b/src/main/agent-hooks/windows-powershell-hook-launcher.test.ts @@ -46,7 +46,6 @@ describe('windows PowerShell hook launcher', () => { // it. Restoring either denied switch re-breaks every hook on an AV host. const command = wrapWindowsPowerShellEncodedCommand('exit 0') - expect(WINDOWS_POWERSHELL_HOOK_SWITCHES).toBe('-NoProfile') expect(command).toMatch(/ -NoProfile -EncodedCommand [A-Za-z0-9+/=]+$/) }) diff --git a/src/main/browser/browser-client-host-authority-replacement.test.ts b/src/main/browser/browser-client-host-authority-replacement.test.ts index 9068f26f30f..5630b022c55 100644 --- a/src/main/browser/browser-client-host-authority-replacement.test.ts +++ b/src/main/browser/browser-client-host-authority-replacement.test.ts @@ -1,10 +1,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { BROWSER_CLIENT_HOST_AUTHORITY_MISMATCH_CODE } from '../../shared/browser-client-host-protocol' import { isBrowserClientHostAuthorityReplaced } from './browser-client-host-authority-replacement' -import { - BrowserClientHostAuthorityReplacementWait, - DEFAULT_AUTHORITY_REPLACEMENT_GRACE_MS -} from './browser-client-host-authority-replacement-wait' +import { BrowserClientHostAuthorityReplacementWait } from './browser-client-host-authority-replacement-wait' function errorWithCode(message: string, code: unknown): Error { return Object.assign(new Error(message), { code }) @@ -164,10 +161,4 @@ describe('BrowserClientHostAuthorityReplacementWait', () => { }).not.toThrow() expect(wait.armed).toBe(false) }) - - // The grace has to outlast a real restart, or the environment is torn down before the replacement - // runtime finishes coming up. - it('defaults the grace to 45 seconds', () => { - expect(DEFAULT_AUTHORITY_REPLACEMENT_GRACE_MS).toBe(45_000) - }) }) diff --git a/src/main/codex/codex-session-index-heal-state.test.ts b/src/main/codex/codex-session-index-heal-state.test.ts index 92270911dfe..25189fdbf1b 100644 --- a/src/main/codex/codex-session-index-heal-state.test.ts +++ b/src/main/codex/codex-session-index-heal-state.test.ts @@ -3,7 +3,6 @@ import { appendFileSync, mkdirSync, mkdtempSync, rmSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' import { - CODEX_SESSION_INDEX_HEAL_VERSION, appendHealLedgerRecord, collectPendingHealThreads, isHealMarkerCurrent, @@ -149,6 +148,5 @@ describe('codex session index heal state', () => { expect(await collectPendingHealThreads(paths)).toEqual([ expect.objectContaining({ threadId: THREAD_ID }) ]) - expect(CODEX_SESSION_INDEX_HEAL_VERSION).toBe(3) }) }) diff --git a/src/main/crash-reporting/expected-teardown-state.test.ts b/src/main/crash-reporting/expected-teardown-state.test.ts index ccfc729092b..781ccce6b33 100644 --- a/src/main/crash-reporting/expected-teardown-state.test.ts +++ b/src/main/crash-reporting/expected-teardown-state.test.ts @@ -35,11 +35,6 @@ afterEach(() => { }) describe('expected teardown state', () => { - it('uses a product-chosen five-second harm bound, not a Windows lifetime guarantee', () => { - // Restart Manager may wait 30s; tree-kills after this bound remain reportable by design. - expect(WINDOWS_SESSION_END_CRASH_SUPPRESSION_WINDOW_MS).toBe(5_000) - }) - it('uses the production monotonic clock by default', () => { vi.spyOn(performance, 'now').mockReturnValueOnce(1_000).mockReturnValue(1_001) vi.spyOn(Date, 'now').mockReturnValueOnce(10_000).mockReturnValue(15_000) diff --git a/src/main/crash-reporting/gpu-crash-fallback-decision.test.ts b/src/main/crash-reporting/gpu-crash-fallback-decision.test.ts index b4c4e1210ed..7dda535d0af 100644 --- a/src/main/crash-reporting/gpu-crash-fallback-decision.test.ts +++ b/src/main/crash-reporting/gpu-crash-fallback-decision.test.ts @@ -1,7 +1,5 @@ import { describe, expect, it } from 'vitest' import { - DEFAULT_GPU_CRASH_FALLBACK_THRESHOLD, - DEFAULT_GPU_CRASH_FALLBACK_WINDOW_MS, GpuCrashFallbackTracker, isGpuChildProcessType, isGpuFallbackCrashCandidate @@ -121,11 +119,6 @@ describe('GpuCrashFallbackTracker', () => { expect(isGpuChildProcessType('Utility')).toBe(false) expect(isGpuChildProcessType(undefined)).toBe(false) }) - - it('ships conservative defaults', () => { - expect(DEFAULT_GPU_CRASH_FALLBACK_WINDOW_MS).toBe(30_000) - expect(DEFAULT_GPU_CRASH_FALLBACK_THRESHOLD).toBe(3) - }) }) describe('isGpuFallbackCrashCandidate', () => { diff --git a/src/main/crash-reporting/renderer-recovery-circuit-breaker.test.ts b/src/main/crash-reporting/renderer-recovery-circuit-breaker.test.ts index eab933e9b8f..1b096cd5ea2 100644 --- a/src/main/crash-reporting/renderer-recovery-circuit-breaker.test.ts +++ b/src/main/crash-reporting/renderer-recovery-circuit-breaker.test.ts @@ -1,9 +1,5 @@ import { describe, expect, it } from 'vitest' -import { - DEFAULT_RENDERER_RECOVERY_MAX_RECOVERIES, - DEFAULT_RENDERER_RECOVERY_WINDOW_MS, - RendererRecoveryCircuitBreaker -} from './renderer-recovery-circuit-breaker' +import { RendererRecoveryCircuitBreaker } from './renderer-recovery-circuit-breaker' describe('RendererRecoveryCircuitBreaker', () => { it('allows recoveries up to the limit, then opens', () => { @@ -57,9 +53,4 @@ describe('RendererRecoveryCircuitBreaker', () => { breaker.reset() expect(breaker.registerRecoveryAttempt(200).allowed).toBe(true) }) - - it('ships conservative defaults', () => { - expect(DEFAULT_RENDERER_RECOVERY_WINDOW_MS).toBe(60_000) - expect(DEFAULT_RENDERER_RECOVERY_MAX_RECOVERIES).toBe(3) - }) }) diff --git a/src/main/git/command-runner/git-command-timeout.test.ts b/src/main/git/command-runner/git-command-timeout.test.ts index 1768198a81a..30b5f93d64a 100644 --- a/src/main/git/command-runner/git-command-timeout.test.ts +++ b/src/main/git/command-runner/git-command-timeout.test.ts @@ -1,15 +1,7 @@ import { describe, expect, it } from 'vitest' -import { - GIT_READ_TIMEOUT_MS, - GitCommandTimeoutError, - gitCommandTimeoutMs -} from './git-command-timeout' +import { GitCommandTimeoutError, gitCommandTimeoutMs } from './git-command-timeout' describe('gitCommandTimeoutMs', () => { - it('pins the production read deadline', () => { - expect(GIT_READ_TIMEOUT_MS).toBe(120_000) - }) - it.each([ [['status', '--porcelain=v2'], 120_000], [['show', 'HEAD:file'], 120_000], diff --git a/src/main/git/command-runner/git-subprocess-admission.test.ts b/src/main/git/command-runner/git-subprocess-admission.test.ts index 0e5bfa808ee..1ad55a05135 100644 --- a/src/main/git/command-runner/git-subprocess-admission.test.ts +++ b/src/main/git/command-runner/git-subprocess-admission.test.ts @@ -2,8 +2,6 @@ import { afterEach, describe, expect, it } from 'vitest' import { GENERAL_CAP, GitAdmissionScheduler, - MAX_GIT_CHILDREN, - NETWORK_CAP, _gitAdmissionSnapshotForTests, _resetGitAdmissionForTests, acquireGitAdmission @@ -33,11 +31,9 @@ afterEach(() => { }) describe('GitAdmissionScheduler', () => { - it('pins the global base budgets and absolute maximum', () => { + it('pins the global base budget bounds', () => { expect(GENERAL_CAP).toBeGreaterThanOrEqual(2) expect(GENERAL_CAP).toBeLessThanOrEqual(4) - expect(NETWORK_CAP).toBe(3) - expect(MAX_GIT_CHILDREN).toBe(10) }) it('keeps base and headroom counters separate and grants interactive all-headroom', async () => { diff --git a/src/main/git/remote-url-probe.test.ts b/src/main/git/remote-url-probe.test.ts index f9e0348c3ac..0df6ffd6ca8 100644 --- a/src/main/git/remote-url-probe.test.ts +++ b/src/main/git/remote-url-probe.test.ts @@ -44,7 +44,6 @@ describe('remote URL probe', () => { cwd: '/repo', timeout: REMOTE_URL_PROBE_TIMEOUT_MS }) - expect(REMOTE_URL_PROBE_TIMEOUT_MS).toBe(30_000) }) it('bounds the SSH remote read with the same deadline as the local one', async () => { diff --git a/src/main/git/worktree-add-timeout-override.test.ts b/src/main/git/worktree-add-timeout-override.test.ts index 97666c09d4a..50aa4e59db1 100644 --- a/src/main/git/worktree-add-timeout-override.test.ts +++ b/src/main/git/worktree-add-timeout-override.test.ts @@ -26,11 +26,7 @@ vi.mock('../worktree-trash', () => ({ scheduleWorktreeTrashDeletion: vi.fn() })) -import { - resolveWorktreeAddTimeoutMs, - WORKTREE_ADD_TIMEOUT_MAX_MS, - WORKTREE_ADD_TIMEOUT_MS -} from './worktree' +import { resolveWorktreeAddTimeoutMs, WORKTREE_ADD_TIMEOUT_MS } from './worktree' import { registerWorktreeSuiteHooks } from './worktree-test-harness' registerWorktreeSuiteHooks() @@ -46,12 +42,6 @@ describe('resolveWorktreeAddTimeoutMs', () => { warnSpy.mockRestore() }) - // Why: pin the literals so a future edit to either bound has to be deliberate. - it('bounds the override to [180s, 30min]', () => { - expect(WORKTREE_ADD_TIMEOUT_MS).toBe(180_000) - expect(WORKTREE_ADD_TIMEOUT_MAX_MS).toBe(1_800_000) - }) - it('falls back to the default when the override is unset, blank, or unparseable', () => { expect(resolveWorktreeAddTimeoutMs({})).toBe(WORKTREE_ADD_TIMEOUT_MS) expect(resolveWorktreeAddTimeoutMs({ ORCA_WORKTREE_ADD_TIMEOUT_MS: ' ' })).toBe( diff --git a/src/main/git/worktree-graph-listing.test.ts b/src/main/git/worktree-graph-listing.test.ts index b626718de69..eecfffe1753 100644 --- a/src/main/git/worktree-graph-listing.test.ts +++ b/src/main/git/worktree-graph-listing.test.ts @@ -195,6 +195,5 @@ branch refs/heads/main cwd: '/repo', timeout: 5_000 }) - expect(WORKTREE_LIST_TIMEOUT_MS).toBe(30_000) }) }) diff --git a/src/main/native-chat/agent-session-wire/structured-agent-session-failure-text.test.ts b/src/main/native-chat/agent-session-wire/structured-agent-session-failure-text.test.ts index fcebdda7726..ccef42f57bd 100644 --- a/src/main/native-chat/agent-session-wire/structured-agent-session-failure-text.test.ts +++ b/src/main/native-chat/agent-session-wire/structured-agent-session-failure-text.test.ts @@ -114,7 +114,6 @@ describe('structuredAgentSessionStartFailure', () => { }) it("holds any provider detail to the lease record's cap", () => { - expect(MAX_PROVIDER_DIAGNOSTIC_CHARS).toBe(512) expect(MAX_UNEXPECTED_EXIT_REASON_CHARS).toBe(MAX_PROVIDER_DIAGNOSTIC_CHARS) const long = 'x'.repeat(4_000) // However the caller built the detail, the fact stores at most the cap. diff --git a/src/main/runtime/client-hosted-page-reconciliation-window.test.ts b/src/main/runtime/client-hosted-page-reconciliation-window.test.ts index b52335dadf6..d263c7a0742 100644 --- a/src/main/runtime/client-hosted-page-reconciliation-window.test.ts +++ b/src/main/runtime/client-hosted-page-reconciliation-window.test.ts @@ -80,11 +80,6 @@ describe('ClientHostedPageReconciliationWindow', () => { expect(window.isUnreconciled(DEVICE_A, OPENED_AT + 99)).toBe(true) expect(window.isUnreconciled(DEVICE_A, OPENED_AT + 100)).toBe(false) }) - - // This bound is what stops a host that never returns from holding client-hosted rows open forever. - it('bounds the default hold at 45 seconds', () => { - expect(DEFAULT_CLIENT_HOSTED_RECONCILIATION_WINDOW_MS).toBe(45_000) - }) }) describe('holdFor', () => { diff --git a/src/main/runtime/rpc/methods/mobile-web-bundle-read-concurrency.test.ts b/src/main/runtime/rpc/methods/mobile-web-bundle-read-concurrency.test.ts index 9d628182083..1e23163efe9 100644 --- a/src/main/runtime/rpc/methods/mobile-web-bundle-read-concurrency.test.ts +++ b/src/main/runtime/rpc/methods/mobile-web-bundle-read-concurrency.test.ts @@ -131,12 +131,6 @@ afterEach(() => { }) describe('chunk reads in flight on one connection', () => { - // Pinned as a literal because every other case here is written in terms of the constant, so the - // budget itself would otherwise move silently with it. - it('budgets four', () => { - expect(MAX_CONCURRENT_MOBILE_WEB_BUNDLE_READS).toBe(4) - }) - it('admits four and refuses the fifth, then admits it once one finishes', async () => { gate.hold() const inFlight = Array.from({ length: MAX_CONCURRENT_MOBILE_WEB_BUNDLE_READS }, () => diff --git a/src/main/runtime/rpc/terminal-multiplex-pty-wait-capacity.test.ts b/src/main/runtime/rpc/terminal-multiplex-pty-wait-capacity.test.ts index a5b40b2f1eb..9a8cc77af3e 100644 --- a/src/main/runtime/rpc/terminal-multiplex-pty-wait-capacity.test.ts +++ b/src/main/runtime/rpc/terminal-multiplex-pty-wait-capacity.test.ts @@ -284,7 +284,6 @@ describe('terminal multiplex RPC', () => { )! ) } - expect(TERMINAL_MULTIPLEX_MAX_ACTIVE_STREAMS_PER_CONNECTION).toBe(128) for ( let streamId = 1; streamId <= TERMINAL_MULTIPLEX_MAX_ACTIVE_STREAMS_PER_CONNECTION + 1; diff --git a/src/main/ssh/ssh-connection-utils.test.ts b/src/main/ssh/ssh-connection-utils.test.ts index 00abeeb2052..296c89b1d98 100644 --- a/src/main/ssh/ssh-connection-utils.test.ts +++ b/src/main/ssh/ssh-connection-utils.test.ts @@ -29,36 +29,12 @@ import { shellEscape, findDefaultKeyFile, buildConnectConfig, - resolveAgentSocket, - CONNECT_TIMEOUT_MS, - INITIAL_RETRY_ATTEMPTS, - INITIAL_RETRY_DELAY_MS, - RECONNECT_BACKOFF_MS + resolveAgentSocket } from './ssh-connection-utils' import { resolveEffectiveProxy } from './ssh-proxy-command' import type { SshTarget } from '../../shared/ssh-types' import type { SshResolvedConfig } from './ssh-config-parser' -// ── Constants ──────────────────────────────────────────────────────── - -describe('SSH connection constants', () => { - it('CONNECT_TIMEOUT_MS is 30 seconds (matches VS Code)', () => { - expect(CONNECT_TIMEOUT_MS).toBe(30_000) - }) - - it('INITIAL_RETRY_ATTEMPTS is 5', () => { - expect(INITIAL_RETRY_ATTEMPTS).toBe(5) - }) - - it('INITIAL_RETRY_DELAY_MS is 2 seconds', () => { - expect(INITIAL_RETRY_DELAY_MS).toBe(2000) - }) - - it('RECONNECT_BACKOFF_MS has 9 entries', () => { - expect(RECONNECT_BACKOFF_MS).toHaveLength(9) - }) -}) - // ── isTransientError ───────────────────────────────────────────────── describe('isTransientError', () => { diff --git a/src/main/ssh/ssh-reconnect-ladder.test.ts b/src/main/ssh/ssh-reconnect-ladder.test.ts index c43d4e9e6e9..8010ebd96a5 100644 --- a/src/main/ssh/ssh-reconnect-ladder.test.ts +++ b/src/main/ssh/ssh-reconnect-ladder.test.ts @@ -58,7 +58,6 @@ describe('SshReconnectLadder', () => { now += decision.delayMs } } - expect(FLAP_DELAY_CAP_MS).toBe(5_000) }) it('keeps the uncapped table for a host whose handshakes fail', () => { diff --git a/src/renderer/src/components/StateIndicatorTooltip.test.tsx b/src/renderer/src/components/StateIndicatorTooltip.test.tsx index 70bb8272425..819588f8969 100644 --- a/src/renderer/src/components/StateIndicatorTooltip.test.tsx +++ b/src/renderer/src/components/StateIndicatorTooltip.test.tsx @@ -1,7 +1,7 @@ import type { ReactNode } from 'react' import { renderToStaticMarkup } from 'react-dom/server' import { describe, expect, it, vi } from 'vitest' -import { STATE_INDICATOR_TOOLTIP_DELAY_MS, StateIndicatorTooltip } from './StateIndicatorTooltip' +import { StateIndicatorTooltip } from './StateIndicatorTooltip' vi.mock('@/components/ui/tooltip', () => ({ Tooltip: ({ delayDuration, children }: { delayDuration: number; children: ReactNode }) => ( @@ -23,7 +23,6 @@ describe('StateIndicatorTooltip', () => { ) - expect(STATE_INDICATOR_TOOLTIP_DELAY_MS).toBe(200) expect(markup).toContain('data-delay-duration="200"') expect(markup).toContain('data-tooltip-content=""') expect(markup).toContain('data-side="top"') diff --git a/src/renderer/src/components/artifacts/artifact-list-windowing.test.tsx b/src/renderer/src/components/artifacts/artifact-list-windowing.test.tsx index ca8a4a916c0..4199d2a7a77 100644 --- a/src/renderer/src/components/artifacts/artifact-list-windowing.test.tsx +++ b/src/renderer/src/components/artifacts/artifact-list-windowing.test.tsx @@ -39,7 +39,6 @@ vi.mock('./ArtifactListRow', async (importOriginal) => { const { ArtifactCollection } = await import('./ArtifactCollection') const { TooltipProvider } = await import('@/components/ui/tooltip') const { ARTIFACTS_TABLE_ROW_HEIGHT_PX } = await import('./artifacts-table-layout') -const { LIST_TABLE_ROW_DIVIDER_CLASS } = await import('@/lib/list-table-layout') const VIEWPORT_HEIGHT_PX = 600 /** @@ -698,12 +697,6 @@ describe('artifacts list windowing — above the threshold', () => { ) }) - // Why exact: an added token is as damaging as a removed one — `mb-px` alone pushes the real row - // to 54px and invalidates the estimate above, and an opacity token restyles every hairline. - it('pins the row divider to the one bottom hairline', () => { - expect(LIST_TABLE_ROW_DIVIDER_CLASS).toBe('border-b border-border/50') - }) - it('mounts only a bounded window for a 500-artifact list', () => { renderCollection({ items: artifacts(500) }) diff --git a/src/renderer/src/components/automations/automation-list-search.test.ts b/src/renderer/src/components/automations/automation-list-search.test.ts index 3a9b3844164..1e1b88cfcab 100644 --- a/src/renderer/src/components/automations/automation-list-search.test.ts +++ b/src/renderer/src/components/automations/automation-list-search.test.ts @@ -104,11 +104,6 @@ describe('automation-list-search', () => { expect(automationListSearchIndexMatches(index, 'unknown')).toBe(true) }) - it('caps the searchable prompt at the first 2,048 characters', () => { - // Design doc: the bound is a hard requirement, not a tuning knob. - expect(AUTOMATION_LIST_SEARCH_PROMPT_MAX_CODE_UNITS).toBe(2048) - }) - it('bounds every indexed field, so no axis grows with its source', () => { const index = buildAutomationListSearchIndex({ name: 'n'.repeat(10_000), diff --git a/src/renderer/src/components/browser-pane/restored-client-hosted-recovery-window.test.tsx b/src/renderer/src/components/browser-pane/restored-client-hosted-recovery-window.test.tsx index 80bd51508c7..08959ac271f 100644 --- a/src/renderer/src/components/browser-pane/restored-client-hosted-recovery-window.test.tsx +++ b/src/renderer/src/components/browser-pane/restored-client-hosted-recovery-window.test.tsx @@ -267,13 +267,9 @@ describe('restored client-hosted recovery window', () => { expect(noticeShown()).toBe(true) }) - // Why the number is asserted and not only derived from: every boundary case above stays green if - // the window shrinks to a millisecond, and a window shorter than one creation attempt would call - // the first batch of recoveries dead. The first batch is all this bounds — recovery runs four - // pages at a time and each awaits a create and then a navigate, so with 9+ restored tabs a page - // can see the notice while its turn has not come. Widening to the batched bound is ledgered. + // A window shorter than one creation attempt would call the first batch of recoveries dead, and + // every boundary case above stays green if the window shrinks to a millisecond. it('waits longer than the runtime spends creating one client page in the first batch', () => { - expect(RESTORED_CLIENT_HOSTED_RECOVERY_WINDOW_MS).toBe(45_000) // Imported, not copied: a locally re-declared ceiling makes raising the runtime's own timeout // invisible here, which is the one change that could turn this window into a false verdict. expect(RESTORED_CLIENT_HOSTED_RECOVERY_WINDOW_MS).toBeGreaterThan( diff --git a/src/renderer/src/components/native-chat/native-chat-runtime-send.test.ts b/src/renderer/src/components/native-chat/native-chat-runtime-send.test.ts index 0071b73b21d..79c28599858 100644 --- a/src/renderer/src/components/native-chat/native-chat-runtime-send.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-runtime-send.test.ts @@ -114,10 +114,6 @@ describe('sendNativeChatMessage', () => { expect(sendRuntimePtyInput).not.toHaveBeenCalled() }) - it('matches orca-runtime writeTerminalAction Enter gap (500ms)', () => { - expect(NATIVE_CHAT_SUBMIT_DELAY_MS).toBe(500) - }) - it('serializes rapid sends on the same PTY so bodies cannot glue before Enter', async () => { sendNativeChatMessage(SETTINGS, PTY, 'tell me a joke') sendNativeChatMessage(SETTINGS, PTY, 'continue') diff --git a/src/renderer/src/components/new-workspace/smart-workspace-source-popover-focus.test.ts b/src/renderer/src/components/new-workspace/smart-workspace-source-popover-focus.test.ts index 3b9cd543dbe..26dad28d3f5 100644 --- a/src/renderer/src/components/new-workspace/smart-workspace-source-popover-focus.test.ts +++ b/src/renderer/src/components/new-workspace/smart-workspace-source-popover-focus.test.ts @@ -1,10 +1,7 @@ // @vitest-environment happy-dom import { describe, expect, it } from 'vitest' -import { - isComposerFieldToFieldFocus, - WORKSPACE_COMPOSER_ROOT_SELECTOR -} from './smart-workspace-source-popover-focus' +import { isComposerFieldToFieldFocus } from './smart-workspace-source-popover-focus' describe('isComposerFieldToFieldFocus', () => { it('returns true when focus moves between fields inside the composer root', () => { @@ -58,8 +55,4 @@ describe('isComposerFieldToFieldFocus', () => { }) ).toBe(false) }) - - it('exports the composer root selector used by the card', () => { - expect(WORKSPACE_COMPOSER_ROOT_SELECTOR).toBe('[data-workspace-composer-root="true"]') - }) }) diff --git a/src/renderer/src/components/right-sidebar/SourceControl.compare-summary.test.ts b/src/renderer/src/components/right-sidebar/SourceControl.compare-summary.test.ts index e740362f60d..100880d4581 100644 --- a/src/renderer/src/components/right-sidebar/SourceControl.compare-summary.test.ts +++ b/src/renderer/src/components/right-sidebar/SourceControl.compare-summary.test.ts @@ -1,6 +1,5 @@ import { describe, expect, it, vi } from 'vitest' import { - BRANCH_REFRESH_INTERVAL_MS, CompareSummary, CompareSummaryToolbarButton, refreshSourceControlAfterRemoteAction, @@ -411,10 +410,6 @@ describe('SourceControl compare summary', () => { expect(collectCompareSummaryToolbarLabels(node)).toEqual(['Change base ref', 'Retry']) }) - it('keeps a 30 second branch compare fallback refresh', () => { - expect(BRANCH_REFRESH_INTERVAL_MS).toBe(30_000) - }) - it('refreshes branch compare when git status observes a new head for the same base', () => { expect( shouldRefreshBranchCompareForStatusHead( diff --git a/src/renderer/src/components/right-sidebar/ai-vault-scope-state.test.ts b/src/renderer/src/components/right-sidebar/ai-vault-scope-state.test.ts index dfeedfcfb00..8f9ae01339e 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault-scope-state.test.ts +++ b/src/renderer/src/components/right-sidebar/ai-vault-scope-state.test.ts @@ -1,17 +1,10 @@ import { describe, expect, it } from 'vitest' import { - DEFAULT_AI_VAULT_SCOPE, getRestorableAiVaultScope, normalizeAiVaultScopeForContext, shouldRestoreDefaultAiVaultScope } from './ai-vault-scope-state' -describe('DEFAULT_AI_VAULT_SCOPE', () => { - it('defaults the session history scope to workspace', () => { - expect(DEFAULT_AI_VAULT_SCOPE).toBe('workspace') - }) -}) - describe('normalizeAiVaultScopeForContext', () => { it('falls back from project to all when no active project is available', () => { expect( diff --git a/src/renderer/src/components/right-sidebar/pr-comment-presentation.test.ts b/src/renderer/src/components/right-sidebar/pr-comment-presentation.test.ts index 5df8debe7c8..2eac61c545c 100644 --- a/src/renderer/src/components/right-sidebar/pr-comment-presentation.test.ts +++ b/src/renderer/src/components/right-sidebar/pr-comment-presentation.test.ts @@ -8,10 +8,6 @@ import { } from './pr-comment-presentation' describe('pr-comment-presentation', () => { - it('defaults to cards layout', () => { - expect(DEFAULT_PR_COMMENT_PRESENTATION_VARIANT).toBe('cards') - }) - it('returns card layout tokens for cards and focus variants', () => { const cards = getPRCommentPresentationClasses('cards') expect(cards.useCardLayout).toBe(true) diff --git a/src/renderer/src/components/right-sidebar/right-sidebar-titlebar-drag-regions.test.ts b/src/renderer/src/components/right-sidebar/right-sidebar-titlebar-drag-regions.test.ts index 6a98ae936ea..82074ad38e7 100644 --- a/src/renderer/src/components/right-sidebar/right-sidebar-titlebar-drag-regions.test.ts +++ b/src/renderer/src/components/right-sidebar/right-sidebar-titlebar-drag-regions.test.ts @@ -14,8 +14,4 @@ describe('right sidebar titlebar drag regions', () => { RIGHT_SIDEBAR_HEADER_NO_DRAG_CLASS_NAME ) }) - - it('keeps a shared no-drag class for interactive header controls', () => { - expect(RIGHT_SIDEBAR_HEADER_NO_DRAG_CLASS_NAME).toBe('right-sidebar-header-no-drag') - }) }) diff --git a/src/renderer/src/components/sidebar/worktree-list/rows/indentation.test.ts b/src/renderer/src/components/sidebar/worktree-list/rows/indentation.test.ts index b2a5c45297a..4382330f038 100644 --- a/src/renderer/src/components/sidebar/worktree-list/rows/indentation.test.ts +++ b/src/renderer/src/components/sidebar/worktree-list/rows/indentation.test.ts @@ -234,7 +234,6 @@ describe('worktree list indentation', () => { }) it('derives the lineage parent-child step from the pre-refactor grouped-card anchor', () => { - expect(LINEAGE_IMMEDIATE_PARENT_STEP).toBe(20) expect(LINEAGE_CHILDREN_INLINE_OFFSET).toBe( LINEAGE_IMMEDIATE_PARENT_STEP - WORKTREE_CARD_SURFACE_MARGIN - FLUSH_CARD_MIN_CONTENT_INSET ) diff --git a/src/renderer/src/components/tab-group/useTabDragSplit.test.ts b/src/renderer/src/components/tab-group/useTabDragSplit.test.ts index f57380b09b1..d9730fadbcc 100644 --- a/src/renderer/src/components/tab-group/useTabDragSplit.test.ts +++ b/src/renderer/src/components/tab-group/useTabDragSplit.test.ts @@ -187,7 +187,6 @@ afterEach(() => { describe('tab drag activation distance', () => { it('uses the named threshold for enabled tab drags', () => { - expect(TAB_DRAG_ACTIVATION_DISTANCE_PX).toBe(12) expect(getTabDragActivationDistance(true)).toBe(TAB_DRAG_ACTIVATION_DISTANCE_PX) }) diff --git a/src/renderer/src/lib/pane-manager/pane-terminal-mouse-wheel.test.ts b/src/renderer/src/lib/pane-manager/pane-terminal-mouse-wheel.test.ts index 0e2bfb5053d..9e1458bda84 100644 --- a/src/renderer/src/lib/pane-manager/pane-terminal-mouse-wheel.test.ts +++ b/src/renderer/src/lib/pane-manager/pane-terminal-mouse-wheel.test.ts @@ -1,6 +1,5 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { - TERMINAL_TUI_MOUSE_WHEEL_MULTIPLIER, attachTerminalMouseWheelMultiplier, createTerminalTuiMouseWheelDistanceState, normalizeTerminalTuiMouseWheelMultiplier, @@ -79,10 +78,6 @@ describe('terminal mouse wheel multiplier', () => { vi.unstubAllGlobals() }) - it('uses a one-report multiplier for TUI mouse wheel scrolling', () => { - expect(TERMINAL_TUI_MOUSE_WHEEL_MULTIPLIER).toBe(1) - }) - it('normalizes TUI wheel multipliers to the supported report range', () => { expect(normalizeTerminalTuiMouseWheelMultiplier(undefined)).toBe(1) expect(normalizeTerminalTuiMouseWheelMultiplier(0)).toBe(1) diff --git a/src/shared/agent-status-types.test.ts b/src/shared/agent-status-types.test.ts index 39b44ee4092..cf76f6d3acd 100644 --- a/src/shared/agent-status-types.test.ts +++ b/src/shared/agent-status-types.test.ts @@ -306,7 +306,6 @@ Fix dispatch fallback preview for normalized status prompts` JSON.stringify({ state: 'waiting', interactivePrompt: long }) ) expect(result!.interactivePrompt).toHaveLength(AGENT_STATUS_INTERACTIVE_PROMPT_MAX_LENGTH) - expect(AGENT_STATUS_INTERACTIVE_PROMPT_MAX_LENGTH).toBe(16000) }) it('leaves interactivePrompt undefined when absent or non-string', () => { diff --git a/src/shared/commit-message-agent-spec.test.ts b/src/shared/commit-message-agent-spec.test.ts index 26f239e1a41..553f734a971 100644 --- a/src/shared/commit-message-agent-spec.test.ts +++ b/src/shared/commit-message-agent-spec.test.ts @@ -2,7 +2,6 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { COMMIT_MESSAGE_AGENT_SPECS, CUSTOM_AGENT_ID, - DEFAULT_COMMIT_MESSAGE_AGENT_ID, getCommitMessageAgentCapability, getCommitMessageAgentSpec, getCommitMessageModel, @@ -140,10 +139,6 @@ describe('COMMIT_MESSAGE_AGENT_SPECS', () => { ]) }) - it('defaults the agent picker to Claude', () => { - expect(DEFAULT_COMMIT_MESSAGE_AGENT_ID).toBe('claude') - }) - it('treats disabled default agents as unavailable for implicit Source Control AI choices', () => { expect(resolveCommitMessageAgentChoice(null, 'codex', ['codex'])).toBe('claude') expect(resolveCommitMessageAgentChoice(null, null, ['claude'])).toBeNull() diff --git a/src/shared/feature-interactions.test.ts b/src/shared/feature-interactions.test.ts index 260925c8b3b..04113088ed1 100644 --- a/src/shared/feature-interactions.test.ts +++ b/src/shared/feature-interactions.test.ts @@ -3,9 +3,7 @@ import { join, relative } from 'node:path' import { describe, expect, it } from 'vitest' import { FEATURE_INTERACTIONS, - FEATURE_INTERACTION_CATEGORIES, FEATURE_INTERACTION_CATEGORY_BY_ID, - FEATURE_INTERACTION_USAGE_BUCKETS, getFeatureInteractionUsageBucket, hasFeatureInteraction, normalizeFeatureInteractionTelemetryBuckets, @@ -129,19 +127,6 @@ describe('feature interactions', () => { }) it('maps interaction counts to the exact top-coded telemetry buckets', () => { - expect(FEATURE_INTERACTION_USAGE_BUCKETS).toEqual([ - 'count_1', - 'count_2', - 'count_3_4', - 'count_5_9', - 'count_10_19', - 'count_20_49', - 'count_50_99', - 'count_100_199', - 'count_200_499', - 'count_500_999', - 'count_1000_plus' - ]) expect(getFeatureInteractionUsageBucket(0)).toBeNull() expect(getFeatureInteractionUsageBucket(1)).toBe('count_1') expect(getFeatureInteractionUsageBucket(2)).toBe('count_2') @@ -154,23 +139,6 @@ describe('feature interactions', () => { }) it('covers every feature id with a telemetry category', () => { - expect(FEATURE_INTERACTION_CATEGORIES).toEqual([ - 'workspace', - 'agent', - 'browser', - 'launcher', - 'task_management', - 'notes', - 'review', - 'setup', - 'settings', - 'automation', - 'terminal', - 'collaboration', - 'resource_management', - 'voice', - 'source_control' - ]) expect(Object.keys(FEATURE_INTERACTION_CATEGORY_BY_ID).sort()).toEqual( FEATURE_INTERACTIONS.map((feature) => feature.id).sort() ) diff --git a/src/shared/image-paste-following-text.test.ts b/src/shared/image-paste-following-text.test.ts index ef46c4c7a9e..f115fbbc9d2 100644 --- a/src/shared/image-paste-following-text.test.ts +++ b/src/shared/image-paste-following-text.test.ts @@ -1,8 +1,5 @@ import { describe, expect, it } from 'vitest' -import { - IMAGE_PASTE_FOLLOWING_TEXT_SEPARATOR, - imagePasteWritesFollowedByText -} from './image-paste-following-text' +import { imagePasteWritesFollowedByText } from './image-paste-following-text' const IMAGE_A = '\x1b[200~/tmp/orca-paste-a.png\x1b[201~' const IMAGE_B = '\x1b[200~/tmp/orca-paste-b.png\x1b[201~' @@ -10,7 +7,6 @@ const IMAGE_B = '\x1b[200~/tmp/orca-paste-b.png\x1b[201~' describe('imagePasteWritesFollowedByText', () => { it('separates an attachment path from following prompt text by a single space', () => { expect(imagePasteWritesFollowedByText([IMAGE_A], true)).toEqual([`${IMAGE_A} `]) - expect(IMAGE_PASTE_FOLLOWING_TEXT_SEPARATOR).toBe(' ') }) it('keeps an attachment-only send as the framed path with no trailing separator', () => { diff --git a/src/shared/orca-session-address.test.ts b/src/shared/orca-session-address.test.ts index 0d9875f936d..37ce908707c 100644 --- a/src/shared/orca-session-address.test.ts +++ b/src/shared/orca-session-address.test.ts @@ -1,6 +1,5 @@ import { describe, expect, it } from 'vitest' import { - ORCA_SESSION_ADDRESS_PREFIX, formatOrcaSessionAddress, isOrcaSessionId, parseOrcaSessionAddress @@ -12,7 +11,6 @@ const ADDRESS = `session:${SESSION_ID}` describe('Orca session address', () => { it('addresses an Orca session id as session: and parses the bare id back', () => { - expect(ORCA_SESSION_ADDRESS_PREFIX).toBe('session:') expect(formatOrcaSessionAddress(SESSION_ID)).toBe(ADDRESS) expect(parseOrcaSessionAddress(ADDRESS)).toBe(SESSION_ID) const parsed = parseOrcaSessionAddress(ADDRESS) diff --git a/src/shared/repo-search-limits.test.ts b/src/shared/repo-search-limits.test.ts index e0151f54fbc..4ca302a055a 100644 --- a/src/shared/repo-search-limits.test.ts +++ b/src/shared/repo-search-limits.test.ts @@ -13,7 +13,6 @@ import { describe('repository ref-search limits', () => { it('accepts normal UI and CLI limits and adds one bounded probe row', () => { - expect(REPO_SEARCH_REFS_DEFAULT_LIMIT).toBe(25) expect(isRepoSearchRefsLimit(20)).toBe(true) expect(isRepoSearchRefsLimit(REPO_SEARCH_REFS_DEFAULT_LIMIT)).toBe(true) expect(isRepoSearchRefsLimit(600)).toBe(true) diff --git a/src/shared/setup-agent-sequencing.test.ts b/src/shared/setup-agent-sequencing.test.ts index 908ea149cef..5a8adc6312b 100644 --- a/src/shared/setup-agent-sequencing.test.ts +++ b/src/shared/setup-agent-sequencing.test.ts @@ -15,10 +15,7 @@ import { SETUP_AGENT_SEQUENCE_STARTUP_COMMAND_ENV, SETUP_AGENT_SEQUENCE_STARTUP_SCRIPT_ENV } from './setup-agent-sequencing' -import { - DEFAULT_SETUP_AGENT_STARTUP_POLICY, - shouldWaitForSetupBeforeAgentStartup -} from './setup-agent-startup-policy' +import { shouldWaitForSetupBeforeAgentStartup } from './setup-agent-startup-policy' const TEMP_DIRS: string[] = [] const WINDOWS_PROCESS_TEST_TIMEOUT_MS = 30_000 @@ -31,7 +28,6 @@ afterEach(() => { describe('createSequencedSetupAgentCommands', () => { it('defaults agent startup to immediate unless the wait policy is explicit', () => { - expect(DEFAULT_SETUP_AGENT_STARTUP_POLICY).toBe('start-immediately') expect(getDefaultRepoHookSettings().setupAgentStartupPolicy).toBe('start-immediately') expect(shouldWaitForSetupBeforeAgentStartup(undefined)).toBe(false) expect(shouldWaitForSetupBeforeAgentStartup('start-immediately')).toBe(false) diff --git a/src/shared/terminal-scrollback-policy.test.ts b/src/shared/terminal-scrollback-policy.test.ts index 26187b11f77..52414ababee 100644 --- a/src/shared/terminal-scrollback-policy.test.ts +++ b/src/shared/terminal-scrollback-policy.test.ts @@ -1,9 +1,5 @@ import { describe, expect, it } from 'vitest' import { - DESKTOP_TERMINAL_SCROLLBACK_ROW_PRESETS, - DESKTOP_TERMINAL_SCROLLBACK_ROWS_DEFAULT, - DESKTOP_TERMINAL_SCROLLBACK_ROWS_MAX, - DESKTOP_TERMINAL_SCROLLBACK_ROWS_MIN, legacyTerminalScrollbackBytesToRows, normalizeDesktopTerminalScrollbackRows, normalizeDesktopTerminalSnapshotRows, @@ -12,13 +8,6 @@ import { } from './terminal-scrollback-policy' describe('terminal scrollback policy', () => { - it('exports the desktop row defaults and presets', () => { - expect(DESKTOP_TERMINAL_SCROLLBACK_ROWS_DEFAULT).toBe(5_000) - expect(DESKTOP_TERMINAL_SCROLLBACK_ROWS_MIN).toBe(1_000) - expect(DESKTOP_TERMINAL_SCROLLBACK_ROWS_MAX).toBe(50_000) - expect(DESKTOP_TERMINAL_SCROLLBACK_ROW_PRESETS).toEqual([5_000, 10_000, 25_000, 50_000]) - }) - it('normalizes persisted desktop rows without string coercion', () => { expect(normalizeDesktopTerminalScrollbackRows(undefined)).toBe(5_000) expect(normalizeDesktopTerminalScrollbackRows('25000')).toBe(5_000) diff --git a/src/shared/windows-transient-lock-removal.test.ts b/src/shared/windows-transient-lock-removal.test.ts index 32b527ebfe6..0babb644d3f 100644 --- a/src/shared/windows-transient-lock-removal.test.ts +++ b/src/shared/windows-transient-lock-removal.test.ts @@ -58,10 +58,6 @@ describe('transient lock removal options', () => { }) }) - it('matches the repo policy of eight attempts', () => { - expect(WINDOWS_RM_MAX_RETRIES).toBe(8) - }) - it('asks for no retries where removal is not raced by the OS', () => { for (const platform of ['darwin', 'linux'] as const) { withPlatform(platform) diff --git a/src/shared/worktree/card-properties.test.ts b/src/shared/worktree/card-properties.test.ts index 45bc50e24a9..520de369094 100644 --- a/src/shared/worktree/card-properties.test.ts +++ b/src/shared/worktree/card-properties.test.ts @@ -45,7 +45,6 @@ describe('worktree card properties', () => { expect(getWorktreeCardModeProperties('Default')).toEqual( expect.arrayContaining(TASK_WORKTREE_CARD_PROPERTIES) ) - expect(TASK_WORKTREE_CARD_PROPERTIES).toEqual(['issue', 'linear-issue', 'jira-issue']) }) it('normalizes fixed and legacy properties while preserving selected properties', () => {