You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: remove 58 low-value tests across desktop, tooling and mobile - #37853
Removes58 low-value tests while retaining395 authored behavioral checks.
What Changed
Reviewed160 sources/453 authored tests. Deletes eight whole suites, trims32 others, and removes six stale timing entries. Application code is unchanged.
Why
Cuts copied option/language/manifest inventories, duplicate predicate/cache-wrapper cases, a secret-eviction test that never committed retained ciphertext, and provider smoke checks whose assertions can pass without proving execution.
Linked Issue
N/A — maintainer-requested test audit; no pre-existing issue.
Visual Proof
N/A — tests and timing metadata only.
Testing
All33 local changed-file gates passed on Linux; explicit retained mobile tests (2 files/9 expanded cases), cloud counter tests (1 file/3 cases), and154 reliability gates passed.
Full PR CI must pass before merge.
Commands: ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=f9f825aa1a9ee0baa4e8d9c8970edd5e91ea50e9 --maxWorkers=2; scoped Vitest runs for retained mobile route/responsive and cloud counter files; node config/scripts/check-reliability-gates.mjs.
Risk
Level: Low. Removing tests intentionally loses narrow regression alarms; no equivalent replacements are claimed. Runtime behavior is unchanged. A plain revert restores the tests.
Review
Source dispositions, retained assertions and deletion references reviewed. Invalid/missing-panel admission and meaningful diagnostic/adapter checks were retained after root review.
Agent skill upstream boundary
Not applicable; no upstream skill-installer material changed.
Notes
Cross-platform, remote/folder-workspace and mobile production behavior is unchanged. CI covers platform workflows.
Checklist
Focused scope; change, validation, risk and rollback explained.
This change removes tests across configuration scripts, mobile and CLI features, main-process modules, and shared and renderer code. The removed tests covered individual behaviors and integration paths; the summaries also identify tests that remain. Six test timing entries were removed from the CI timing map.
Merge Risk: Low · up to bc27c
Mergeable with awareness: useful regression checks are removed, though no application behavior change is shown.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: removing 58 low-value tests across desktop, tooling, and mobile.
Description check
The description covers the required sections, explains the change and rationale, documents testing, risk, rollback, visual proof, and checklist status. Minor spacing typos do not prevent review.
Docstring Coverage
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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 8 files.
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.
1-1: Trivial · Data Integrity & Integration · Quick win
Keep a focused manifest-contract test.
The retained worker test checks the generated worker behavior, not the manifest that declares how Orca loads that worker. The generic schema check also accepts any structurally valid values. Retain the removed assertions or move equivalent assertions to a shared hook-template contract test.
Keep a direct exception-path test for readSandboxTcpCounters.
The current helper converts reader exceptions to undefined. The retained observability test checks downstream handling of an explicit undefined; it cannot detect removal of the helper’s catch. Because setTcpCounterReader reads synchronously during Cloud Run setup, an exception that escapes the helper can prevent startup from completing.
Suggested regression test
-import { parseProcNetSnmpTcp, sandboxTcpCounterDeltas } from './sandbox-tcp-counters.js'+import {+ parseProcNetSnmpTcp,+ readSandboxTcpCounters,+ sandboxTcpCounterDeltas+} from './sandbox-tcp-counters.js'+ it('returns undefined when the reader fails', () => {+ expect(+ readSandboxTcpCounters(() => {+ throw new Error('ENOENT')+ })+ ).toBeUndefined()+ })
src/cli/specs/profile-state.test.ts: 1
2-2: Trivial · Functional Correctness · Quick win
Retain a focused profile-state help contract test.
The retained tests do not exercise formatCommandHelp. A change to the rollback usage, recovery selectors, notes, or examples can therefore pass all retained tests while rendering incorrect help. Keep focused assertions for the key recovery selectors and usage or recovery text, rather than restoring the full flag-inventory assertion.
The retained configuration checks validate only that Vitest uses the returned include list. They do not validate the required entries. A later removal can therefore route the SQLite-backed native-chat tests or the Parcel-watcher reconciliation test through Bun without failing the remaining checks.
Suggested fix
import { expect, it } from 'vitest'
import { access } from 'node:fs/promises'
+import { getNodeRuntimeInclude } from './vitest-node-runtime-files.mjs'
import { runProcessSync } from '@orca/process-host'
@@
it('launches application child fixtures under Node even when Vitest runs under Bun', () => {
const result = runProcessSync({
program: process.execPath,
@@
const identity: unknown = JSON.parse(result.stdout)
expect(identity).toEqual({ node: expect.stringMatching(/^\d+\.\d+\.\d+$/) })
})
++it('routes native-chat journal and record-store SQLite contracts through Node', () => {+ expect(getNodeRuntimeInclude()).toEqual(+ expect.arrayContaining([+ 'src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.test.ts',+ 'src/main/native-chat/agent-session-wire/structured-agent-session-status-first-input-identity.test.ts',+ 'src/main/native-chat/structured-chat-naming.test.ts',+ 'src/main/runtime/agent-session/records/agent-session-conversation-name-store.test.ts'+ ])+ )+})++it('runs plugin reconciliation with its native watcher under Node', () => {+ expect(getNodeRuntimeInclude()).toContain(+ 'src/main/plugins/plugin-service-reconciliation.test.ts'+ )+})
The retained cases mount a new route for each viewport. They do not update an existing route after changing from landscape to portrait. This leaves the WorkspacePlaceholder → WorkspacePicker transition untested.
Suggested fix
})('renders $expected at $width with ownership $ownsHostArea', (state) => {
Object.assign(viewport, state)
let tree: ReactTestRenderer | undefined
act(() => {
tree = create(createElement(HostWorktreeRoute))
})
expect(tree?.toJSON()).toMatchObject({ type: state.expected })
act(() => tree?.unmount())
})
++ it('returns the picker after rotating a host root from landscape to portrait', () => {+ Object.assign(viewport, { width: 951, height: 669, ownsHostArea: true })+ let tree: ReactTestRenderer | undefined+ act(() => {+ tree = create(createElement(HostWorktreeRoute))+ })+ expect(tree?.toJSON()).toMatchObject({ type: 'WorkspacePlaceholder' })+ Object.assign(viewport, { width: 669, height: 951 })+ act(() => tree?.update(createElement(HostWorktreeRoute)))+ expect(tree?.toJSON()).toMatchObject({ type: 'WorkspacePicker' })+ act(() => tree?.unmount())+ })
})
The generic BoundedMap tests cannot detect a regression in SettledDiffCache's aggregate limit or its use of the aggregate limit. The deleted test was the only test that retained multiple results through this cache and asserted the 8,000,000-character ceiling.
Suggested fix
import {
+ MAX_SETTLED_DIFF_CACHE_TOTAL_CHARACTERS,
MAX_SETTLED_DIFF_CACHE_RESULT_CHARACTERS,
SettledDiffCache
} from './settled-diff-cache'
@@
describe('SettledDiffCache bounds', () => {
+ it('holds total retained content under the character budget', () => {+ const cache = new SettledDiffCache()+ const chunk = MAX_SETTLED_DIFF_CACHE_RESULT_CHARACTERS+ const needed = Math.ceil(MAX_SETTLED_DIFF_CACHE_TOTAL_CHARACTERS / chunk) + 2++ for (let index = 0; index < needed; index += 1) {+ cache.set(+ `key-${index}`,+ settledStamp(`stamp-${index}`),+ diffOfSize(chunk),+ cache.beginRead()+ )+ }++ expect(cache.stats().retainedCharacters).toBeLessThanOrEqual(+ MAX_SETTLED_DIFF_CACHE_TOTAL_CHARACTERS+ )+ })+
it('declines a single result larger than the per-entry cap', () => {
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: 8f7a88f5-46fb-4123-b15a-c9e0de5891ea
Commits
Reviewing files that changed from the base of the PR and between f9f825a and bc27c39.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Removes58 low-value tests while retaining395 authored behavioral checks.
What Changed
Reviewed160 sources/453 authored tests. Deletes eight whole suites, trims32 others, and removes six stale timing entries. Application code is unchanged.
Why
Cuts copied option/language/manifest inventories, duplicate predicate/cache-wrapper cases, a secret-eviction test that never committed retained ciphertext, and provider smoke checks whose assertions can pass without proving execution.
Linked Issue
N/A — maintainer-requested test audit; no pre-existing issue.
Visual Proof
N/A — tests and timing metadata only.
Testing
Commands:
ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=f9f825aa1a9ee0baa4e8d9c8970edd5e91ea50e9 --maxWorkers=2; scoped Vitest runs for retained mobile route/responsive and cloud counter files;node config/scripts/check-reliability-gates.mjs.Risk
Level: Low. Removing tests intentionally loses narrow regression alarms; no equivalent replacements are claimed. Runtime behavior is unchanged. A plain revert restores the tests.
Review
Source dispositions, retained assertions and deletion references reviewed. Invalid/missing-panel admission and meaningful diagnostic/adapter checks were retained after root review.
Agent skill upstream boundary
Notes
Cross-platform, remote/folder-workspace and mobile production behavior is unchanged. CI covers platform workflows.
Checklist