Skip to content

test: remove 152 low-value test declarations - #38182

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

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

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Remove low-value tests to reduce maintenance and CI work.

Files Added Deleted Net
Test 43 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​13 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2718 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2705
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​29 $\color{#cf222e}{\Huge{\mathbf{−}}}$​47 $\color{#cf222e}{\Huge{\mathbf{−}}}$​18

What Changed

Remove 152 authored registrations from 60 reviewed main-process test sources: six whole suites, 37 partial suites and 17 unchanged suites. Preserve 223 registrations protecting meaningful ownership, cleanup, races, persistence and external behavior. Retained callbacks and tables stay exact; three files receive an EOF blank-line trim and 17 receive formatting cleanup.

Remove six obsolete timing rows and update four reliability gates. Archive one complete affected historical receipt and the unvalidated active selectors/assertion references. Preserve every unrelated receipt and prior gap. No production changes or equivalent replacement-coverage claim.

Why

Source and decisive-owner review identified private counters, self-derived expectations, telemetry wording and repeated mock registry characterization with little regression value. Intentional losses are recorded per registration; mocked I/O behavior with meaningful outcomes is retained.

Linked Issue

Maintainer-directed test audit.

Visual Proof

N/A: tests and inventories only; no production UI change.

Testing

  • All 24 final check:changed checks passed against the actual merged base.
  • 50 ordinary roots, including both actual registration drivers: 1772 expanded assertions, 1769 passed and 3 platform-gated/skipped assertions recorded in the runtime report.
  • Four special roots passed all six retained cases: real POSIX process-tree teardown, packaged orcad CLI RPCs, real node-pty/zsh crash/ready behavior, and the install/restart/update Electron extension lifecycle.
  • Static review authenticated all current code bodies, preserved survivor callbacks/context, and found no deleted-suite importers or affected support orphans.

Tests/apps ran with background launch on isolated Xvfb. Packaged artifacts and native dependencies were verified; validation-local copies and caches preserve shared stores. Linux native validation only; no macOS/Windows/remote execution claim. The runtime receipts retain their original executed tree. The final candidate additionally inherits seven separately validated upstream renderer paths from the actual parent squash; selected registration/callback/wrapper bytes and owner, driver, resolver and metadata identities remain unchanged. The 17 formatting changes preserve complete source ASTs; final checks passed afterward. Authored registrations count once, independently of expanded runtime rows. Historical reliability claims are not promoted by these runs.

AI Disclosure

Internal maintainer-directed change.

Review

Self-reviewed and independently value-reviewed; final parent static acceptance recorded. Full PR CI must pass before merge.

Agent skill upstream boundary

Not applicable.

Checklist

  • Focused on reviewed tests and their inventories.
  • Intentional coverage losses recorded; no production behavior changed.
  • Cross-platform, remote, mobile and folder-workspace impact considered.
  • Local checks passed; full PR CI required before merge.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

This change removes or reduces test coverage across agent sessions, browser routing, IPC, persistence, plugins, Git, and other areas. It also updates reliability-gate records to document selected coverage losses and removes six test-duration entries from CI shard timings. One repository default-branch test is added for an unavailable SSH provider. No production implementation behavior changes.

Merge Risk: Low · up to 387fd

The change reduces protection against future terminal ownership and worktree pruning regressions. It is mergeable with awareness of these coverage gaps.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title "test: remove 152 low-value test declarations" matches the main change. The PR removes 152 authored test registrations across 60 main-process test sources, and the summary and objectives des…
Description check Passed The description fills in the template's main sections: ELI5, What Changed, Why, Testing, Risk-adjacent notes, AI Disclosure, Review, upstream boundary, and checklist. It explains the scope (152 remove…
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: Title check

Explanation

The title "test: remove 152 low-value test declarations" matches the main change. The PR removes 152 authored test registrations across 60 main-process test sources, and the summary and objectives describe the same scope. It is specific and concise, and it has no file lists or vague terms. The title does not mention the timing rows or reliability-gate metadata edits, which are secondary.

Full details: Description check

Explanation

The description fills in the template's main sections: ELI5, What Changed, Why, Testing, Risk-adjacent notes, AI Disclosure, Review, upstream boundary, and checklist. It explains the scope (152 removed registrations, 223 retained, six timing rows, four reliability gates) and gives a Testing summary with Linux-only validation. It has gaps. The Linked Issue section reads "Maintainer-directed test audit" and has no issue reference, which the template says should always exist. The Visual Proof section is N/A with a reason. The Risk section is missing: there is no 'Level' selection (Low/Medium/High), and it does not say how to back out the change. The Testing checkboxes are not ticked, and the 'Every added test fails without this change' item is not addressed. The Review section is filled in, but the 'Ensure no issues in' notes are not addressed explicitly for security, SSH, or mobile impact beyond a brief cross-platform note. The template's Linked Issue and Risk requirements are not met, but the description is mostly complete overall.

Resolution

Add the Risk section with a Level (Low, Medium, or High), a short statement of what could break, and how to revert. Replace the Linked Issue placeholder with an actual issue reference, or state why none exists. Tick or address the Testing checkboxes, including the test-anti-pattern item. Note the Notes/checklist items for security and SSH impact explicitly.

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 13 files. (1 skipped: 1 unsupported.)

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

@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: 2
src/main/persistence/terminal-topology/terminal-owner-invariants.test.ts: 1

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

Keep the distinct terminal-owner branch tests.

The retained tests do not directly cover these separate contracts:

  • leaf_in_other_tab_on_other_host at src/shared/workspace-layout/terminal-owner-invariants.ts:95-99.
  • Skipping unsupported partitions at src/shared/workspace-layout/terminal-owner-invariants.ts:90-93.
  • Enumerating layouts only through tab rows at src/shared/workspace-layout/terminal-owner-invariants.ts:41-44.
  • Ignoring legacy leaf IDs at src/shared/workspace-layout/terminal-owner-invariants.ts:86-88.

A regression in any branch could pass this suite. Restore focused assertions for these cases before removing TEST_LEAF_LIVE.

src/main/git/worktrees/removal/worktree-prune-guard.test.ts: 1

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

Restore boundary cases for isForeignLink in the prune guard tests.

isForeignLink decides which worktree entries receive protective locks before pruning. The removed matrix was the only direct test of that classifier. The remaining prune tests do not cover relative links, a //server/share link under Windows Git, or a \\?\ extended path under WSL Git. A future change to the classifier can break these cases without a failing test. Restore the four uncovered rows as a small table:

Suggested test restoration
-import { PRUNE_GUARD_LOCK_REASON, pruneGitWorktrees } from './worktree-prune-guard'
+import { isForeignLink, PRUNE_GUARD_LOCK_REASON, pruneGitWorktrees } from './worktree-prune-guard'
     expect(existsSync(lockFile('wsl'))).toBe(false)
   })
 })
