Skip to content

test: remove 150 low-value tests - #34520

Merged
OrcaWin merged 1 commit into
mainfrom
test-audit-622-low-value-shared-tests
Oct 27, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
test-audit-622-low-value-shared-tests

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1979 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1974
Prod 0 0 0 0

Remove 150 low-value test registrations across 18 suites, including the entire terminal contrast correction suite. These cases repeat configuration defaults, generated-string inventories, helper projections, or calculations copied into the tests.

Retain 151 registrations that exercise meaningful boundaries and state transitions. Remove the resulting unused imports, setup hook, declaration, and empty suite wrappers; production code is unchanged.

Static validation passed: retained callback and registration bytes match, formatting and lint pass, and test routing expands to 657 cases across 16 unit roots (210 selected cases plus 447 unchanged startup-aggregate cases). Full PR CI is required before merge.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

This change removes or consolidates tests across hosted-review targeting, source-control AI, check-fix prompts, source scanning, task queries and contexts, terminal behavior, TUI agent launches and permissions, and the retired-name registry. It adds an assertion that repository overrides containing only draft: null convert to sourceControlAi: null. The summaries report no implementation behavior changes.

Priority: Low

Merge Risk: Low · up to c74fc

The change is mergeable with owner awareness, but retaining focused checks for untrusted prompt inputs and provider-specific task-cache isolation would protect important behavior against future regressions.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title "test: remove 150 low-value tests" matches the main change. The PR removes 150 test registrations across 18 suites and leaves production code unchanged. The title uses the conventional "test…
Description check Passed The description follows the template's main sections: it explains what changed (150 low-value test registrations removed across 18 suites, 151 retained, production code unchanged) and why (the removed…
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: Title check

Explanation

The title "test: remove 150 low-value tests" matches the main change. The PR removes 150 test registrations across 18 suites and leaves production code unchanged. The title uses the conventional "test:" prefix and states the count, so a reviewer scanning history can identify the primary change.

Full details: Description check

Explanation

The description follows the template's main sections: it explains what changed (150 low-value test registrations removed across 18 suites, 151 retained, production code unchanged) and why (the removed tests repeated defaults, generated-string inventories, helper projections, or calculations). It also gives static validation results and states that full CI is required. Several template sections are missing or unfilled: ELI5, the Why alternatives discussion, the Linked Issue ("Fixes #" is blank, and the template says it is required for outside contributors), Testing checkboxes (no manual test steps and the boxes are unchecked), the Visual Proof N/A statement, the AI Disclosure, the Agent skill upstream boundary checkbox, and the Checklist. The description covers the core intent, so the check passes on the strength of the What Changed and Why content, but the gaps should be closed before merge.

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

❤️ 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/shared/pr-checks-fix-prompt.test.ts: 1

77-77: Trivial · Security & Privacy · Quick win

Keep a focused untrusted-input prompt test.

The retained tests exercise available log tails with benign diagnostics, but no test supplies instruction-like text through an available log tail, check name, and review title. Restore one focused assertion that the text remains inside the JSON data and that investigation sources are marked as untrusted. This is a coverage improvement, not evidence of a current production vulnerability.

src/shared/task-source-context.test.ts: 1

95-95: Trivial · Data Integrity & Integration · Quick win

Retain provider-specific cache-scope coverage.

getTaskSourceCacheScope uses provider-specific identity serializers. The retained shared test exercises only GitHub identities. The Linear and Jira tests vary runtime scopes, not identity encoding, and no equivalent GitLab assertion remains. Add a small parameterized test that uses identical scope fields and distinct GitLab, Linear, and Jira identities, then asserts that each pair produces different scopes. This is a regression-coverage improvement, not evidence of a current data leak.


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: 38e9808b-712e-477a-990c-5c3deffcef5a
Commits

Reviewing files that changed from the base of the PR and between 32a9b3b and c74fc61.

Files selected for processing: 18
  • src/shared/hosted-review-push-target.test.ts
  • src/shared/pr-checks-fix-prompt.test.ts
  • src/shared/source-control-ai-action-recipes.test.ts
  • src/shared/source-control-ai-actions.test.ts
  • src/shared/source-control-ai-recipe-save.test.ts
  • src/shared/source-control-ai.test.ts
  • src/shared/source-scan/source-tree-scan.test.ts
  • src/shared/task-query.test.ts
  • src/shared/task-source-context.test.ts
  • src/shared/terminal-contrast-correction.test.ts
  • src/shared/terminal-mode-reset-profiles.test.ts
  • src/shared/tui-agent-launch-command-argument-values.test.ts
  • src/shared/tui-agent-launch-command-pick-flags.test.ts
  • src/shared/tui-agent-permission-choice.test.ts
  • src/shared/tui-agent-permissions.test.ts
  • src/shared/tui-agent-startup-hermes.spec.ts
  • src/shared/tui-agent-startup-session-options.spec.ts
  • src/shared/worktree/retired-name-registry.test.ts
Files with no reviewable changes: 13
  • src/shared/terminal-contrast-correction.test.ts
  • src/shared/source-control-ai-action-recipes.test.ts
  • src/shared/tui-agent-launch-command-argument-values.test.ts
  • src/shared/tui-agent-startup-hermes.spec.ts
  • src/shared/source-scan/source-tree-scan.test.ts
  • src/shared/worktree/retired-name-registry.test.ts
  • src/shared/tui-agent-permissions.test.ts
  • src/shared/source-control-ai-recipe-save.test.ts
  • src/shared/tui-agent-launch-command-pick-flags.test.ts
  • src/shared/hosted-review-push-target.test.ts
  • src/shared/tui-agent-startup-session-options.spec.ts
  • src/shared/source-control-ai.test.ts
  • src/shared/task-query.test.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 merged commit 1d2778f into main Oct 27, 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