Skip to content

test: remove 58 low-value tests across desktop, tooling and mobile - #37853

Merged
OrcaWin merged 1 commit into
mainfrom
codex/remove-low-value-tests-1171
Nov 3, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
codex/remove-low-value-tests-1171

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 40 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8 $\color{#cf222e}{\Huge{\mathbf{−}}}$​962 $\color{#cf222e}{\Huge{\mathbf{−}}}$​954
Prod 1 0 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6

ELI5

Removes58 low-value tests while retaining395 authored behavioral checks.

What Changed

Reviewed160 sources/453 authored tests. Deletes eight whole suites, trims32 others, and removes six stale timing entries. Application code is unchanged.

Why

Cuts copied option/language/manifest inventories, duplicate predicate/cache-wrapper cases, a secret-eviction test that never committed retained ciphertext, and provider smoke checks whose assertions can pass without proving execution.

Linked Issue

N/A — maintainer-requested test audit; no pre-existing issue.

Visual Proof

N/A — tests and timing metadata only.

Testing

  • All33 local changed-file gates passed on Linux; explicit retained mobile tests (2 files/9 expanded cases), cloud counter tests (1 file/3 cases), and154 reliability gates passed.
  • Full PR CI must pass before merge.

Commands: ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=f9f825aa1a9ee0baa4e8d9c8970edd5e91ea50e9 --maxWorkers=2; scoped Vitest runs for retained mobile route/responsive and cloud counter files; node config/scripts/check-reliability-gates.mjs.

Risk

Level: Low. Removing tests intentionally loses narrow regression alarms; no equivalent replacements are claimed. Runtime behavior is unchanged. A plain revert restores the tests.

Review

Source dispositions, retained assertions and deletion references reviewed. Invalid/missing-panel admission and meaningful diagnostic/adapter checks were retained after root review.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material changed.

Notes

Cross-platform, remote/folder-workspace and mobile production behavior is unchanged. CI covers platform workflows.

Checklist

  • Focused scope; change, validation, risk and rollback explained.
  • Self-reviewed; cross-platform/remote/mobile implications considered.
  • No visual or interaction change.
  • Full CI pending.

@OrcaWin
OrcaWin requested a review from Jinwoo-H as a code owner November 3, 2026 16:42
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

This change removes tests across configuration scripts, mobile and CLI features, main-process modules, and shared and renderer code. The removed tests covered individual behaviors and integration paths; the summaries also identify tests that remain. Six test timing entries were removed from the CI timing map.

Merge Risk: Low · up to bc27c

Mergeable with awareness: useful regression checks are removed, though no application behavior change is shown.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: removing 58 low-value tests across desktop, tooling, and mobile.
Description check Passed The description covers the required sections, explains the change and rationale, documents testing, risk, rollback, visual proof, and checklist status. Minor spacing typos do not prevent review.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 8 files.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick comments: 6
src/cli/plugin-authoring/plugin-hook-template.test.ts: 1

1-1: Trivial · Data Integrity & Integration · Quick win

Keep a focused manifest-contract test.

The retained worker test checks the generated worker behavior, not the manifest that declares how Orca loads that worker. The generic schema check also accepts any structurally valid values. Retain the removed assertions or move equivalent assertions to a shared hook-template contract test.

cloud/apps/relay/src/sandbox-tcp-counters.test.ts: 1

32-32: Trivial · Stability & Availability · Quick win

Keep a direct exception-path test for readSandboxTcpCounters.

The current helper converts reader exceptions to undefined. The retained observability test checks downstream handling of an explicit undefined; it cannot detect removal of the helper’s catch. Because setTcpCounterReader reads synchronously during Cloud Run setup, an exception that escapes the helper can prevent startup from completing.

Suggested regression test
-import { parseProcNetSnmpTcp, sandboxTcpCounterDeltas } from './sandbox-tcp-counters.js'
+import {
+  parseProcNetSnmpTcp,
+  readSandboxTcpCounters,
+  sandboxTcpCounterDeltas
+} from './sandbox-tcp-counters.js'
 
+  it('returns undefined when the reader fails', () => {
+    expect(
+      readSandboxTcpCounters(() => {
+        throw new Error('ENOENT')
+      })
+    ).toBeUndefined()
+  })
src/cli/specs/profile-state.test.ts: 1

2-2: Trivial · Functional Correctness · Quick win

Retain a focused profile-state help contract test.

The retained tests do not exercise formatCommandHelp. A change to the rollback usage, recovery selectors, notes, or examples can therefore pass all retained tests while rendering incorrect help. Keep focused assertions for the key recovery selectors and usage or recovery text, rather than restoring the full flag-inventory assertion.

config/scripts/vitest-runtime-boundary.test.ts: 1

20-22: Trivial · Maintainability & Code Quality · Quick win

Restore the focused Node-runtime assertions.

The retained configuration checks validate only that Vitest uses the returned include list. They do not validate the required entries. A later removal can therefore route the SQLite-backed native-chat tests or the Parcel-watcher reconciliation test through Bun without failing the remaining checks.

Suggested fix
 import { expect, it } from 'vitest'
 import { access } from 'node:fs/promises'
+import { getNodeRuntimeInclude } from './vitest-node-runtime-files.mjs'
 import { runProcessSync } from '@orca/process-host'
 
@@
 it('launches application child fixtures under Node even when Vitest runs under Bun', () => {
   const result = runProcessSync({
     program: process.execPath,
@@
   const identity: unknown = JSON.parse(result.stdout)
   expect(identity).toEqual({ node: expect.stringMatching(/^\d+\.\d+\.\d+$/) })
 })
+
+it('routes native-chat journal and record-store SQLite contracts through Node', () => {
+  expect(getNodeRuntimeInclude()).toEqual(
+    expect.arrayContaining([
+      'src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.test.ts',
+      'src/main/native-chat/agent-session-wire/structured-agent-session-status-first-input-identity.test.ts',
+      'src/main/native-chat/structured-chat-naming.test.ts',
+      'src/main/runtime/agent-session/records/agent-session-conversation-name-store.test.ts'
+    ])
+  )
+})
+
+it('runs plugin reconciliation with its native watcher under Node', () => {
+  expect(getNodeRuntimeInclude()).toContain(
+    'src/main/plugins/plugin-service-reconciliation.test.ts'
+  )
+})
mobile/src/mobile-web-shell/host-root-responsive-content.test.tsx: 1

27-30: Trivial · Functional Correctness · Quick win

Retain coverage for the responsive route update.

The retained cases mount a new route for each viewport. They do not update an existing route after changing from landscape to portrait. This leaves the WorkspacePlaceholder → WorkspacePicker transition untested.

Suggested fix
   })('renders $expected at $width with ownership $ownsHostArea', (state) => {
     Object.assign(viewport, state)
     let tree: ReactTestRenderer | undefined
     act(() => {
       tree = create(createElement(HostWorktreeRoute))
     })
     expect(tree?.toJSON()).toMatchObject({ type: state.expected })
     act(() => tree?.unmount())
   })
+
+  it('returns the picker after rotating a host root from landscape to portrait', () => {
+    Object.assign(viewport, { width: 951, height: 669, ownsHostArea: true })
+    let tree: ReactTestRenderer | undefined
+    act(() => {
+      tree = create(createElement(HostWorktreeRoute))
+    })
+    expect(tree?.toJSON()).toMatchObject({ type: 'WorkspacePlaceholder' })
+    Object.assign(viewport, { width: 669, height: 951 })
+    act(() => tree?.update(createElement(HostWorktreeRoute)))
+    expect(tree?.toJSON()).toMatchObject({ type: 'WorkspacePicker' })
+    act(() => tree?.unmount())
+  })
 })
