Skip to content

test: remove 211 low-value renderer store tests - #37613

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

OrcaWin merged 1 commit into
mainfrom
codex/remove-low-value-renderer-store-tests-9

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 35 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​19 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6737 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6718
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​13 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7

ELI5

Remove 211 low-value tests, including nine whole suites. Keep 105 registrations covering failure recovery, lifecycle interleavings, ownership refusal and hydration consumers.

What Changed

Delete scalar, map/reference, forwarding, fixture-result and mock-call checks across renderer settings, SSH cleanup, tab creation, hydration, sleep, tab-view and worktree-removal stores. Remove nine obsolete timing entries and narrow current reliability-gate assertions with specific loss notes. Preserve historical execution evidence.

Why

These tests mostly repeat implementation details or inspect immediate canned results. Whole suites are removed when none of their registrations justify ongoing maintenance. Exact narrow alarms are deliberately retired; retained tests are not claimed as equivalent replacements.

Linked Issue

Maintainer-requested comprehensive test-value audit; no separate issue.

Visual Proof

N/A — tests and metadata only; no UI changes.

Testing

  • Manual local testing (local project execution intentionally omitted).
  • Removed 211 authored registrations, retained 105; parameterized registrations count once.
  • External parsing/formatting and retained registration/callback/scope verification passed.
  • Inert lint passed for changed surviving suites.
  • Metadata references reviewed; historical commands, counts and results preserved.
  • Current-head GitHub CI required before merge, including all 12 full unit shards and applicable workflows.

AI Disclosure

Prepared with Codex.

Review

Root read all 40 original sources and every per-case advisory reason, then independently selected the removals. Named owner reads remain individually attributed. Retained bodies and setup scopes remain unchanged. Kept destructive-stop failures and rollback, synchronous publication races, host collisions, mixed-version refusal, unsaved drafts and actual browser hydration consumers. Source and owner pins are reconciled against the verified preceding squash before publication.

Agent skill upstream boundary

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

Risk

Level: Low

Removed alarms include direct Windows terminal-creation arguments, host-routing projections, retention/ack map cleanup, activity suppression counters, reconnection hints and settings/SSH state projections, wrapped-removal error tables, tab property forwarding, old SSH repo filtering and tab-group order repair. Specific losses are documented in the audit and affected reliability gate. Cross-platform, independent client/server versions, remote/SSH, mobile and folder workspaces were considered; no new live-provider evidence is claimed. Rollback: revert this test-only commit.

Checklist

  • Batched related cleanup to reduce CI cycles.
  • Explained scope, rationale, validation and losses.
  • Visual proof N/A with reason.
  • Self-reviewed.
  • Cross-platform, remote/SSH and folder-workspace impact considered.
  • Applicable current-head CI checks pass; no local project tests, builds or typechecks run.

@OrcaWin
OrcaWin marked this pull request as ready for review November 3, 2026 01:56
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The pull request removes or revises tests across settings, SSH, worktree, tab, session, and sleep behavior. It adds settings-catalog refresh tests and pane-hibernation tests, and changes a tab-ID collision test to cover collisions across worktrees. Reliability-gate notes document coverage gaps, and the unit-test timing manifest removes six test records. No implementation code changes are reported.

Merge Risk: Low · up to 96355

Mirror persistence remains tested, but the exact file-identity check has been lost. The change is mergeable with a focused assertion follow-up.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: removing 211 low-value renderer store tests.
Description check Passed The description is mostly complete. It explains the scope, rationale, retained coverage, validation, risk, visual-proof status, AI use, and rollback plan. It also explains why no separate issue is lin…
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: Description check

Explanation

The description is mostly complete. It explains the scope, rationale, retained coverage, validation, risk, visual-proof status, AI use, and rollback plan. It also explains why no separate issue is linked and why no UI proof applies.

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 10 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

Some tools did not complete. Review the errors below.

ast-grep (0.51.1)

ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/swift/security/insecure-tls-trust-all-certs-swift.yml

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: 1
src/renderer/src/store/slices/server-editor-file-restart-identity.test.ts: 1

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

Strengthen the retained mirror persistence assertion and remove the unused import.

The retained mirrored-editor-tab-persistence.test.ts already covers the live mirror-resolution, serialization, and hydration path. It only checks that the hydrated ID is not the bare path, so a change to an incorrect non-bare ID could pass. Assert the canonical ID before and after hydration, then remove the side-effect import from server-editor-file-restart-identity.test.ts.

Suggested fix
+import { buildOwnedEditorFileId } from '../../store/slices/editor/file-ids/editor-file-ids'
...
   const state = makeState()
   const applied = { ...state, ...applyWebSessionTabsSnapshot(state, snapshot, ENV, NOW) }
+  const expectedFileId = buildOwnedEditorFileId('/repo/app.ts', WT, ENV)
+  expect(applied.openFiles[0]?.id).toBe(expectedFileId)
   const persisted = buildEditorSessionData(applied.openFiles, {}, {}, {}, {})
...
   expect(restored.getState().openFiles).toHaveLength(1)