+
+describe('isForeignLink', () => {
+  it.each([
+    ['../x/.git', false, false],
+    ['../x/.git', true, false],
+    ['//server/share/x/.git', false, false],
+    [String.raw`\\?\C:\x\.git`, true, true]
+  ])('%s with WSL Git=%s is foreign: %s', (link, runsInWsl, foreign) => {
+    expect(isForeignLink(link, runsInWsl)).toBe(foreign)
+  })
+})
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: 930eb408-0cd6-4ca2-93b9-f8c57fe71431
Commits

Reviewing files that changed from the base of the PR and between e15bd08 and 387fde0.

Files selected for processing: 45
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • src/main/ai-vault/scanners/omp/omp-session-root.test.ts
  • src/main/antigravity/native-windows-token-decode.test.ts
  • src/main/browser/agent-browser/agent-browser-action-effects.test.ts
  • src/main/browser/cdp/input/guest-focused-frame-route.test.ts
  • src/main/browser/element-grab/browser-grab-payload.test.ts
  • src/main/browser/routing/partitions/browser-route-partition-stability.test.ts
  • src/main/claude/claude-background-stop-records.test.ts
  • src/main/claude/structured/claude-structured-dispatch-attachment-rejection.test.ts
  • src/main/git/runner-gh-account-binding.test.ts
  • src/main/git/worktrees/removal/worktree-prune-guard.test.ts
  • src/main/gitea/client-scan-invalidation.test.ts
  • src/main/hermes/hermes-config-flow-insertion.test.ts
  • src/main/ipc/pty/pty-ssh-stop-verdict.test.ts
  • src/main/ipc/runtime-environments/runtime-environment-cli-removal-routing.test.ts
  • src/main/ipc/workspace-cleanup/workspace-cleanup-document-lifetime.test.ts
  • src/main/ipc/wsl/wsl-host-handlers-user-actions.test.ts
  • src/main/native-chat/agent-session-journal/journal-submission-positions.spec.ts
  • src/main/native-chat/agent-session-timeline/provider-timeline-assembler-turns.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-registrations.test.ts
  • src/main/omp/omp-session-cwd-lookup.test.ts
  • src/main/opencode2/status-plugin-setup-lifetime.test.ts
  • src/main/orcad/orcad-managed-idle-exit.test.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-incidental-writes.test.ts
  • src/main/persistence/terminal-topology/terminal-owner-invariants.test.ts
  • src/main/plugins/installation/plugin-atomic-file-write.test.ts
  • src/main/plugins/panels/plugin-frame-blocked-requests.test.ts
  • src/main/plugins/plugin-dev-event-emit.test.ts
  • src/main/plugins/workers/plugin-worker-panel-requests.test.ts
  • src/main/pty/shell-startup/powershell-profile-env.test.ts
  • src/main/runtime/orchestration/db/hot-path-statement-compilation.test.ts
  • src/main/runtime/renderer-browser-session-reconciliation.test.ts
  • src/main/runtime/repo-worktree-admin-fingerprint.test.ts
  • src/main/runtime/restored-pane-hook-store-resume.test.ts
  • src/main/runtime/rpc/methods/agent-launch-prompt-carry.test.ts
  • src/main/runtime/sidebar-inputs/workspace-activity-facts-producer.test.ts
  • src/main/runtime/terminal-tail-row-retention.test.ts
  • src/main/skills/skill-discovery-wsl-alias-sharing.test.ts
  • src/main/skills/skill-provider-runtime-roots.test.ts
  • src/main/source-control/repo-default-branch.test.ts
  • src/main/ssh/orcad-migration-terminal-gate.test.ts
  • src/main/updater/mac-install/mac-browser-sidecar-recovery.test.ts
  • src/main/window/foreground-activation-policy.test.ts
  • src/main/workspaces/creation/worktree-create-timing.test.ts
