Skip to content

test: remove 46 low-value client and benchmark tests - #37818

Merged
OrcaWin merged 4 commits into
mainfrom
codex/remove-low-value-behavior-ui-tests-16
Nov 3, 2026
Merged

OrcaWin merged 4 commits into
mainfrom
codex/remove-low-value-behavior-ui-tests-16

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​9 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1519 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1510
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​16 $\color{#cf222e}{\Huge{\mathbf{−}}}$​38 $\color{#cf222e}{\Huge{\mathbf{−}}}$​22

Removes 46 low-value authored test registrations after reviewing 154 source files, including nine whole suites. The deleted suites cover mocked guest paintability, settings control wiring, a synthetic clipboard thumbnail, routing receipt samples, and benchmark parser/report/artifact helpers. Other removals repeat supplied launch payloads, mock calls, DOM inventories or a retained lifecycle journey. This deliberately drops their direct alarms; the reliability manifest records the resulting coverage gaps.

Retains 293 authored registrations with stronger behavioral, resource, persistence, delivery and compatibility checks. The parity and latency benchmarks and their helpers remain. Updates active gate references and timing entries while preserving historical executed commands, results and counts. Counts describe authored registrations before parameter expansion.

CI also exposed a cold-import deadline in the existing onboarding cancellation fixture. Its lazy launch graph now loads in beforeAll, before fake timers and the one-second host-preferences observation window. Both cancellation cases and all their original assertions remain. No production code or new tests.

Validation: all retained registration ASTs match, full surviving-source replay passes with explicit dead-fixture/import cleanup, formatting and correctness lint pass, and the reliability manifest validates all 154 gates against the committed tree. Renderer typechecking and affected unit tests run locally; full applicable PR CI is required before merge.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The pull request removes tests for remote terminal and viewer behavior, agent launch, native chat, issue-view persistence, macOS startup, markdown toggles, navigation, proxy settings, notifications, and image clipboard behavior. It changes setup imports in agent-launch test files and asynchronous setup in the onboarding cancellation test. It also updates reliability-gate coverage notes, removes timing records for deleted tests, and reduces one flaky-test baseline count.

Merge Risk: Low · up to 957a9

The PR is broadly mergeable, but its reliability records and focused floating-chat coverage should be corrected or followed up.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description uses the repository's general shape but does not fill most of the required template. It has no ELI5, no plain-language What Changed section, and no Visual Proof entry. The Linked Issue… Add the missing template sections and information:
1. ELI5: a short plain-language summary with no jargon.
2. What Changed: the before and after as a user or maintainer experiences them, and the mechanism changed.
3. Why: the reason for rem…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the primary change: removing 46 low-value client and benchmark tests.
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 5 files. (2 skipped: 2 unsupported.)

Full details: Description check

Explanation

The description uses the repository's general shape but does not fill most of the required template. It has no ELI5, no plain-language What Changed section, and no Visual Proof entry. The Linked Issue section has no issue reference ("Fixes #" is blank). The Testing checklist boxes are unchecked, and the Risk section has no Level and no revert or back-out plan. The Review, Agent skill upstream boundary, Notes, and Checklist sections are absent. The description does explain the scope: 46 test registrations removed, the reasons, the retained coverage, the onboarding fixture change, and the validation run. The scope is test removal with no production behavior change. The description therefore covers the core intent but leaves required template sections incomplete.

Resolution

Add the missing template sections and information:

  1. ELI5: a short plain-language summary with no jargon.
  2. What Changed: the before and after as a user or maintainer experiences them, and the mechanism changed.
  3. Why: the reason for removing these tests, and why removal is preferred over alternatives such as rewriting or keeping them.
  4. Linked Issue: an actual issue reference in the form "Fixes #<number>". Confirm whether the author is a maintainer. If the author is an outside contributor, link a real issue.
  5. Visual Proof: write exactly "N/A" and a short reason, because this change has no UI or interaction change.
  6. Testing: state the platforms actually tested, and check the boxes that apply. Describe the steps a reviewer can follow to reproduce the validation.
  7. Risk: state the riskiest part of the change. Name what could break and for whom. Include the coverage gaps for the removed tests, state the Level (Low, Medium, or High), and describe the back-out plan. A plain revert restores the tests. State what a revert does not undo, such as the updated timing entries and gate references in the reliability manifest.
  8. AI Disclosure: state the AI model used, or state that none was used.
  9. Review and Agent skill upstream boundary: complete the boundary checkbox.
  10. Notes: confirm the security, cross-platform, remote SSH, mobile, backwards compatibility, and performance review.
  11. Checklist: complete each item, or explain why an item does not apply.
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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
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: ae926f51-a6be-4987-b0bb-6c0f9565b9bb
Commits

Reviewing files that changed from the base of the PR and between 16d7681 and 957a99e.

Files selected for processing: 15
  • config/flaky-test-pattern-baseline.txt
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/lib/onboarding-folder-cancellation.test.ts
  • tests/e2e/native-chat-image-runtime-context.unit.test.ts
  • tests/e2e/native-chat-ssh-delivery.unit.test.ts
  • tests/e2e/network-proxy-bypass-rules.spec.ts
  • tests/e2e/notification-settings.spec.ts
  • tests/e2e/omp-image-clipboard.spec.ts
  • tests/e2e/paced-terminal-typing.unit.test.ts
  • tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts
  • tests/e2e/structured-native-chat-routing-authority.unit.test.ts
  • tests/e2e/terminal-layout-parity-snapshot.unit.test.ts
  • tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts
  • tests/e2e/terminal-split-activation-latency-report.unit.test.ts
Files with no reviewable changes: 11
  • tests/e2e/notification-settings.spec.ts
  • tests/e2e/paced-terminal-typing.unit.test.ts
  • tests/e2e/structured-native-chat-routing-authority.unit.test.ts
  • tests/e2e/terminal-layout-parity-snapshot.unit.test.ts
  • tests/e2e/native-chat-ssh-delivery.unit.test.ts
  • tests/e2e/terminal-split-activation-latency-report.unit.test.ts
  • tests/e2e/terminal-split-activation-latency-artifact.unit.test.ts
  • tests/e2e/omp-image-clipboard.spec.ts
  • tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.ts
  • config/scripts/ci-shard-timings.json
  • tests/e2e/network-proxy-bypass-rules.spec.ts

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 changed the title test: remove 16 low-value behavior and UI tests test: remove 46 low-value client and benchmark tests Nov 3, 2026
@OrcaWin
OrcaWin force-pushed the codex/remove-low-value-behavior-ui-tests-16 branch from cc39921 to b1d5f77 Compare November 3, 2026 13:34
@@ -189,7 +189,7 @@ it.each(['same-host', 'purged'] as const)(
dispatch.mock.calls.filter(([request]) => request.method === 'session.tabs.createTerminal')
if (mode === 'same-host') {
expect(store.getState().activeWorktreeId).toBe(folder.id)
expect(creates()).toHaveLength(1)
await vi.waitFor(() => expect(creates()).toHaveLength(1))

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.

Major · Stability & Availability · Quick win

Supported by static analysis

Script executed:

rg -n 'waitFor|creates\(|useFakeTimers|vi.mock|ForTests|same-host' src/renderer/src/lib/onboarding-folder-cancellation.test.ts
sed -n '1,260p' src/renderer/src/lib/onboarding-folder-cancellation.test.ts
rg -n 'gateAndReseedEmptyWorkspace|waitForWorktreeAgentActivationGateForTests|activateAndRevealWorktree' src/renderer/src/lib/worktree-activation.ts
git log --oneline -5 -- src/renderer/src/lib/onboarding-folder-cancellation.test.ts

Repository: stablyai/orca

Length of output: 10401


Script executed:

set -o pipefail
printf '%s\n' '--- gate implementation and helper references ---'
rg -n -F --glob '*.ts' -e 'gateAndReseedEmptyWorkspace' -e 'waitForWorktreeAgentActivationGateForTests' -e 'setWorktreeAgentActivationGate' src/renderer/src/lib src/renderer/src | head -200
printf '%s\n' '--- gated implementation ---'
gate_file=$(rg -l -F --glob '*.ts' 'export function gateAndReseedEmptyWorkspace' src/renderer/src)
printf 'FILE=%s\n' "$gate_file"
sed -n '1,280p' "$gate_file"
printf '%s\n' '--- activation caller ---'
sed -n '110,275p' src/renderer/src/lib/worktree-activation.ts
printf '%s\n' '--- exact revision comparison ---'
for rev in 259ababdb4fcc8f9336fa97185feed2cf584b17e 16d76816a4bc7df3d940e0d1ba2ec08449c69c96; do
  printf '\nREVISION %s\n' "$rev"
  git cat-file -e "$rev^{commit}" && git show "$rev:src/renderer/src/lib/onboarding-folder-cancellation.test.ts" | nl -ba | sed -n '150,225p'
done
printf '%s\n' '--- diff of relevant test between revisions ---'
git diff --no-ext-diff 259ababdb4fcc8f9336fa97185feed2cf584b17e 16d76816a4bc7df3d940e0d1ba2ec08449c69c96 -- src/renderer/src/lib/onboarding-folder-cancellation.test.ts

Repository: stablyai/orca

Length of output: 21748


Script executed:

rg -n -F --glob '*.ts' -e 'gateAndReseedEmptyWorkspace' -e 'waitForWorktreeAgentActivationGateForTests' src/renderer/src && printf '\n--- gate file ---\n' && sed -n '1,280p' src/renderer/src/lib/worktree-activation-gated-empty-reseed.ts && printf '\n--- revisions ---\n' && for r in 259ababdb4fcc8f9336fa97185feed2cf584b17e 16d76816a4bc7df3d940e0d1ba2ec08449c69c96; do echo REV:$r; git show "$r:src/renderer/src/lib/onboarding-folder-cancellation.test.ts" | nl -ba | sed -n '155,220p'; done && printf '\n--- diff ---\n' && git diff 259ababdb4fcc8f9336fa97185feed2cf584b17e 16d76816a4bc7df3d940e0d1ba2ec08449c69c96 -- src/renderer/src/lib/onboarding-folder-cancellation.test.ts

Repository: stablyai/orca

Length of output: 11508


Script executed:

set -o pipefail
printf '%s\n' '--- activation gate implementation ---'
sed -n '1,360p' src/renderer/src/lib/worktree-agent-activation-gate.ts
printf '%s\n' '--- empty-host fixture ---'
fixture=$(rg -l -F --glob '*.ts' 'export function rememberEmptyHostAnswerForTests' src/renderer/src)
printf 'FILE=%s\n' "$fixture"
sed -n '1,260p' "$fixture"
printf '%s\n' '--- relevant gate and reseed call sites ---'
nl -ba src/renderer/src/lib/worktree-activation-gated-empty-reseed.ts | sed -n '1,90p'
nl -ba src/renderer/src/lib/worktree-activation.ts | sed -n '230,270p'

Repository: stablyai/orca

Length of output: 16674


Script executed:

set -o pipefail
printf '%s\n' '--- gate helper ---'
nl -ba src/renderer/src/lib/worktree-agent-activation-gate.ts | sed -n '1,340p'
printf '%s\n' '--- reseed consumer ---'
rg -n -F --glob '*.ts' 'export function reseedGatedEmptyWorkspace' src/renderer/src/lib
reseed_file=$(rg -l -F --glob '*.ts' 'export function reseedGatedEmptyWorkspace' src/renderer/src/lib)
nl -ba "$reseed_file" | sed -n '1,260p'

Repository: stablyai/orca

Length of output: 25117


Script executed:

set -o pipefail
printf '%s\n' '--- readiness and activation inventory fixtures ---'
rg -n -F --glob '*.ts' -e 'workspaceSessionReady' -e 'terminalStartupRestorationReady' -e 'canInspectAgentActivationInventory' -e 'session.tabs.list' src/renderer/src/lib src/renderer/src/store src/renderer/src/runtime | head -240
printf '%s\n' '--- test-store construction and relevant defaults ---'
rg -n -F --glob '*.ts' -e 'export function createTestStore' -e 'function createTestStore' src/renderer/src/store src/renderer/src | head -40
test_store=$(rg -l -F --glob '*.ts' 'export function createTestStore' src/renderer/src/store src/renderer/src | head -1)
printf 'FILE=%s\n' "$test_store"
sed -n '1,260p' "$test_store"

Repository: stablyai/orca

Length of output: 23947


Script executed:

set -o pipefail
printf '%s\n' '--- actual store test helper ---'
nl -ba src/renderer/src/store/slices/store-test-helpers.ts | sed -n '1,180p'
printf '%s\n' '--- onboarding setup and readiness references ---'
nl -ba src/renderer/src/lib/onboarding-folder-cancellation.test.ts | sed -n '55,190p'

Repository: stablyai/orca

Length of output: 13831


Make the activation gate deterministic before asserting terminal creation.

createTestStore() starts with both readiness flags false, and this test does not set them. The activation gate can therefore remain pending while vi.waitFor polls creates(). Set both readiness flags, await the gate, and flush the resulting reseed work.

Suggested synchronization fix
+import { waitForWorktreeAgentActivationGateForTests } from './worktree-agent-activation-gate'
...
    store.setState({
+     workspaceSessionReady: true,
+     terminalStartupRestorationReady: true,
      settings: {
        ...getDefaultSettings('/tmp/workspaces'),
...
    await expect(adding).resolves.toMatchObject({
      id: 'folder-repo',
      executionHostId: 'runtime:box'
    })
-   await vi.advanceTimersByTimeAsync(0)
+   await waitForWorktreeAgentActivationGateForTests(folder.id)
+   await vi.advanceTimersByTimeAsync(0)

@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.

Follow-up Comments

Nitpick Add a focused-runtime case for floating chats.

208-208: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a focused-runtime case for floating chats.

The retained floating cases all use activeRuntimeEnvironmentId: null, so this suite does not cover a floating chat while a remote runtime is focused. The floating route always resolves to the local host and does not read the setting. A regression that routes floating image reads from the focused setting would not fail this file. Add cases that set a focused runtime on the floating and pinned fixtures:

Suggested replacement coverage
     const pinned = {
       ...floating,
       structuredSessionLaunchDirectoryByTabId: {
         'tab-1': { sessionId: floatingTab.entityId, launchDirectory: '/pinned' }
       }
     }
+    const focusedFloating = {
+      ...floating,
+      settings: { ...floating.settings, activeRuntimeEnvironmentId: 'env-1' }
+    }
+    const focusedPinned = {
+      ...pinned,
+      settings: { ...pinned.settings, activeRuntimeEnvironmentId: 'env-1' }
+    }
       ['correct pin', pinned, local(FLOATING_TERMINAL_WORKTREE_ID, '/pinned')],
+      ['focused runtime, missing pin', focusedFloating, null],
+      [
+        'focused runtime, correct pin',
+        focusedPinned,
+        local(FLOATING_TERMINAL_WORKTREE_ID, '/pinned')
+      ],

Open the source location

Comment thread config/reliability-gates.jsonc Resolved
@OrcaWin
OrcaWin merged commit 747acba into main Nov 3, 2026
47 of 48 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