Skip to content

test: reduce repeated lint startup in PR checks - #29286

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/faster-CI
Oct 16, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/faster-CI

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • 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

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b9ff8218-96b4-44d5-a6f5-33a05b568608
📥 Commits

Reviewing files that changed from the base of the PR and between 102b267 and 4bbe95b.

📒 Files selected for processing: 7
  • config/scripts/anti-slop-scope-regression.test.mjs
  • config/scripts/check-runtime-electron-ratchet.test.mjs
  • config/scripts/ime-enter-guard-plugin.test.mjs
  • config/scripts/native-chat-design-tokens-plugin.test.mjs
  • config/scripts/oxlint-plugin-test-runner.mjs
  • config/scripts/quadratic-buffer-concat-plugin.test.mjs
  • config/scripts/renderer-scrollbar-style-plugin.test.mjs
💤 Files with no reviewable changes: 1
  • config/scripts/check-runtime-electron-ratchet.test.mjs

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: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning 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 Passed checks: 4 passed
Check name Status Explanation
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.
Title check Passed The title clearly and concisely describes the main change: reducing repeated lint startup during PR checks.
Description check Passed 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin
OrcaWin merged commit fb529aa into main Oct 16, 2026
33 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