Files with no reviewable changes: 31
  • src/main/runtime/terminal-tail-row-retention.test.ts
  • src/main/workspaces/creation/worktree-create-timing.test.ts
  • src/main/runtime/orchestration/db/hot-path-statement-compilation.test.ts
  • src/main/ipc/workspace-cleanup/workspace-cleanup-document-lifetime.test.ts
  • src/main/claude/structured/claude-structured-dispatch-attachment-rejection.test.ts
  • src/main/native-chat/agent-session-journal/journal-submission-positions.spec.ts
  • src/main/claude/claude-background-stop-records.test.ts
  • src/main/hermes/hermes-config-flow-insertion.test.ts
  • src/main/browser/agent-browser/agent-browser-action-effects.test.ts
  • src/main/browser/routing/partitions/browser-route-partition-stability.test.ts
  • src/main/plugins/panels/plugin-frame-blocked-requests.test.ts
  • src/main/opencode2/status-plugin-setup-lifetime.test.ts
  • src/main/plugins/workers/plugin-worker-panel-requests.test.ts
  • src/main/browser/element-grab/browser-grab-payload.test.ts
  • src/main/antigravity/native-windows-token-decode.test.ts
  • src/main/runtime/restored-pane-hook-store-resume.test.ts
  • src/main/runtime/repo-worktree-admin-fingerprint.test.ts
  • src/main/browser/cdp/input/guest-focused-frame-route.test.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-incidental-writes.test.ts
  • src/main/pty/shell-startup/powershell-profile-env.test.ts
  • src/main/ai-vault/scanners/omp/omp-session-root.test.ts
  • src/main/git/runner-gh-account-binding.test.ts
  • src/main/plugins/installation/plugin-atomic-file-write.test.ts
  • src/main/ssh/orcad-migration-terminal-gate.test.ts
  • src/main/ipc/wsl/wsl-host-handlers-user-actions.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-registrations.test.ts
  • src/main/native-chat/agent-session-timeline/provider-timeline-assembler-turns.test.ts
  • config/scripts/ci-shard-timings.json
  • src/main/window/foreground-activation-policy.test.ts
  • src/main/omp/omp-session-cwd-lookup.test.ts
  • src/main/source-control/repo-default-branch.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 45b4fb3 into main Nov 4, 2026
50 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