Skip to content

test: remove 170 low-value renderer tests - #37539

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

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

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 27 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​11 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3478 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3467
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4 $\color{#cf222e}{\Huge{\mathbf{−}}}$​31 $\color{#cf222e}{\Huge{\mathbf{−}}}$​27

ELI5

Removes 170 low-value test registrations, including 18 whole suites, from 30 reviewed renderer files. Retains 47 registrations with unchanged callbacks and scopes.

What Changed

Deletes supplied work-item, attachment, close-plan, directory, editor-target, emoji, file-open/drag-source, port-scan/group/publish, editor-draft, folder-twin, host-split and hydration-key examples. Trims eight other suites. Removes dead fixtures, an unused test-only catalog probe, stale comments and 18 timing entries; narrows reliability claims to the remaining assertions.

Why

The removed tests mostly compare supplied rows, strings, ownership/capability answers, canned RPC results or split/merge projections. Whole suites are removed when none of their checks justify retention.

Linked Issue

N/A — maintainer-requested audit; no pre-existing issue supplied.

Visual Proof

N/A — test removal and bookkeeping; no UI behavior change.

Testing

  • Manually tested locally
  • Automated-test changes explained above

External parsing/formatting, inert lint, retained registration/callback/scope and runtime import comparisons passed. All 30 original sources, 89 captured dependency snapshots and the 31-path patch were revalidated against the verified #37537 squash. Static checks confirm only comments changed outside the removed test-only probe in supporting TypeScript files. No local project tests, builds or typechecks were run. Full current-head CI is required before merge.

Risk

Level: Low production-change risk; reduced regression detection is intentional. Accept loss of the removed exact selection, path/URL/caret/emoji, capability/no-fallback, draft-field, partition mapping/roundtrip and hydration-key examples. In particular, deleting the mocked host-kill suite loses its one-call/no-server-local-fallback alarm. The immediately resolved flush-order test did not establish a pending-write barrier. No equivalent coverage is claimed. Revert this PR to restore these checks.

Review

Root read every original test body and relevant owners. Retains mounted worker cleanup, actual activation/focus scheduling, delayed browser-create/snapshot composition, false/rejected create settlement, current-address enumeration bounds, path normalization/early-rejection work bounds, disappeared-host state pruning, measured serialized history bytes, addressed host/shadow write composition and patch failure propagation. Session APIs and browser transport remain mocked/in-memory; these tests do not establish file durability, main validation, real cross-host delivery or restart recovery.

Agent skill upstream boundary

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

Notes

Cross-platform, local/remote, mobile and folder-workspace behavior is unchanged. The catalog-built probe was used only by the deleted lazy test; product loader/catalog statements are unchanged. Historical reliability evidence remains recorded, with current assertion claims narrowed.

Checklist

  • Focused test-removal batch
  • What changed and why explained
  • Risks and revert path recorded
  • Visual proof N/A with reason
  • Self-reviewed for correctness, security and performance
  • Cross-platform and remote impact considered
  • CI covers project checks; local execution not performed

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The change removes or narrows tests across workspace routing, session persistence, browser behavior, file handling, emoji, work-item, and port features. It updates reliability-gate notes and CI timing records. It also removes a test-only exported emoji-catalog probe. No production implementation changes are described.

Merge Risk: Low · up to b5e6a

Production behavior is unchanged, but this change removes checks for session-write ordering and safe host-kill fallback. Restore those checks before merge if that regression risk is not acceptable.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: removing 170 low-value renderer tests.
Description check Passed The description covers the required sections, explains the change and rationale, documents testing limits, identifies risks, provides a revert path, and completes the checklist. It also explains why v…
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 covers the required sections, explains the change and rationale, documents testing limits, identifies risks, provides a revert path, and completes the checklist. It also explains why visual proof is not applicable.

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 6 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/renderer/src/lib/workspace-doc-address-input.test.ts: 1

62-70: Trivial · Maintainability & Code Quality · Quick win

Assert the current-workspace target.

The current-workspace test checks only status. Its mocked preview plan returns doc-preview for every worktree, so the test can pass if the resolver sends the address to the wrong worktree. Assert the returned docLocation as the folder-workspace test does.

Suggested fix
-    expect(
-      resolveWorkspaceDocAddressTarget(state, CURRENT, '/home/alice/wt1/docs/index.html').status
-    ).toBe('workspace-doc')
+    expect(
+      resolveWorkspaceDocAddressTarget(state, CURRENT, '/home/alice/wt1/docs/index.html')
+    ).toMatchObject({
+      status: 'workspace-doc',
+      docLocation: {
+        kind: 'workspace-doc',
+        worktreeId: CURRENT,
+        filePath: '/home/alice/wt1/docs/index.html'
+      }
+    })
src/renderer/src/lib/workspace-session-host-persistence.test.ts: 1

378-380: Trivial · Data Integrity & Integration · Quick win

Retain a regression check for the durable flush boundary.

The contention tests still cover local and runtime host writes, but they do not observe flush. Restore the deleted assertion that the host-write calls precede the flush call:

+expect(set.mock.invocationCallOrder.at(-1)).toBeLessThan(flush.mock.invocationCallOrder[0]!)

This preserves coverage for a future flush-before-write regression without asserting that production currently flushes early.


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: 824df0cf-7b6d-4305-aa6f-0f9600c68350
Commits

Reviewing files that changed from the base of the PR and between 66a0f1d and b5e6a11.

Files selected for processing: 31
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • src/main/runtime/folder-workspace-mixed-host-routing.test.ts
  • src/renderer/src/lib/work-item-lookup-text.test.ts
  • src/renderer/src/lib/work-item-repo-row.test.ts
  • src/renderer/src/lib/workspace-activation-path-gate.test.ts
  • src/renderer/src/lib/workspace-activation-terminal-focus.test.ts
  • src/renderer/src/lib/workspace-attachment-observed-origin.test.ts
  • src/renderer/src/lib/workspace-browser-tab-close.test.ts
  • src/renderer/src/lib/workspace-browser-tab-open.test.ts
  • src/renderer/src/lib/workspace-directory.test.ts
  • src/renderer/src/lib/workspace-doc-address-input.test.ts
  • src/renderer/src/lib/workspace-editor-ssh-target.test.ts
  • src/renderer/src/lib/workspace-emoji-picker-defaults.test.ts
  • src/renderer/src/lib/workspace-emoji-picker-defaults.ts
  • src/renderer/src/lib/workspace-emoji-shortcodes.lazy.test.ts
  • src/renderer/src/lib/workspace-emoji-shortcodes.test.ts
  • src/renderer/src/lib/workspace-file-browser-open-target.test.ts
  • src/renderer/src/lib/workspace-file-drag-source-runtime.test.ts
  • src/renderer/src/lib/workspace-file-drag.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-groups.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-host-scoped-scan.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-scan-debounce.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-scan-publish.test.ts
  • src/renderer/src/lib/workspace-session-editor-drafts.test.ts
  • src/renderer/src/lib/workspace-session-folder-host-twin.test.ts
  • src/renderer/src/lib/workspace-session-host-contention.test.ts
  • src/renderer/src/lib/workspace-session-host-persistence.test.ts
  • src/renderer/src/lib/workspace-session-host-split.test.ts
  • src/renderer/src/lib/workspace-session-hydration-keys.test.ts
  • src/shared/emoji-shortcode-catalog.ts
Files with no reviewable changes: 24
  • src/renderer/src/lib/workspace-emoji-shortcodes.lazy.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-groups.test.ts
  • src/renderer/src/lib/workspace-session-editor-drafts.test.ts
  • src/renderer/src/lib/workspace-directory.test.ts
  • src/renderer/src/lib/workspace-file-browser-open-target.test.ts
  • src/renderer/src/lib/work-item-repo-row.test.ts
  • src/renderer/src/lib/workspace-session-host-split.test.ts
  • src/renderer/src/lib/workspace-attachment-observed-origin.test.ts
  • src/shared/emoji-shortcode-catalog.ts
  • src/main/runtime/folder-workspace-mixed-host-routing.test.ts
  • src/renderer/src/lib/workspace-browser-tab-close.test.ts
  • src/renderer/src/lib/workspace-activation-terminal-focus.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-host-scoped-scan.test.ts
  • src/renderer/src/lib/workspace-session-folder-host-twin.test.ts
  • src/renderer/src/lib/workspace-file-drag-source-runtime.test.ts
  • src/renderer/src/lib/workspace-session-hydration-keys.test.ts
  • src/renderer/src/lib/workspace-editor-ssh-target.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-scan-publish.test.ts
  • src/renderer/src/lib/work-item-lookup-text.test.ts
  • src/renderer/src/lib/workspace-emoji-shortcodes.test.ts
  • src/renderer/src/lib/workspace-ports/workspace-port-scan-debounce.test.ts
  • src/renderer/src/lib/workspace-doc-address-input.test.ts
  • src/renderer/src/lib/workspace-emoji-picker-defaults.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; 6 remain after this review.

@OrcaWin OrcaWin mentioned this pull request Nov 2, 2026
8 of 9 tasks
@OrcaWin
OrcaWin merged commit f77a2a5 into main Nov 2, 2026
55 of 56 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