Skip to content

test: remove 61 low-value renderer store tests - #37603

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

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

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Remove 61 low-value tests, including three entire suites, to reduce maintenance and CI work. Retain 45 tests that exercise races, destructive cleanup, capability refusal, and older-server fallback.

What Changed

Delete supplied-result routing, scalar metadata, setup-state and forwarding checks across renderer repository catalogs and project groups. Remove dead registrars and a suite timing row. Narrow current reliability-gate references and record the specific lost alarms while preserving historical execution evidence.

Why

These assertions mostly repeat fixture values or implementation details without exercising the downstream behavior. Their narrow regression alarms are deliberately retired; retained tests are not equivalent replacements.

Linked Issue

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

Visual Proof

N/A — test and metadata removals only; no application UI changes.

Testing

  • Manually tested locally (local project execution intentionally omitted).
  • Automated tests updated by removing 61 authored registrations; parameterized registrations counted once.
  • Static parsing, formatting, retained registration/callback/scope hash verification, and inert lint passed.
  • Current-head CI passed: all 12 full unit shards, aggregate PR checks, static analysis/typecheck, relay integration and Headless Node server.

AI Disclosure

Prepared with Codex.

Review

Root reviewed all 20 original suites and all per-case decisions, cleanup and metadata changes. CodeRabbit reviewed the current head and suggested restoring subtree projection, runtime-scan forwarding/defaults and immediate preference-invalidation checks. Those narrow losses are intentional: they do not exercise workspace teardown, a scan-result consumer or stalled RPC, or a detection/discovery consumer respectively. No equivalent replacement coverage is claimed.

Agent skill upstream boundary

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

Notes

Risk: the deleted tests' exact alarms are lost, including local descendant group/folder projection, older-runtime scan normalization/timeout arguments, and synchronous detection flags/event dispatch. Rollback: revert this test-only commit. Cross-platform, remote/SSH, mobile and folder-workspace coverage losses were considered and recorded; no new live-host/platform evidence is claimed.

Checklist

  • Focused test-value cleanup.
  • Explained what changed and why.
  • Visual proof N/A with reason.
  • Self-reviewed for correctness, security and performance.
  • Cross-platform, SSH/remote and folder-workspace impact considered.
  • Applicable CI checks passed; no local project tests, typechecks or builds run.

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

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The pull request removes renderer store tests for repository identity and routing, project-group and workspace operations, project-runtime behavior, and folder startup. The project-host lifecycle suite adds host-qualified setup tests while removing other cases. Reliability-gate records are updated to document removed coverage, and the paired-runtime test’s CI timing entry is deleted.

Merge Risk: Low · up to d2151

The test-only changes leave subtree cleanup, older-server scans, and preference invalidation less protected against regressions. Restore the targeted checks or accept the reduced coverage.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description covers the change, rationale, testing, visual proof, AI disclosure, review notes, and checklist. It does not include the required ## Risk section or a Level value. The Linked Issue… Add a ## Risk section with the existing risk details and set Level to Low, Medium, or High. Provide a linked issue, or explicitly confirm that the author is a stablyai maintainer and apply the repository’s maintainer exception.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: removing 61 low-value renderer store 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 3 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The description covers the change, rationale, testing, visual proof, AI disclosure, review notes, and checklist. It does not include the required ## Risk section or a Level value. The Linked Issue section also provides no issue reference and does not state that the maintainer exception applies.

Resolution

Add a ## Risk section with the existing risk details and set Level to Low, Medium, or High. Provide a linked issue, or explicitly confirm that the author is a stablyai maintainer and apply the repository’s maintainer exception.

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/scala/security/scala-jwt-hardcoded-secret-scala.yml

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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: 3
src/renderer/src/store/slices/repos-project-groups-delete.spec.ts: 1

59-64: Trivial · Functional Correctness · Quick win

Restore the local subtree cleanup regression test.

The retained owner-routing test checks that a remote descendant survives local deletion. The retained contained-project test checks descendant repository removal only. Neither test fails when a local descendant group or its folder workspace remains in state.

Restore the removed fixture, which exercises descendant group removal and descendant folder-workspace cleanup through deleteProjectGroup.

Suggested fix
 import { beforeEach, describe, expect, it, vi } from 'vitest'
 import { createTestStore } from './store-test-helpers'
+import type { FolderWorkspace } from '../../../../shared/folder-workspace-types'
 
 import type { ProjectGroup } from '../../../../shared/project-group-types'
