Skip to content

test: remove 83 low-value checks across 30 whole suites - #37835

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

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

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 34 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1728 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1727
Prod 1 0 $\color{#cf222e}{\Huge{\mathbf{−}}}$​28 $\color{#cf222e}{\Huge{\mathbf{−}}}$​28

Remove 83 low-value authored test registrations: delete 30 whole suites and trim four others. The removed cases check copied inventories, private selectors, supplied status receipts, mock wiring, and command strings without exercising the claimed operation.

The audit reviewed 70 complete test sources (161 authored registrations), retaining 78 registrations covering real filesystem and process behavior, parsing, persistence, cancellation, protocol compatibility, work budgets, and destructive-action admission. Retained registration ASTs are unchanged. Counts exclude parameterized runtime expansion. The deleted tests’ direct alarms are intentionally removed; remaining tests are not claimed as equivalent replacements.

Remove 28 obsolete shard-timing rows. Historical validation records and recorded diff fixtures remain intact. No application code changes.

Validation: all original source pins, registration hashes, retained ASTs, syntax, and diff whitespace checks pass. All 154 reliability gates and the path-literal ratchet pass locally. The four partially changed test files are also run locally. Full PR CI must pass before merge.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The pull request removes test files and selected test cases across application areas. It also removes corresponding CI timing records and reorders several WSL host-lifecycle timing records. The values of the reordered records remain unchanged.

Merge Risk: Low · up to 36562

The cleanup is mergeable with owner awareness, but the focused tests should be restored to preserve protection for these reachable behaviors.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the test removals, timing-row cleanup, rationale, scope, and validation. However, it omits most required template sections, including ELI5, Linked Issue, Visual Proof, Risk, R… Rewrite the description using the repository template. Add the required headings and content, including an issue link or applicable maintainer exception, visual proof or N/A with a reason, testing details and platform coverage, risk and rol…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: removing 83 low-value test checks across 30 suites. It is concise and related to the changeset.
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 1 files.

Full details: Description check

Explanation

The description explains the test removals, timing-row cleanup, rationale, scope, and validation. However, it omits most required template sections, including ELI5, Linked Issue, Visual Proof, Risk, Review, Notes, and Checklist details.

Resolution

Rewrite the description using the repository template. Add the required headings and content, including an issue link or applicable maintainer exception, visual proof or N/A with a reason, testing details and platform coverage, risk and rollback information, review notes, checklist status, and the remaining required sections.

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/main/ai-vault/transcripts/remote-session-content-lines.test.ts: 1

15-37: Trivial · Maintainability & Code Quality · Quick win

Restore the pre-cancelled signal regression test.

The current guard rejects before emitting a line. Restore a test that aborts the signal before scanning empty content. This test detects removal of the initial guard, which the retained event-loop cancellation tests do not detect.

Suggested fix
 describe('remote session content lines', () => {
+  it('rejects an already cancelled scan even for empty content', async () => {
+    const controller = new AbortController()
+    controller.abort()
+    await expect(collect('', controller.signal)).rejects.toThrow()
+  })
+
   it.each(['\n'.repeat(400), `${'x'.repeat(300_000)}\nlast`])(
src/main/ipc/wsl-move-reloadable-window.test.ts: 1

40-50: Trivial · Functional Correctness · Quick win

Restore the non-Settings view assertion for leaveSettingsForWslMoveReload.

leaveSettingsForWslMoveReload changes activeView only when the current view is 'settings'. The remaining case covers only that branch. A regression that sets 'terminal' for every view would pass the suite. The removed keeps any other view the reload started from case is the only test in src/main/ipc/ that would fail for that regression. The production caller in wsl-move-driver-wiring.ts uses this helper as the reload landing, so a reload started from another view can land on the wrong view without a failing test.

Suggested fix
     expect(relaunched.getUI().activeView).toBe('terminal')
   })
+
+  it('keeps any other view the reload started from', async () => {
+    const store = await openStore()
+    store.updateUI({ activeView: 'tasks' })
+
+    leaveSettingsForWslMoveReload(store)
+
+    expect(store.getUI().activeView).toBe('tasks')
+  })
 })
src/main/runtime/runtime-skill-install-authority.ts: 1

113-132: Trivial · Functional Correctness · Quick win

Restore focused runtime-authority coverage.

The deleted tests were the only inspected tests that called createSkillInstallAuthority().resolveWorktree and asserted lookup-error propagation, mismatched-ID handling, and folder-key rejection. The surviving install tests use stub authorities, so regressions in these reachable branches can pass the test suite.

Restore src/main/runtime/runtime-skill-install-authority.test.ts or add equivalent direct tests.

Suggested fix
+Restore the deleted `src/main/runtime/runtime-skill-install-authority.test.ts`
+tests for:
+
+- lookup-error propagation
+- mismatched-ID results
+- folder-key rejection
src/main/plugins/plugin-runtime-rpc-dispatch.test.ts: 1

29-52: Trivial · Maintainability & Code Quality · Quick win

Restore direct assertions for the local-CLI RPC wrapper.

The retained tests do not exercise pluginRuntimeRpc result forwarding, parameter forwarding, or PluginRuntimeRpcError conversion. The binding tests use a stub delegate, and the dispatcher test does not call this wrapper. Restore focused direct assertions for the success and unknown-method cases. No production change is required.

src/main/runtime/runtime-rpc/runtime-rpc-long-poll.ts: 1

26-75: Trivial · Functional Correctness · Quick win

Restore the focused short-RPC classification coverage.

The deleted tests are the only focused assertions that unprompted launches, existing worktree targets, and terminal.send with agentPrompt: false remain classified as null. Restore these assertions to protect the admission and keepalive boundary.

Suggested fix
+import { describe, expect, it } from 'vitest'
+import { classifyRuntimeLongPoll } from './runtime-rpc-long-poll'
+
+describe('classifyRuntimeLongPoll', () => {
+  it.each(['agent.launch', 'agent.launchReplay'])(
+    'keeps unprompted %s requests short',
+    (method) => {
+      expect(
+        classifyRuntimeLongPoll({
+          id: 'req_launch',
+          authToken: 'token',
+          method,
+          params: {}
+        })
+      ).toBeNull()
+      expect(
+        classifyRuntimeLongPoll({
+          id: 'req_existing',
+          authToken: 'token',
+          method,
+          params: { target: { kind: 'existing', worktree: 'id:wt-7' } }
+        })
+      ).toBeNull()
+    }
+  )
+
+  it('keeps direct terminal.send requests short', () => {
+    expect(
+      classifyRuntimeLongPoll({
+        id: 'req_direct',
+        authToken: 'token',
+        method: 'terminal.send',
+        params: { agentPrompt: false }
+      })
+    ).toBeNull()
+  })
+})
src/main/text-generation/copilot-unavailable-model-retry.ts: 1

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

Restore direct coverage for the Copilot retry guards.

The helper remains reachable from failed Copilot requests. The surviving branch-name test covers only the matching rejection and the resulting retry. It does not detect regressions in the guards for missing or invalid failure output, stdout content, a missing model, or malformed and mismatched rejection text.

Suggested fix
diff --git a/src/main/text-generation/copilot-unavailable-model-retry.test.ts b/src/main/text-generation/copilot-unavailable-model-retry.test.ts
new file mode 100644
--- /dev/null
+++ b/src/main/text-generation/copilot-unavailable-model-retry.test.ts
@@
+import { describe, expect, it } from 'vitest'
+import type { CommitMessagePlan } from '../../shared/commit-message-plan'
+import { copilotUnavailableModelRetryPlan } from './copilot-unavailable-model-retry'
+
+const rejection = 'Error: Model "gpt-5.4" from --model flag is not available.\n'
+const plan: CommitMessagePlan = {
+  binary: 'copilot',
+  args: ['--prompt', rejection, '--silent', '--model', 'gpt-5.4', '--effort', 'low'],
+  stdinPayload: null,
+  label: 'GitHub Copilot'
+}
+
+function failure(overrides: { exitCode?: number | null; stdout?: string; stderr?: string }) {
+  return { label: 'GitHub Copilot', exitCode: 1, stdout: '', stderr: rejection, ...overrides }
+}
+
+describe('copilotUnavailableModelRetryPlan', () => {
+  it('removes the rejected model and its effort level', () => {
+    expect(copilotUnavailableModelRetryPlan(plan, failure({}))?.args).toEqual([
+      '--prompt',
+      rejection,
+      '--silent'
+    ])
+  })
+
+  it.each([
+    ['no failure output', undefined],
+    ['exit code 0', failure({ exitCode: 0 })],
+    ['unknown exit code', failure({ exitCode: null })],
+    ['model output', failure({ stdout: 'fix-login\n' })],
+    ['quoted rejection', failure({ stderr: `agent said: ${rejection}` })],
+    ['another model rejection', failure({ stderr: 'Error: Model "gpt-5.5" from --model flag is not available.\n' })]
+  ])('does not retry with %s', (_name, output) => {
+    expect(copilotUnavailableModelRetryPlan(plan, output)).toBeNull()
+  })
+
+  it('does not retry when the plan has no model', () => {
+    expect(copilotUnavailableModelRetryPlan({ ...plan, args: plan.args.slice(0, 3) }, failure({}))).toBeNull()
+  })
+})
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: b12ad601-4092-40f7-8153-0b9cacba2c97
Commits

Reviewing files that changed from the base of the PR and between f63a887 and 3656288.

Files selected for processing: 35
  • config/scripts/ci-shard-timings.json
  • src/main/ai-vault/parse-cache/session-sidecar-stat.test.ts
  • src/main/ai-vault/transcripts/remote-session-content-lines.test.ts
  • src/main/browser/desktop-browser-bridge/remote-cli-driven-workspaces.test.ts
  • src/main/cli/wsl-cli-login-path.test.ts
  • src/main/git/source-control/check-ignored-paths.test.ts
  • src/main/git/worktrees/sparse-checkout/worktree-sparse-state-host-paths.test.ts
  • src/main/ipc/jira/ipc-params.test.ts
  • src/main/ipc/pty/ipc/spawn-options-spawn-intent.test.ts
  • src/main/ipc/wsl-move-reloadable-window.test.ts
  • src/main/kimi/kimi-runtime-home.test.ts
  • src/main/plugins/plugin-runtime-rpc-dispatch.test.ts
  • src/main/plugins/view/plugin-host-renderer-actions.test.ts
  • src/main/ports/local-workspace-port-attribution-wsl-gate.test.ts
  • src/main/preflight/codex-cli-installation.test.ts
  • src/main/pty/environment/windows-path-registry-fallback.test.ts
  • src/main/runtime/agent-session/agent-session-replaced-runtime.test.ts
  • src/main/runtime/browser-tab-create-folder-workspace.test.ts
  • src/main/runtime/rpc/methods/mobile-relay-hosts.test.ts
  • src/main/runtime/rpc/methods/worktree-create-args.test.ts
  • src/main/runtime/runtime-rpc/runtime-rpc-long-poll.test.ts
  • src/main/runtime/runtime-skill-install-authority.test.ts
  • src/main/runtime/terminal/stop/worktree-sleep-resume-records.test.ts
  • src/main/startup/plugin-worktree-lifecycle.test.ts
  • src/main/telemetry/cohort-classifier.test.ts
  • src/main/text-generation/command-environment-wsl.test.ts
  • src/main/text-generation/copilot-unavailable-model-retry.test.ts
  • src/main/workspaces/execution-host/project-runtime-read-git-options-opt-in.test.ts
  • src/main/wsl/execution/wsl-guest-process-identity.test.ts
  • src/main/wsl/host-lifecycle/wsl-host-connection-record.test.ts
  • src/main/wsl/host-lifecycle/wsl-host-distro-list.test.ts
  • src/main/wsl/host-lifecycle/wsl-host-peer-desktops.test.ts
  • src/main/wsl/orcad/wsl-orcad-own-build-launch-env.test.ts
  • src/main/wsl/orcad/wsl-orcad-reconnect-backoff.test.ts
  • src/renderer/src/components/plugins/state/plugin-try-action.test.ts
Files with no reviewable changes: 34
  • src/main/pty/environment/windows-path-registry-fallback.test.ts
  • src/main/runtime/agent-session/agent-session-replaced-runtime.test.ts
  • src/main/ports/local-workspace-port-attribution-wsl-gate.test.ts
  • src/main/runtime/rpc/methods/mobile-relay-hosts.test.ts
  • src/main/ipc/jira/ipc-params.test.ts
  • src/main/wsl/host-lifecycle/wsl-host-connection-record.test.ts
  • src/main/browser/desktop-browser-bridge/remote-cli-driven-workspaces.test.ts
  • src/renderer/src/components/plugins/state/plugin-try-action.test.ts
  • src/main/wsl/host-lifecycle/wsl-host-peer-desktops.test.ts
  • src/main/git/source-control/check-ignored-paths.test.ts
  • src/main/telemetry/cohort-classifier.test.ts
  • src/main/preflight/codex-cli-installation.test.ts
  • src/main/ipc/pty/ipc/spawn-options-spawn-intent.test.ts
  • src/main/wsl/orcad/wsl-orcad-reconnect-backoff.test.ts
  • src/main/runtime/rpc/methods/worktree-create-args.test.ts
  • src/main/cli/wsl-cli-login-path.test.ts
  • src/main/kimi/kimi-runtime-home.test.ts
  • src/main/runtime/runtime-skill-install-authority.test.ts
  • src/main/runtime/runtime-rpc/runtime-rpc-long-poll.test.ts
  • src/main/runtime/browser-tab-create-folder-workspace.test.ts
  • src/main/wsl/host-lifecycle/wsl-host-distro-list.test.ts
  • src/main/ipc/wsl-move-reloadable-window.test.ts
  • src/main/startup/plugin-worktree-lifecycle.test.ts
  • src/main/workspaces/execution-host/project-runtime-read-git-options-opt-in.test.ts
  • src/main/ai-vault/parse-cache/session-sidecar-stat.test.ts
  • src/main/wsl/orcad/wsl-orcad-own-build-launch-env.test.ts
  • src/main/runtime/terminal/stop/worktree-sleep-resume-records.test.ts
  • src/main/git/worktrees/sparse-checkout/worktree-sparse-state-host-paths.test.ts
  • src/main/plugins/view/plugin-host-renderer-actions.test.ts
  • src/main/text-generation/command-environment-wsl.test.ts
  • src/main/plugins/plugin-runtime-rpc-dispatch.test.ts
  • src/main/ai-vault/transcripts/remote-session-content-lines.test.ts
  • src/main/text-generation/copilot-unavailable-model-retry.test.ts
  • config/scripts/ci-shard-timings.json

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

@OrcaWin
OrcaWin merged commit 0a1340b into main Nov 3, 2026
78 of 80 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