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: reduce repeated lint startup in PR checks - #29286
PR tests spend time starting the same linter repeatedly. Run each fixture table together while keeping every example and assertion.
What Changed
Five lint suites now write each example to its own file and share one real Oxlint invocation per rule configuration: 85 launches become six. Diagnostics are matched back to their file, and unexpected filenames fail the run. Existing single-source callers use the same runner.
Remove the positive full-tree Electron import scan from unit tests because PR preflight already executes that exact gate. Keep the injected real-tree violation, graph tests, and all lint cases.
Why
This removes repeated process startup and a repeated whole-tree check without weakening the rules or replacing executable checks with mocks. Separate fixture files preserve lexical isolation and test names.
Linked Issue
Maintainer-requested CI test audit.
Visual Proof
N/A — test execution only; no product UI change.
Testing
I manually tested these changes locally
Automated tests updated
Linux, Node 26.8.1, two workers: 119 focused tests passed, including both existing single-source callers. The actual runtime Electron gate and changed-code-quality checks passed. Independent preservation review found no lost contract. A second focused run passed under the exact CI coordinator/runtime versions, Bun 1.4.3 and Node 24.21.0 (250 tests across both audit PRs). Full supported platform checks run in PR CI.
Three alternating before/after runs of the same seven-file command: median wall time 7.27s → 2.25s; median summed module time 11.49s → 2.08s (includes hooks/import/setup). Before wall samples: 7.268, 7.226, 7.463s. After: 2.116, 2.250, 2.318s. Command: ORCA_BACKGROUND_LAUNCH=1 node node_modules/vitest/vitest.mjs run --config config/vitest.config.ts --maxWorkers=2 with the five changed lint suites and both runtime Electron gate suites, using ci-unit-timing-reporter.mjs.
Hosted baseline: run 38646706136, Node 24.21.0/Bun 1.4.3, ARM/four workers. Downloaded all five successful shard artifacts and verified these seven files passed: 15.942 worker-seconds combined. Candidate PR run 38827086842 passed all five unit shards and static analysis/typecheck. All seven measured suites passed; their combined module time fell to 3.683 worker-seconds (76.9% lower). Candidate merge source is 79f463a8635e5e3ea193d874b15871a176324765, for PR head 4bbe95b388e94e5bdb534416d8646baca79a200e. Both artifact sets use Node 24.21.0/Bun 1.4.3. The final aggregate check is still pending. The seven measured suites and shared lint runner match that hosted baseline byte for byte before this PR. Historical hosted timing is not a paired wall-clock benchmark.
Review
Each lint case retains its original assertion; no table row removed. The removed positive scan is owned by .github/workflows/pr.yml preflight and pnpm lint. Production LOC: zero changed; test/support: +112/-52.
Agent skill upstream boundary
Not applicable; no upstream skill source copied.
Checklist
This PR is small and focused
Explained behavior, mechanism, and choice
N/A visual proof explained
Self-reviewed and independently reviewed for preservation
Cross-platform paths use Node path utilities; SSH and mobile product behavior unchanged
Full required PR checks passed; CI measurement reviewed
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
The Oxlint test runner now supports linting multiple source strings in one invocation and returns diagnostics grouped by source. Several plugin tests now lint their violation and accepted cases in batch setup, then assert against cached diagnostics. The real-tree Electron ratchet test was removed.
Priority: ➖ Normal
Merge Risk:⚪ Minimal · up to 4bbe9
This change only affects lint test infrastructure and has no production code changes. No merge-blocking risk was found.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 6 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
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.
Title check
The title clearly and concisely describes the main change: reducing repeated lint startup during PR checks.
Description check
The description includes all required sections, explains the change and rationale, documents testing and performance results, and identifies the remaining CI status. The linked issue is described as a…
Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 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.
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
PR tests spend time starting the same linter repeatedly. Run each fixture table together while keeping every example and assertion.
What Changed
Five lint suites now write each example to its own file and share one real Oxlint invocation per rule configuration: 85 launches become six. Diagnostics are matched back to their file, and unexpected filenames fail the run. Existing single-source callers use the same runner.
Remove the positive full-tree Electron import scan from unit tests because PR preflight already executes that exact gate. Keep the injected real-tree violation, graph tests, and all lint cases.
Why
This removes repeated process startup and a repeated whole-tree check without weakening the rules or replacing executable checks with mocks. Separate fixture files preserve lexical isolation and test names.
Linked Issue
Maintainer-requested CI test audit.
Visual Proof
N/A — test execution only; no product UI change.
Testing
Linux, Node 26.8.1, two workers: 119 focused tests passed, including both existing single-source callers. The actual runtime Electron gate and changed-code-quality checks passed. Independent preservation review found no lost contract. A second focused run passed under the exact CI coordinator/runtime versions, Bun 1.4.3 and Node 24.21.0 (250 tests across both audit PRs). Full supported platform checks run in PR CI.
Three alternating before/after runs of the same seven-file command: median wall time 7.27s → 2.25s; median summed module time 11.49s → 2.08s (includes hooks/import/setup). Before wall samples: 7.268, 7.226, 7.463s. After: 2.116, 2.250, 2.318s. Command:
ORCA_BACKGROUND_LAUNCH=1 node node_modules/vitest/vitest.mjs run --config config/vitest.config.ts --maxWorkers=2with the five changed lint suites and both runtime Electron gate suites, usingci-unit-timing-reporter.mjs.Hosted baseline: run 38646706136, Node 24.21.0/Bun 1.4.3, ARM/four workers. Downloaded all five successful shard artifacts and verified these seven files passed: 15.942 worker-seconds combined. Candidate PR run 38827086842 passed all five unit shards and static analysis/typecheck. All seven measured suites passed; their combined module time fell to 3.683 worker-seconds (76.9% lower). Candidate merge source is
79f463a8635e5e3ea193d874b15871a176324765, for PR head4bbe95b388e94e5bdb534416d8646baca79a200e. Both artifact sets use Node 24.21.0/Bun 1.4.3. The final aggregate check is still pending. The seven measured suites and shared lint runner match that hosted baseline byte for byte before this PR. Historical hosted timing is not a paired wall-clock benchmark.Review
Each lint case retains its original assertion; no table row removed. The removed positive scan is owned by
.github/workflows/pr.ymlpreflight andpnpm lint. Production LOC: zero changed; test/support: +112/-52.Agent skill upstream boundary
Checklist