@@
   describe('project group deletion store routing', () => {
+    it('removes local project group subtrees from renderer state after delete', async () => {
+      const childGroup: ProjectGroup = {
+        ...projectGroup,
+        id: 'child',
+        parentGroupId: projectGroup.id
+      }
+      const siblingGroup: ProjectGroup = {
+        ...projectGroup,
+        id: 'sibling',
+        name: 'Tools',
+        tabOrder: 1
+      }
+      const childWorkspace: FolderWorkspace = {
+        id: 'folder-workspace-1',
+        projectGroupId: childGroup.id,
+        name: 'Shared cleanup',
+        folderPath: '/workspace/platform/shared',
+        linkedTask: null,
+        comment: '',
+        isArchived: false,
+        isUnread: false,
+        isPinned: false,
+        sortOrder: 1,
+        lastActivityAt: 0,
+        createdAt: 1,
+        updatedAt: 1
+      }
+      projectGroupsDelete.mockResolvedValue(true)
+      const store = createTestStore()
+      store.setState({
+        projectGroups: [projectGroup, childGroup, siblingGroup],
+        folderWorkspaces: [childWorkspace],
+        repos: [
+          { ...remoteRepo, id: 'direct', projectGroupId: projectGroup.id },
+          { ...remoteRepo, id: 'nested', projectGroupId: childGroup.id },
+          { ...remoteRepo, id: 'sibling', projectGroupId: siblingGroup.id }
+        ]
+      })
+
+      await expect(store.getState().deleteProjectGroup(projectGroup.id)).resolves.toBe(true)
+
+      expect(store.getState().projectGroups.map((group) => group.id)).toEqual([siblingGroup.id])
+      expect(store.getState().folderWorkspaces).toEqual([])
+      expect(store.getState().repos).toMatchObject([
+        { id: 'direct', projectGroupId: null },
+        { id: 'nested', projectGroupId: null },
+        { id: 'sibling', projectGroupId: siblingGroup.id }
+      ])
+    })
+
     it('uses the remote delete response shape before mutating local state', async () => {
src/renderer/src/store/slices/repos-project-groups.test.ts: 1

413-415: Trivial · Maintainability & Code Quality · Quick win

Restore a renderer test for the runtime scan fallback.

The removed test was the only renderer test of the non-local branch in scanNestedRepos. It checked the projectGroup.scanNested method, the timeoutMs: 20_000 bound, and the normalization of missing fields. The retained scan tests use local IPC only. A regression in that branch would not fail any remaining renderer test.

Restore the removed test, or a narrower equivalent. It should assert the projectGroup.scanNested selector, the timeoutMs: 20_000 bound, and the defaults for stopped, maxRepos, and timeoutMs when an older runtime omits them.

src/renderer/src/store/slices/repos-project-mutations.test.ts: 1

1-6: Trivial · Maintainability & Code Quality · Quick win

Restore the targeted project-runtime invalidation test.

updateProject must clear local detected-agent state and dispatch orca:installed-agent-skills-changed when localWindowsRuntimePreference changes. The removed suite was the targeted coverage for both effects. No retained renderer test checks them, so regressions can go unnoticed.

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: 2fdbf9bc-e8e0-4e65-9009-204a60b2151e
Commits

Reviewing files that changed from the base of the PR and between 7f0b513 and d2151ae.

Files selected for processing: 17
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/store/slices/repos-catalog-refresh.test.ts
  • src/renderer/src/store/slices/repos-cross-host-project-collisions.test.ts
  • src/renderer/src/store/slices/repos-cross-host-refresh-identity.spec.ts
  • src/renderer/src/store/slices/repos-host-identity-routing.test.ts
  • src/renderer/src/store/slices/repos-nested-ssh-projection.test.ts
  • src/renderer/src/store/slices/repos-onboarding-folder-startup.test.ts
  • src/renderer/src/store/slices/repos-paired-runtime-add.test.ts
  • src/renderer/src/store/slices/repos-project-group-create-race.spec.ts
  • src/renderer/src/store/slices/repos-project-group-cross-host-move.test.ts
  • src/renderer/src/store/slices/repos-project-groups-delete.spec.ts
  • src/renderer/src/store/slices/repos-project-groups-owner-routing.spec.ts
  • src/renderer/src/store/slices/repos-project-groups.test.ts
  • src/renderer/src/store/slices/repos-project-host-lifecycle.spec.ts
  • src/renderer/src/store/slices/repos-project-mutations.test.ts
  • src/renderer/src/store/slices/repos-project-runtime.spec.ts
Files with no reviewable changes: 13
  • src/renderer/src/store/slices/repos-nested-ssh-projection.test.ts
  • src/renderer/src/store/slices/repos-project-mutations.test.ts
  • src/renderer/src/store/slices/repos-project-runtime.spec.ts
  • src/renderer/src/store/slices/repos-catalog-refresh.test.ts
  • src/renderer/src/store/slices/repos-project-group-cross-host-move.test.ts
  • src/renderer/src/store/slices/repos-paired-runtime-add.test.ts
  • src/renderer/src/store/slices/repos-cross-host-refresh-identity.spec.ts
  • src/renderer/src/store/slices/repos-host-identity-routing.test.ts
  • src/renderer/src/store/slices/repos-project-group-create-race.spec.ts
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/store/slices/repos-project-groups.test.ts
  • src/renderer/src/store/slices/repos-project-groups-owner-routing.spec.ts
  • src/renderer/src/store/slices/repos-cross-host-project-collisions.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@OrcaWin
OrcaWin merged commit 7a03807 into main Nov 3, 2026
68 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