src/main/git/source-control/settled-diff-cache-bounds.test.ts: 1

19-24: Trivial · Performance & Scalability · Quick win

Restore the settled-cache aggregate-budget test.

The generic BoundedMap tests cannot detect a regression in SettledDiffCache's aggregate limit or its use of the aggregate limit. The deleted test was the only test that retained multiple results through this cache and asserted the 8,000,000-character ceiling.

Suggested fix
 import {
+  MAX_SETTLED_DIFF_CACHE_TOTAL_CHARACTERS,
   MAX_SETTLED_DIFF_CACHE_RESULT_CHARACTERS,
   SettledDiffCache
 } from './settled-diff-cache'
@@
 describe('SettledDiffCache bounds', () => {
+  it('holds total retained content under the character budget', () => {
+    const cache = new SettledDiffCache()
+    const chunk = MAX_SETTLED_DIFF_CACHE_RESULT_CHARACTERS
+    const needed = Math.ceil(MAX_SETTLED_DIFF_CACHE_TOTAL_CHARACTERS / chunk) + 2
+
+    for (let index = 0; index < needed; index += 1) {
+      cache.set(
+        `key-${index}`,
+        settledStamp(`stamp-${index}`),
+        diffOfSize(chunk),
+        cache.beginRead()
+      )
+    }
+
+    expect(cache.stats().retainedCharacters).toBeLessThanOrEqual(
+      MAX_SETTLED_DIFF_CACHE_TOTAL_CHARACTERS
+    )
+  })
+
   it('declines a single result larger than the per-entry cap', () => {
Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8f7a88f5-46fb-4123-b15a-c9e0de5891ea
Commits

Reviewing files that changed from the base of the PR and between f9f825a and bc27c39.

Files selected for processing: 41
  • cloud/apps/relay/src/sandbox-tcp-counters.test.ts
  • config/scripts/check-mobile-shared-dependency-versions.test.mjs
  • config/scripts/ci-shard-timings.json
  • config/scripts/electron-runtime-floor.test.ts
  • config/scripts/generate-plugin-authoring-skill-references.test.mjs
  • config/scripts/locale-catalog/locale-translation-policy.es-pr.test.mjs
  • config/scripts/sucrase-unused-transformers.test.ts
  • config/scripts/vitest-runtime-boundary.test.ts
  • mobile/src/mobile-web-shell/host-root-responsive-content.test.tsx
  • mobile/src/notifications/NotificationDeliverySection.test.tsx
  • mobile/src/source-control/mobile-review-route.test.ts
  • mobile/src/source-control/mobile-source-control-next-step.test.ts
  • src/cli/handlers/orchestration-request-show-cli.test.ts
  • src/cli/handlers/orchestration-send-receipt-warnings.test.ts
  • src/cli/plugin-authoring/plugin-display-name.test.ts
  • src/cli/plugin-authoring/plugin-hook-template.test.ts
  • src/cli/plugin-dev-watch/plugin-frame-log-dedupe.test.ts
  • src/cli/specs/profile-state.test.ts
  • src/main/ai-vault/scan-service/session-scanner-service-search-roots.test.ts
  • src/main/bitbucket/repository-ref.test.ts
  • src/main/claude/claude-command-lifecycle-frames.test.ts
  • src/main/claude/claude-pre-tool-use-real-cli.test.ts
  • src/main/credentials/protected-secret-persistence.test.ts
  • src/main/git/repo-detection-command.test.ts
  • src/main/git/source-control/settled-diff-cache-bounds.test.ts
  • src/main/git/source-control/status-upstream-ref.test.ts
  • src/main/git/worktrees/catalog/wsl-worktree-git-path.test.ts
  • src/main/ipc/source-control-ai-linked-issue.test.ts
  • src/main/native-chat/transcript-line-decoders-claude-image-companion.test.ts
  • src/main/persistence/window-save-sleep-records.test.ts
  • src/main/plugins/plugin-dev-watcher-ignore.test.ts
  • src/main/runtime/rpc/methods/connector.test.ts
  • src/main/runtime/runtime-repository-hooks-commands.test.ts
  • src/main/telemetry/onboarding-cohort-classifier.test.ts
  • src/main/wsl/host-lifecycle/wsl-host-kept-for-peers.test.ts
  • src/renderer/src/components/automations/automation-editor-prompt-options.test.ts
  • src/shared/native-chat/input/native-chat-background-task-row.test.ts
  • src/shared/profile-state-recovery-command.test.ts
  • src/shared/remote-execution-host-pty-id.test.ts
  • src/shared/ui-language.test.ts
  • src/shared/workspace-cards/card-template-schema.test.ts
Files with no reviewable changes: 33
  • src/shared/ui-language.test.ts
  • src/main/ipc/source-control-ai-linked-issue.test.ts
  • src/cli/handlers/orchestration-request-show-cli.test.ts
  • mobile/src/source-control/mobile-source-control-next-step.test.ts
  • src/main/git/source-control/status-upstream-ref.test.ts
  • src/renderer/src/components/automations/automation-editor-prompt-options.test.ts
  • mobile/src/notifications/NotificationDeliverySection.test.tsx
  • config/scripts/electron-runtime-floor.test.ts
  • src/main/git/worktrees/catalog/wsl-worktree-git-path.test.ts
  • src/cli/handlers/orchestration-send-receipt-warnings.test.ts
  • src/main/ai-vault/scan-service/session-scanner-service-search-roots.test.ts
  • src/shared/native-chat/input/native-chat-background-task-row.test.ts
  • src/shared/workspace-cards/card-template-schema.test.ts
  • src/main/persistence/window-save-sleep-records.test.ts
  • src/main/runtime/rpc/methods/connector.test.ts
  • src/main/claude/claude-command-lifecycle-frames.test.ts
  • src/main/runtime/runtime-repository-hooks-commands.test.ts
  • config/scripts/check-mobile-shared-dependency-versions.test.mjs
  • src/main/credentials/protected-secret-persistence.test.ts
  • mobile/src/mobile-web-shell/host-root-responsive-content.test.tsx
  • src/cli/plugin-dev-watch/plugin-frame-log-dedupe.test.ts
  • config/scripts/generate-plugin-authoring-skill-references.test.mjs
  • src/main/native-chat/transcript-line-decoders-claude-image-companion.test.ts
  • src/main/telemetry/onboarding-cohort-classifier.test.ts
  • src/main/bitbucket/repository-ref.test.ts
  • config/scripts/vitest-runtime-boundary.test.ts
  • src/cli/plugin-authoring/plugin-display-name.test.ts
  • src/shared/remote-execution-host-pty-id.test.ts
  • src/shared/profile-state-recovery-command.test.ts
  • src/main/git/repo-detection-command.test.ts
  • config/scripts/locale-catalog/locale-translation-policy.es-pr.test.mjs
  • config/scripts/ci-shard-timings.json
  • src/main/claude/claude-pre-tool-use-real-cli.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@OrcaWin
OrcaWin merged commit e95b0ca into main Nov 3, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant