Skip to content

test: remove 56 low-value tests and two suites - #37057

Merged
OrcaWin merged 1 commit into
mainfrom
audit/remove-low-value-tests-893
Nov 1, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
audit/remove-low-value-tests-893

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1455 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1453
Prod 2 0 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4

Remove 56 low-value test declarations, including the entire repository-catalog IPC hook and release-parallelism suites. Keep the 138 declarations that cover useful behavior and remove the deleted suites’ timing entries.

Validation: affected test sources passed Oxlint and Oxfmt checks. Full CI will run on this PR.

@OrcaWin
OrcaWin marked this pull request as ready for review November 1, 2026 15:29
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent 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: 1607b828-3279-4143-8d3a-b1f4fc83540d
Commits

Reviewing files that changed from the base of the PR and between b07c83d and a6eaf4a.

Files selected for processing: 1
  • config/flaky-test-pattern-baseline.txt
Files with no reviewable changes: 1
  • config/flaky-test-pattern-baseline.txt

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

Walkthrough

The diff removes test coverage across CI workflows and caches, Electron and native dependency tooling, process-host rebuilds, Codex configuration, and renderer IPC behavior. It also removes two CI timing records. The mobile change-scope test file now contains two focused tests for missing or uncertain path evidence. No implementation changes are described.

Merge Risk: Low · up to a6eaf

The baseline cleanup does not appear to block merging, but native-rebuild target propagation and fallback behavior still lack the previously identified direct test coverage. Merge with owner awareness of that regression risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description accurately summarizes the test removals and validation, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof, Testing details, AI Disclosure, R… Complete the required description sections. Add the issue link, explain why the tests are low value, provide testing details and platform coverage, state Visual Proof as N/A with a reason if applicable, complete applicable checkboxes, and a…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: removing 56 low-value tests and two test suites.
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 2 files.

Full details: Description check

Explanation

The description accurately summarizes the test removals and validation, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof, Testing details, AI Disclosure, Review, Notes, and Checklist.

Resolution

Complete the required description sections. Add the issue link, explain why the tests are low value, provide testing details and platform coverage, state Visual Proof as N/A with a reason if applicable, complete applicable checkboxes, and address review, compatibility, security, performance, and CI status.

  • 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

@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
config/scripts/rebuild-native-deps.test.mjs: 3

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

Keep coverage for explicit installer target propagation.

The current tests do not verify that --platform and --arch reach the Electron binary installer through ELECTRON_INSTALL_PLATFORM and ELECTRON_INSTALL_ARCH. Retain the deleted test or add equivalent end-to-end coverage.

Suggested fix
+  it('passes the rebuild target to the Electron binary installer', () => {
+    const projectDir = mkTempProject()
+
+    try {
+      writeFakeElectronPackage(projectDir)
+      writeFakeElectronGet(projectDir, { logTargetBeforeInstall: true })
+      writeFakeElectronExtractor(projectDir, { createExecutable: true })
+      writeFakeElectronRebuild(projectDir)
+
+      const result = runRebuildScript(
+        projectDir,
+        { npm_config_platform: '', npm_config_arch: '' },
+        ['--platform=linux', '--arch=arm64', '--force']
+      )
+
+      expect(result.status, result.stderr).toBe(0)
+      expect(readFileSync(join(projectDir, 'electron-get.log'), 'utf8')).toBe(
+        'platform=linux arch=arm64\ndownload attempted\n'
+      )
+    } finally {
+      removeTreeSync(projectDir)
+    }
+  })
+
   it('lets an explicit rebuild target win over inherited installer variables', () => {

171-171: Trivial · Maintainability & Code Quality · Quick win

Keep coverage for the missing path.txt repair in the rebuild script.

The removed test covered the rebuild script’s missing-file branch without invoking the installer. The other rebuild-script suites create path.txt before invoking the script, and the installer test targets a separate implementation.

Restore the removed assertion, or add an equivalent test that removes node_modules/electron/path.txt, runs the rebuild, checks that the file is restored, and checks that the installer is not invoked. This protects against a future regression that leaves Electron metadata missing or triggers an unnecessary download.


171-171: Trivial · Maintainability & Code Quality · Quick win

Keep coverage for the npm_config_* target fallback.

The production fallback is still present, but no test verifies it. Restore the deleted test or add equivalent coverage with no CLI or ELECTRON_INSTALL_* overrides. Assert the platform and architecture passed to the installer.

config/scripts/release-windows-signing-gate.test.mjs: 1

1-10: Trivial · Maintainability & Code Quality · Quick win

Keep a test for the Windows signing gate in release-cut.yml.

The removed tests were the only checks that parse .github/workflows/release-cut.yml for these signing contracts:

  • The Windows signing submission steps at release-cut.yml:1493 and :1710 run only when steps.mac-signing-gate.outcome == 'success', github.run_attempt == 1, matrix.platform == 'win', and the matching unsigned upload succeeded.
  • The submission steps must run after mac-signing-gate.
  • The verifier restore from $WORKFLOW_SHA must run before the gate.

No remaining test checks these conditions. Dropping or changing one of the mac-signing-gate checks would pass the test suite. Windows artifacts could then reach signing without a successful macOS verification. Add one workflow-contract test that evaluates both if: conditions and asserts the step order. It should use the existing runInNewContext approach from the removed test, and it should cover the mac-signing-gate outcome cases.

src/preload/renderer-restart-wiring.test.ts: 1

122-124: Trivial · Functional Correctness · Quick win

Add a test for the preload updater and unload relays.

The removed test was the only test that drives the updater:status, updater:quitAndInstallAborted, and uncommitted window:unload-prevented listeners through registerRendererRestartIpcRelays. The remaining unload test covers only the committed early return. A regression in any of the three listeners can pass the suite. A dropped updater:quitAndInstallAborted listener can leave updater restart preparation un-aborted after main abandons an install. Add a focused test at this boundary, after the releases preparation ownership test.

Suggested fix
     expect(remove.mock.calls).toEqual(add.mock.calls)
   })
 
+  it('relays updater status, aborted installs, and prevented unload events', () => {
+    const eventTarget = new EventTarget()
+    const unloadPrevented = vi.fn()
+    const restartAborted = vi.fn()
+    const { ipcRenderer, handleStatus, abort } = restartIpc(eventTarget)
+    eventTarget.addEventListener(ORCA_RENDERER_UNLOAD_PREVENTED_EVENT, unloadPrevented)
+    eventTarget.addEventListener(ORCA_APP_RESTART_ABORTED_EVENT, restartAborted)
+    ipcRenderer.emit('updater:status', {}, { state: 'error', message: 'install failed' })
+    ipcRenderer.emit('updater:quitAndInstallAborted')
+    ipcRenderer.emit('window:unload-prevented')
+
+    expect(handleStatus).toHaveBeenCalledWith({ state: 'error', message: 'install failed' })
+    expect(abort).toHaveBeenCalledTimes(1)
+    expect(unloadPrevented).toHaveBeenCalledTimes(1)
+    expect(restartAborted).toHaveBeenCalledTimes(1)
+  })
+
   it('marks preparation before invoking main and aborts on IPC failure', async () => {
src/renderer/src/hooks/ipc-events/project-catalog-ipc-bridge.ts: 1

13-32: Trivial · Maintainability & Code Quality · Quick win

Retain a regression test for the app-shell repository catalog bridge.

The deleted suite was the only repository test that invoked window.api.repos.onChanged through this bridge. Restore one focused test that captures the callback and covers both runtime branches, including local catalog refresh and parked-terminal remount. Without this coverage, a regression can leave the all-host sidebar stale or prevent parked terminal tabs from recovering without a test failure.


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: 44d4fb82-de3a-4580-910e-99d7377b4fc9
Commits

Reviewing files that changed from the base of the PR and between 7e935c5 and b07c83d.

Files selected for processing: 15
  • config/scripts/ci-closed-pr-cancellation.test.mjs
  • config/scripts/ci-native-cache.test.mjs
  • config/scripts/ci-shard-timings.json
  • config/scripts/ci-unit-module-cache.test.mjs
  • config/scripts/install-electron-package-binary.test.mjs
  • config/scripts/mobile-test-change-scope.test.mjs
  • config/scripts/node-server-release-parallelism.test.mjs
  • config/scripts/process-host-dev-rebuild.test.ts
  • config/scripts/rebuild-native-deps-node-pty.test.mjs
  • config/scripts/rebuild-native-deps.test.mjs
  • config/scripts/release-windows-signing-gate.test.mjs
  • src/main/codex/codex-config-mirror.test.ts
  • src/main/codex/config-features-settings-promotion.test.ts
  • src/preload/renderer-restart-wiring.test.ts
  • src/renderer/src/hooks/useIpcEvents-repos-changed-catalogs.test.ts
Files with no reviewable changes: 13
  • config/scripts/node-server-release-parallelism.test.mjs
  • src/renderer/src/hooks/useIpcEvents-repos-changed-catalogs.test.ts
  • config/scripts/ci-closed-pr-cancellation.test.mjs
  • src/main/codex/config-features-settings-promotion.test.ts
  • src/preload/renderer-restart-wiring.test.ts
  • config/scripts/ci-unit-module-cache.test.mjs
  • config/scripts/mobile-test-change-scope.test.mjs
  • config/scripts/release-windows-signing-gate.test.mjs
  • config/scripts/rebuild-native-deps-node-pty.test.mjs
  • config/scripts/ci-shard-timings.json
  • config/scripts/install-electron-package-binary.test.mjs
  • src/main/codex/codex-config-mirror.test.ts
  • config/scripts/ci-native-cache.test.mjs

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

@OrcaWin
OrcaWin force-pushed the audit/remove-low-value-tests-893 branch from b07c83d to a6eaf4a Compare November 1, 2026 15:48
@OrcaWin
OrcaWin merged commit 9ce6508 into main Nov 1, 2026
45 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