Skip to content

test: remove mock replays and redundant copy tests - #34411

Merged
OrcaWin merged 1 commit into
mainfrom
test-audit-578-copy-catalog
Oct 27, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
test-audit-578-copy-catalog

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 $\color{#cf222e}{\Huge{\mathbf{−}}}$​298 $\color{#cf222e}{\Huge{\mathbf{−}}}$​297
Prod 1 0 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1

Removes 21 low-value test registrations across four suites, including the entire native-chat English copy/catalog inventory suite. Deletes mock routing and error replays, redundant status-bar copy checks, and a clipboard unmount test that never observes the state update it claims to prevent.

Retains nine registrations covering host-specific Git routing and store updates, cancellation during an awaited capability probe, clipboard feedback timing, and rendered Japanese SSH status. Production code is unchanged; removes the deleted suite's obsolete timing entry.

Validation: retained registrations and callbacks are preserved; static parsing, runner discovery, formatting, lint, and baseline/reference checks passed. Full PR CI will validate the final batch.

@OrcaWin
OrcaWin force-pushed the test-audit-578-copy-catalog branch from fcdfbe1 to 665c594 Compare October 27, 2026 12:38
@OrcaWin OrcaWin changed the title test: remove nine copy-catalog inventory cases test: remove mock replays and redundant copy tests Oct 27, 2026
@OrcaWin
OrcaWin marked this pull request as ready for review October 27, 2026 12:38
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The changes remove selected tests from four renderer test suites. They also remove one CI shard timing entry. The supplied summaries describe no runtime implementation changes.

Priority: Low

Merge Risk: Low · up to 665c5

The change is mergeable with a bounded testing risk: future Jira generation changes could introduce unintended local fallback without these tests catching it. Restore the two targeted assertions if that protection is required before merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the main test removals, retained coverage, production impact, and validation results. It does not follow the required template and omits the ELI5, Why, Linked Issue, Visual Pr… Add the required template sections. Include the linked issue, explain why the removals are appropriate, add Visual Proof with N/A and a reason if there is no UI change, document testing platforms and commands, complete the applicable checkb…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: removing mock replays and redundant tests. It is concise and specific.
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. Documentation-only edits and deletions within survi…
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. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Full details: Description check

Explanation

The description explains the main test removals, retained coverage, production impact, and validation results. It does not follow the required template and omits the ELI5, Why, Linked Issue, Visual Proof or N/A, Testing checklist, Review, Notes, and Checklist sections.

Resolution

Add the required template sections. Include the linked issue, explain why the removals are appropriate, add Visual Proof with N/A and a reason if there is no UI change, document testing platforms and commands, complete the applicable checkboxes, and include AI Disclosure if applicable.

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

Comment @coderabbitai help to get the list of available commands.

@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/runtime/runtime-jira-summary-generation-client.test.ts: 2

24-29: Trivial · Functional Correctness · Quick win

Retain the rejected remote-generation test.

The retained test cancels during the capability probe, before the remote RPC runs. It cannot detect a regression that falls back to window.api.jira.generateIssueSummary after callRuntimeRpc rejects. The task-page hook reaches this path, and its tests mock the client itself, so they do not provide equivalent coverage.

Suggested fix
 describe('Jira generation routing', () => {
+  it('keeps an unknown remote generation method failure on its owner', async () => {
+    mocks.rpc.mockRejectedValue(new Error('method_not_found'))
+    await expect(
+      generateRuntimeJiraIssueSummary(target, args, new AbortController().signal)
+    ).rejects.toThrow('method_not_found')
+    expect(mocks.local).not.toHaveBeenCalled()
+  })
+
   it('does not dispatch after cancellation during the capability probe', async () => {

24-29: Trivial · Maintainability & Code Quality · Quick win

Keep a separate test for capability-probe rejection.

The task-page workflow passes its target to generateRuntimeJiraIssueSummary. A rejected capability probe propagates before either generation API is called. The remaining cancellation test resolves the probe, so it does not cover this branch. Restore the deleted probe-rejection test instead of relying on post-probe RPC-rejection coverage.

Suggested fix
 describe('Jira generation routing', () => {
+  it('never falls back locally after a remote probe fails', async () => {
+    mocks.supports.mockRejectedValue(new Error('Disconnected'))
+    await expect(
+      generateRuntimeJiraIssueSummary(target, args, new AbortController().signal)
+    ).rejects.toThrow('Disconnected')
+    expect(mocks.local).not.toHaveBeenCalled()
+  })
+
   it('does not dispatch after cancellation during the capability probe', 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: 6170309a-5d2d-4878-b2ed-f6f8822905c5
Commits

Reviewing files that changed from the base of the PR and between 5b90733 and 665c594.

Files selected for processing: 5
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/components/native-chat/native-chat-shared-copy-matches-catalog.test.ts
  • src/renderer/src/components/status-bar/status-bar-copy-localization.test.tsx
  • src/renderer/src/hooks/use-clipboard-text-copy-feedback.test.ts
  • src/renderer/src/runtime/runtime-jira-summary-generation-client.test.ts
Files with no reviewable changes: 4
  • src/renderer/src/components/native-chat/native-chat-shared-copy-matches-catalog.test.ts
  • src/renderer/src/hooks/use-clipboard-text-copy-feedback.test.ts
  • src/renderer/src/components/status-bar/status-bar-copy-localization.test.tsx
  • 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 0ddc7fc into main Oct 27, 2026
60 checks passed
smwbev added a commit to smwbev/orca that referenced this pull request Oct 27, 2026
381 commits landed on main between fd25eb0 and dc73505. All seven catalogs and en-runtime-required.json conflicted, so they are taken from main and the prune is recomputed in one pass: the previous 1,637 keys plus 4, none left the set. stablyai#30449 dropped the readers of RepositorySourceControlAiActionRows.7a3a8e431d and SourceControlAiActionRecipeDefaults.2cb4bb7e5d and added settings.sourceControl.actionModel.permissionsDefaultHint without one; stablyai#33622 dropped the reader of auto.hooks.ipc.events.browserStateIpcBridge.docPreviewLinkFailed. Two keys exist only in en.json and pt.json never had permissionsDefaultHint, so en.json sheds 1,641, pt.json 1,638 and the other five catalogs 1,639. en.json goes from 17,395 entries to 15,754; en-runtime-required.json keeps 691 of them.

main deleted both test files this branch edited: catalog-nested-settings.test.ts (stablyai#34136) and native-chat-shared-copy-matches-catalog.test.ts (stablyai#34411). The deletions are taken, so the branch now differs from main in 13 files.
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