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 low-value error-copy and primitive schema tests - #35882
Remove tests that repeat error-copy catalog lookups, direct fallback guards, and primitive schema/cache behavior. Deletes nine entire suites and trims six others: 21 authored test registrations (23 expanded cases) removed.
Preserves nine substantive cases across eight suites covering plural selection, placeholder preservation, message parsing, PR/MR detail routing, and legacy provider normalization.
Validation: static enumeration and retained-body checks, formatting, lint, and reference/routing scans passed. Full PR CI will validate the change; no local runtime tests were run.
The change removes tests for renderer error messages, translations, and fallbacks, and removes tests for RPC parameter schema behavior. Two remaining renderer test files have updated imports. These changes affect test coverage; the supplied summaries do not identify runtime behavior changes.
Priority: Low
Merge Risk: Low · up to 7eadf
The PR does not change runtime behavior, but restoring these focused tests would prevent future presentation and RPC schema regressions from going unnoticed.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Description check
The description explains the test removals and validation performed, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof, Testing checkboxes, AI Disclosure, R…
Complete the required template sections. Add an actual linked issue under “Fixes #”, provide the required visual-proof statement such as “N/A” with a reason, document testing and platform coverage, complete the applicable checkboxes, and in…
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: removing low-value error-copy and primitive schema tests.
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 2 files.
Full details: Description check
Explanation
The description explains the test removals and validation performed, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof, Testing checkboxes, AI Disclosure, Review, Notes, Agent skill upstream boundary, and Checklist.
Resolution
Complete the required template sections. Add an actual linked issue under “Fixes #”, provide the required visual-proof statement such as “N/A” with a reason, document testing and platform coverage, complete the applicable checkboxes, and include the required rationale and compatibility notes.
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.
automationRunErrorText remains reachable from three production components, but automation-run-error-copy.test.ts was deleted. No retained test calls this helper or detects its known-code localization, uncoded, unknown, incomplete, or null-error branches. The same coverage gap exists in the other eight deleted component suites.
Suggested fix
diff --git a/src/renderer/src/components/automations/automation-run-error-copy.test.ts b/src/renderer/src/components/automations/automation-run-error-copy.test.ts
new file mode 100644
--- /dev/null+++ b/src/renderer/src/components/automations/automation-run-error-copy.test.ts
@@
+import { afterEach, describe, expect, it } from 'vitest'+import { i18n } from '@/i18n/i18n'+import es from '@/i18n/locales/es.json'+import { automationRunFailure } from '../../../../shared/automation-run-failure-copy'+import { automationRunErrorText } from './automation-run-error-copy'++const originalLanguage = i18n.language++afterEach(async () => {+ await i18n.changeLanguage(originalLanguage)+})++describe('automationRunErrorText', () => {+ it('localizes coded run failures, including one sentence per setup state', async () => {+ i18n.addResourceBundle('es', 'translation', es)+ await i18n.changeLanguage('es')+ expect(automationRunErrorText(automationRunFailure('noDispatchHost'))).toBe(+ es.automations.runFailures.noDispatchHost+ )+ expect(+ automationRunErrorText(+ automationRunFailure('projectSetupNotReady', { setupState: 'setting-up' })+ )+ ).toBe(es.automations.runFailures.projectSetupState.settingUp)+ })++ it('shows the stored English for uncoded, unknown, or unusable failures', async () => {+ i18n.addResourceBundle('es', 'translation', es)+ await i18n.changeLanguage('es')+ expect(automationRunErrorText({ error: 'Old record text' })).toBe('Old record text')+ expect(automationRunErrorText({ error: 'Newer host', errorCode: 'futureCode' })).toBe(+ 'Newer host'+ )+ expect(automationRunErrorText({ error: 'English', errorCode: 'toString' })).toBe('English')+ expect(+ automationRunErrorText({+ error: 'Project setup on the selected automation host is paused.',+ errorCode: 'projectSetupNotReady',+ errorParams: { setupState: 'paused' }+ })+ ).toBe('Project setup on the selected automation host is paused.')+ expect(automationRunErrorText({ error: null, errorCode: 'noDispatchHost' })).toBeNull()+ })+})
Deleting this suite removes the only direct checks that requiredNumber rejects numeric strings and that requiredStringAllowingEmpty accepts empty strings while rejecting non-strings. These schemas are used by reachable RPC methods, but retained consumer tests do not detect those regressions.
Suggested fix
+import { describe, expect, it } from 'vitest'+import { requiredNumber, requiredString, requiredStringAllowingEmpty } from './rpc-param-primitives'++describe('required RPC primitive schemas', () => {+ it.each([requiredString, requiredStringAllowingEmpty, requiredNumber])(+ 'reuses schemas for the same message without conflating different messages',+ (factory) => {+ const first = factory('Missing id')+ expect(factory('Missing id') === first).toBe(true)+ expect(factory('Missing name') === first).toBe(false)+ }+ )++ it('keeps each factory distinct for an identical message', () => {+ const strict = requiredString('Missing value')+ const empty = requiredStringAllowingEmpty('Missing value')+ const number = requiredNumber('Missing value')+ expect(strict.safeParse('').success).toBe(false)+ expect(empty.parse('')).toBe('')+ expect(empty.safeParse(1).success).toBe(false)+ expect(number.parse(1)).toBe(1)+ expect(number.safeParse('1').success).toBe(false)+ })+})
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: 29ba704c-499e-4680-99d5-23b1a7b26bb7
Commits
Reviewing files that changed from the base of the PR and between 401468b and 7eadf44.
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.
Remove tests that repeat error-copy catalog lookups, direct fallback guards, and primitive schema/cache behavior. Deletes nine entire suites and trims six others: 21 authored test registrations (23 expanded cases) removed.
Preserves nine substantive cases across eight suites covering plural selection, placeholder preservation, message parsing, PR/MR detail routing, and legacy provider normalization.
Validation: static enumeration and retained-body checks, formatting, lint, and reference/routing scans passed. Full PR CI will validate the change; no local runtime tests were run.