Skip to content

test: remove 158 low-value test declarations - #38177

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

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

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Remove tests whose maintenance and CI cost outweigh their regression value.

Files Added Deleted Net
Test 47 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​18 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3566 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3548
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​17 $\color{#cf222e}{\Huge{\mathbf{−}}}$​38 $\color{#cf222e}{\Huge{\mathbf{−}}}$​21

What Changed

Remove 158 authored declarations from 60 reviewed renderer sources: ten whole suites, 37 partial suites, and 13 unchanged suites. Deleted cases chiefly repeat private predicates, static copy and catalogs, supplied mock values, implementation counters, and helper characterization.

Preserve 101 authored declarations protecting ownership, lifecycle races, reconnect behavior, resource cleanup, actual store selection, editor reconciliation, and mixed-version remote behavior. Retain the structured-session navigation table across all four consumers after a second value review.

Remove nine obsolete timing rows, retire one affected complete historical receipt into a verbatim archive, reconcile two reliability gates, and lower one wall-clock baseline count from two to one after deleting its test. No production behavior changes.

Why

Each source was reviewed with its decisive production owner. The audit records intentional coverage losses without claiming equivalent replacements. Whole-suite deletion is appropriate when all its cases have little regression value.

Linked Issue

Maintainer-directed test audit; no separate issue required under the repository's maintainer exception.

Visual Proof

N/A — tests and test metadata only; no production UI or interaction change.

Testing

  • All 31 final check:changed checks passed on Linux against the actual merged base.
  • All 50 retained test roots passed: 129 expanded cases, no skips.
  • Static review preserved surviving callbacks and wrapper context, found no surviving importers of deleted suites, and retained 19 affected support paths with 1,085 consumers.
  • Actual merged-base and candidate trees authenticated against the privately validated trees.

Tests/apps used background launch on an isolated display. Validation used byte-identical local dependency copies and isolated caches to avoid pnpm shared-store WASM URL restrictions. No manual macOS/Windows/SSH validation is claimed. The renderer sources and production code remain identical to the runtime-tested tree. Later changes lower the baseline count and inherit the separately validated queue-scale correction from the base; final checks passed afterward.

AI Disclosure

Internal maintainer-directed change.

Review

Self-reviewed and independently value-reviewed. Historical receipts and intentional losses remain explicitly archived; local runs do not promote reliability-gate claims.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material copied or translated.

Notes

Removal credit counts authored registrations once; expanded table rows receive no extra credit. Full PR CI must pass before merge.

Checklist

  • Focused on reviewed low-value tests and their inventories.
  • Change and rationale explained.
  • Visual proof marked N/A with reason.
  • Self-reviewed for correctness, security, and performance.
  • Cross-platform, remote, mobile, and mixed-version 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

The pull request removes or narrows tests across renderer application surfaces, editor and browser features, chat and AI vault features, runtime interactions, and state coordination. It adds a test for host-aware workspace reference refresh targets. It also decreases one flaky-test baseline count and removes CI timing entries for deleted test files.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title "test: remove 158 low-value test declarations" matches the main change. The PR removes 158 authored test declarations across 60 renderer sources, and the summary confirms the test-only remov…
Description check Passed The description follows the repository template and fills in most required sections. It gives an ELI5, a detailed What Changed, a Why, testing evidence, a risk-free statement for a test-only change, a…
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 158 low-value test declarations" matches the main change. The PR removes 158 authored test declarations across 60 renderer sources, and the summary confirms the test-only removals. It does not name the 101 retained declarations or the minor metadata edits (timing rows, baseline count), which is expected for a title.

Full details: Description check

Explanation

The description follows the repository template and fills in most required sections. It gives an ELI5, a detailed What Changed, a Why, testing evidence, a risk-free statement for a test-only change, and checklist items. Gaps: the Linked Issue section has no issue reference ("Fixes #" is blank), and the author states a maintainer exception applies. The Risk section has no Level value and no back-out guidance. The Visual Proof N/A reason is given. The AI Disclosure section is filled in. The Why section gives a short rationale but does not compare the approach to alternatives.

Resolution

Consider these additions for completeness: set the Risk Level (for example, Low, since only tests change), state how to back out (a plain revert restores the tests), and confirm the maintainer exception for the linked issue.

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

Warning

Review coverage is incomplete: 1 file could not be fully reviewed. Findings from completed review steps are included; see review info for details.

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/renderer/src/components/sidebar/workspace-card/review/workspace-reference-refresh-targets.test.ts: 1

88-88: Trivial · Functional Correctness · Quick win

Assert the selected target’s host.

When activeWorkspaceExecutionHostId is 'ssh:remote', the selected remote owner bypasses the local visibility filter. Assert that the sole selected target has the key for the 'ssh:remote' owner. This makes the test reject selection of the wrong owner.

src/renderer/src/app-shell/startup-window-parity.test.ts: 1

49-54: Trivial · Data Integrity & Integration · Quick win

Restore the all-profile startup parity check for persisted sessions.

The remaining tests in this file cover only two profiles. A Loader or Serializer change that drops a stored tab or changes the active terminal in another profile does not fail here. Restore the parameterized comparison. It checks that each stored workspace stays visible and that view differences match the recorded known and accepted ledger.

The patch replaces the existing fixture import. Do not keep the old GIT, sweptAtStartup line beside a new import from the same module, because duplicate bindings fail to parse.

Suggested fix
-import { GIT, sweptAtStartup } from './startup-window-parity-differences.test-fixture'
+import {
+  ACCEPTED_DIFFERENCES,
+  GIT,
+  KNOWN_DIFFERENCES,
+  sweptAtStartup
+} from './startup-window-parity-differences.test-fixture'
 import {
   bootWindowFromPartitions,
+  diffStartupWindowViews,
   projectStartupWindowView
 } from './startup-window-view.test-fixture'
 
 const PROFILES = [...WORKSPACE_LAYOUT_PROFILES, ...LEGACY_WORKSPACE_LAYOUT_PROFILES]
 
 describe('the window shows the same session before and after the shared Loader rewrites it', () => {
+  it.each(PROFILES.map((profile) => [profile.name, profile] as const))(
+    '%s',
+    async (name, { hostId, build }) => {
+      const stored = build()
+      const storedView = projectStartupWindowView(
+        await bootWindowFromPartitions(createTestStore(), [{ hostId, session: stored }])
+      )
+      const normalizedView = projectStartupWindowView(
+        await bootWindowFromPartitions(createTestStore(), [
+          { hostId, session: normalize(hostId, stored) }
+        ])
+      )
+      for (const [key, rows] of Object.entries(stored.tabsByWorktree)) {
+        if (rows.length > 0) {
+          expect(storedView, key).toHaveProperty([`${key} group 0 tabs`])
+        }
+      }
+      const differences = diffStartupWindowViews(storedView, normalizedView)
+      const known = KNOWN_DIFFERENCES.filter((entry) => entry.fixture === name)
+      const accepted = ACCEPTED_DIFFERENCES.filter((entry) => entry.fixture === name)
+      expect(
+        differences.map((difference) => difference.path).sort(),
+        `window differences (stored vs normalized):\n${JSON.stringify(differences, null, 2)}`
+      ).toEqual(
+        [
+          ...known.flatMap((entry) => entry.paths),
+          ...accepted.flatMap((entry) => Object.keys(entry.values))
+        ].sort()
+      )
+      const acceptedValues = Object.assign({}, ...accepted.map((entry) => entry.values))
+      expect(
+        Object.fromEntries(
+          differences
+            .filter((difference) => difference.path in acceptedValues)
+            .map(({ path, stored, normalized }) => [path, { stored, normalized }])
+        )
+      ).toEqual(acceptedValues)
+    }
+  )
+
   it('keeps the tab-bar twin selected when a selected legacy copy is dropped', async () => {
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: b9aa4c1c-d61e-42a9-b29e-c3a76114350d
Commits

Reviewing files that changed from the base of the PR and between 2270f75 and 1d1ec8a.

Files selected for processing: 50
  • config/flaky-test-pattern-baseline.txt
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/app-shell/app-command-handlers-tab-rename.test.ts
  • src/renderer/src/app-shell/startup-window-parity.test.ts
  • src/renderer/src/components/NewWorkspaceComposerCard.set-location.test.tsx
  • src/renderer/src/components/activity/activity-clear-completed-hmr.test.ts
  • src/renderer/src/components/dashboard-popout/dashboard-agent-status-patch.test.ts
  • src/renderer/src/components/dashboard/useRetainedAgentsSync.test.ts
  • src/renderer/src/components/editor/DiagramViewerModal.test.tsx
  • src/renderer/src/components/editor/rich-markdown/lists/rich-markdown-ordered-task-children.test.ts
  • src/renderer/src/components/editor/rich-markdown/review/rich-markdown-review-rail-blocks.test.ts
  • src/renderer/src/components/editor/rich-markdown/schema/rich-markdown-large-html.test.ts
  • src/renderer/src/components/editor/rich-markdown/search/rich-markdown-search-focus.test.ts
  • src/renderer/src/components/emulator-pane/emulator-screen-gesture.test.ts
  • src/renderer/src/components/github/github-work-item-issue-target.test.ts
  • src/renderer/src/components/linear-project-view-surfaces.test.tsx
  • src/renderer/src/components/native-chat-resume-failed-chat-watch.test.ts
  • src/renderer/src/components/native-chat-resume-on-restart-outcome-toast.test.ts
  • src/renderer/src/components/native-chat/NativeChatCodeBlock.test.tsx
  • src/renderer/src/components/native-chat/NativeChatPaneHeader.test.tsx
  • src/renderer/src/components/native-chat/NativeChatUsageLimitAutoContinue.test.tsx
  • src/renderer/src/components/right-sidebar/ai-vault/scanning/ai-vault-scan-issue-state.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault/session-actions/ai-vault-session-resume-in-chat.test.ts
  • src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-linked-watch.test.ts
  • src/renderer/src/components/settings/browser/BrowserPane.search-catalog.test.tsx
  • src/renderer/src/components/settings/source-control/text-actions/source-control-text-action-repo-discovery.test.tsx
  • src/renderer/src/components/sidebar/project-admission/drop/sidebar-project-drop.test.ts
  • src/renderer/src/components/sidebar/workspace-actions/context-menu/workspace-lineage-menu-actions.test.ts
  • src/renderer/src/components/sidebar/workspace-board/viewport/WorkspaceKanbanLaneGrid.test.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/workspace-reference-refresh-targets.test.ts
  • src/renderer/src/components/sidebar/workspace-card/surface/WorktreeCard.single-reference-details.test.tsx
  • src/renderer/src/components/sidebar/workspace-card/template/card-template-compiler.test.tsx
  • src/renderer/src/components/sidebar/worktree-list/grouping/default-branch-visible-under-hide-sleeping.test.ts
  • src/renderer/src/components/task-page/jira/Content.board-owner.test.tsx
  • src/renderer/src/components/terminal-pane/remote-runtime-recovery-input-hold.test.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-surface-ownership.test.ts
  • src/renderer/src/hooks/agent-hook-completion-store-sync.test.ts
  • src/renderer/src/hooks/useReadOnScreenAttention.mixed-workspace.test.ts
  • src/renderer/src/hooks/zoom-routing.test.ts
  • src/renderer/src/lib/activate-ai-vault-structured-session-reveal.test.ts
  • src/renderer/src/lib/doc-preview-grants.test.ts
  • src/renderer/src/lib/ime-composition-keyboard-event.test.ts
  • src/renderer/src/lib/open-mobile-emulator-tab.test.ts
  • src/renderer/src/lib/pane-manager/pane-fit-resize-observer.test.ts
  • src/renderer/src/lib/pane-manager/terminal-scroll-intent-input-resync.test.ts
  • src/renderer/src/store/slices/agent-hibernation-live-anchor-e2e.test.ts
  • src/renderer/src/store/slices/browser-annotation-retention.test.ts
  • src/renderer/src/store/slices/editor/buffers/editor-buffer-reconcile-identity.test.ts
  • src/renderer/src/store/slices/removed-worktree-diff-memory.test.ts
Files with no reviewable changes: 35
  • src/renderer/src/hooks/agent-hook-completion-store-sync.test.ts
  • src/renderer/src/components/native-chat-resume-on-restart-outcome-toast.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault/scanning/ai-vault-scan-issue-state.test.ts
  • src/renderer/src/hooks/zoom-routing.test.ts
  • src/renderer/src/components/dashboard/useRetainedAgentsSync.test.ts
  • src/renderer/src/components/editor/rich-markdown/review/rich-markdown-review-rail-blocks.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault/session-actions/ai-vault-session-resume-in-chat.test.ts
  • src/renderer/src/components/linear-project-view-surfaces.test.tsx
  • src/renderer/src/components/settings/source-control/text-actions/source-control-text-action-repo-discovery.test.tsx
  • src/renderer/src/components/settings/browser/BrowserPane.search-catalog.test.tsx
  • src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-linked-watch.test.ts
  • src/renderer/src/components/github/github-work-item-issue-target.test.ts
  • src/renderer/src/store/slices/agent-hibernation-live-anchor-e2e.test.ts
  • src/renderer/src/components/NewWorkspaceComposerCard.set-location.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-pane-surface-ownership.test.ts
  • src/renderer/src/lib/open-mobile-emulator-tab.test.ts
  • src/renderer/src/components/task-page/jira/Content.board-owner.test.tsx
  • src/renderer/src/store/slices/browser-annotation-retention.test.ts
  • src/renderer/src/components/native-chat/NativeChatUsageLimitAutoContinue.test.tsx
  • src/renderer/src/lib/ime-composition-keyboard-event.test.ts
  • src/renderer/src/components/sidebar/workspace-card/template/card-template-compiler.test.tsx
  • src/renderer/src/components/editor/rich-markdown/search/rich-markdown-search-focus.test.ts
  • src/renderer/src/store/slices/removed-worktree-diff-memory.test.ts
  • src/renderer/src/components/native-chat-resume-failed-chat-watch.test.ts
  • src/renderer/src/components/activity/activity-clear-completed-hmr.test.ts
  • src/renderer/src/components/editor/DiagramViewerModal.test.tsx
  • src/renderer/src/lib/pane-manager/terminal-scroll-intent-input-resync.test.ts
  • src/renderer/src/lib/activate-ai-vault-structured-session-reveal.test.ts
  • src/renderer/src/components/editor/rich-markdown/lists/rich-markdown-ordered-task-children.test.ts
  • src/renderer/src/components/dashboard-popout/dashboard-agent-status-patch.test.ts
  • src/renderer/src/lib/doc-preview-grants.test.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-recovery-input-hold.test.ts
  • src/renderer/src/components/emulator-pane/emulator-screen-gesture.test.ts
  • src/renderer/src/app-shell/app-command-handlers-tab-rename.test.ts
  • config/scripts/ci-shard-timings.json
Files not fully reviewed because their changes were unavailable: 1
  • config/reliability-gates.jsonc

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 e15bd08 into main Nov 4, 2026
41 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