-  expect(restored.getState().openFiles[0]?.id).not.toBe('/repo/app.ts')
+  expect(restored.getState().openFiles[0]?.id).toBe(expectedFileId)
-import '../../runtime/web-session-tabs-sync/mirrored-editor-file-identity'
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: 0d2f972e-cb27-4e1f-9461-3d1e9b162ee7
Commits

Reviewing files that changed from the base of the PR and between 7983d50 and 96355c2.

Files selected for processing: 37
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/store/slices/server-editor-file-restart-identity.test.ts
  • src/renderer/src/store/slices/set-runtime-environments-purge-wiring.test.ts
  • src/renderer/src/store/slices/settings-search-state.test.ts
  • src/renderer/src/store/slices/settings.test.ts
  • src/renderer/src/store/slices/sparse-presets.test.ts
  • src/renderer/src/store/slices/ssh-target-cleanup.test.ts
  • src/renderer/src/store/slices/ssh.test.ts
  • src/renderer/src/store/slices/store-active-worktree-removal-successor.test.ts
  • src/renderer/src/store/slices/store-active-worktree-selection.test.ts
  • src/renderer/src/store/slices/store-active-worktree-split-groups.test.ts
  • src/renderer/src/store/slices/store-active-worktree-tab-close.test.ts
  • src/renderer/src/store/slices/store-active-worktree-terminal-creation.test.ts
  • src/renderer/src/store/slices/store-create-tab-first-pane-layout.test.ts
  • src/renderer/src/store/slices/store-create-tab-id-hint.test.ts
  • src/renderer/src/store/slices/store-create-tab-layout-owner.test.ts
  • src/renderer/src/store/slices/store-create-tab-start-in-main.test.ts
  • src/renderer/src/store/slices/store-open-to-side-layout-owner.test.ts
  • src/renderer/src/store/slices/store-session-browser-hydration.test.ts
  • src/renderer/src/store/slices/store-session-cascades.test.ts
  • src/renderer/src/store/slices/store-session-editor-hydration.test.ts
  • src/renderer/src/store/slices/store-session-terminal-activity.test.ts
  • src/renderer/src/store/slices/store-session-terminal-reconnect.test.ts
  • src/renderer/src/store/slices/store-session-workspace-hydration.test.ts
  • src/renderer/src/store/slices/store-sleep-agent-status-retention.test.ts
  • src/renderer/src/store/slices/store-sleep-exact-runtime-stop.test.ts
  • src/renderer/src/store/slices/store-sleep-layout-owner.test.ts
  • src/renderer/src/store/slices/store-sleep-pane-hibernation.test.ts
  • src/renderer/src/store/slices/store-sleep-runtime-convergence.test.ts
  • src/renderer/src/store/slices/store-sleep-twin-host-owner.test.ts
  • src/renderer/src/store/slices/store-terminal-tab-changes-layout-owner.test.ts
  • src/renderer/src/store/slices/store-worktree-removal-cascade.test.ts
  • src/renderer/src/store/slices/structured-chat-slept-at.test.ts
  • src/renderer/src/store/slices/superseded-ssh-repo-rows.test.ts
  • src/renderer/src/store/slices/tab-group-reference-repair.test.ts
  • src/renderer/src/store/slices/tab-view-mode.test.ts
Files with no reviewable changes: 26
  • src/renderer/src/store/slices/settings-search-state.test.ts
  • src/renderer/src/store/slices/structured-chat-slept-at.test.ts
  • src/renderer/src/store/slices/ssh-target-cleanup.test.ts
  • src/renderer/src/store/slices/superseded-ssh-repo-rows.test.ts
  • src/renderer/src/store/slices/tab-group-reference-repair.test.ts
  • src/renderer/src/store/slices/store-create-tab-first-pane-layout.test.ts
  • src/renderer/src/store/slices/store-session-cascades.test.ts
  • src/renderer/src/store/slices/set-runtime-environments-purge-wiring.test.ts
  • src/renderer/src/store/slices/store-create-tab-start-in-main.test.ts
  • src/renderer/src/store/slices/store-create-tab-id-hint.test.ts
  • src/renderer/src/store/slices/tab-view-mode.test.ts
  • src/renderer/src/store/slices/store-sleep-layout-owner.test.ts
  • src/renderer/src/store/slices/store-active-worktree-removal-successor.test.ts
  • src/renderer/src/store/slices/store-session-terminal-activity.test.ts
  • src/renderer/src/store/slices/ssh.test.ts
  • src/renderer/src/store/slices/store-create-tab-layout-owner.test.ts
  • src/renderer/src/store/slices/store-active-worktree-terminal-creation.test.ts
  • src/renderer/src/store/slices/store-session-editor-hydration.test.ts
  • src/renderer/src/store/slices/store-active-worktree-tab-close.test.ts
  • src/renderer/src/store/slices/sparse-presets.test.ts
  • src/renderer/src/store/slices/store-session-terminal-reconnect.test.ts
  • src/renderer/src/store/slices/store-sleep-twin-host-owner.test.ts
  • src/renderer/src/store/slices/store-sleep-agent-status-retention.test.ts
  • src/renderer/src/store/slices/store-sleep-pane-hibernation.test.ts
  • src/renderer/src/store/slices/settings.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; 7 remain after this review.

@OrcaWin
OrcaWin merged commit dbd0c24 into main Nov 3, 2026
98 of 100 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