Repository navigation
[CI] Speed up unit tests with cross-runtime duration scheduling - #25967
Conversation
📝 WalkthroughWalkthroughThe Vitest configuration now uses runtime-aware sequencing and includes additional Node runtime and SQLite test files. New boundary tests check runtime include membership. Test fixtures and assertions were updated across main-process and renderer tests. The YAML parser now processes merge keys, with expanded coverage for merged tab values. Priority: ➖ Normal Merge Risk: 🔵 Low · up to The SQLite runtime guard can miss some runtime imports, and the YAML alias-limit concern remains open. These warrant owner awareness and follow-up, but the supplied evidence does not establish a broader failure that blocks merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
5aa3e4bf-fd47-424a-9714-7aa282574d9e
📥 Commits
Reviewing files that changed from the base of the PR and between 0a26f3e and 6624610dd3041fddca510083d2b9886958303ddc.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (27)
config/scripts/ci-shard-assignment.mjsconfig/scripts/ci-shard-assignment.test.mjsconfig/scripts/ci-unit-sequencer.mjsconfig/scripts/vitest-host-ports-setup.tsconfig/scripts/vitest-node-runtime-boundary.test.tsconfig/scripts/vitest-node-runtime-files.mjsconfig/scripts/vitest-runtime-sequencer.mjsconfig/scripts/vitest-runtime-sequencer.test.mjsconfig/scripts/vitest-sqlite-database-runtime-files.mjsconfig/scripts/vitest-sqlite-runtime-boundary.test.tsconfig/scripts/vitest-sqlite-runtime-files.mjsconfig/vitest.config.tspackage.jsonsrc/main/claude/claude-stream-json-connection.test.tssrc/main/cli/packaged-cli-assets.test.tssrc/main/runtime/orca-runtime-test-mocks.spec.tssrc/main/runtime/orca-runtime-test-mocks/imported-values.spec.tssrc/main/skills/skill-upload-session-service.test.tssrc/main/ssh/ssh-channel-multiplexer.test.tssrc/renderer/src/components/dashboard/DashboardAgentChildDisclosure.test.tsxsrc/renderer/src/components/editor/markdown-preview-review-frame-lifecycle.test.tsxsrc/renderer/src/components/editor/monaco-content-sync.bench.tssrc/renderer/src/components/editor/monaco-content-sync.undo-retention.bench.tssrc/renderer/src/components/network/CustomAddressDialog.test.tsxsrc/renderer/src/components/status-bar/UsagePercentageDisplayChangeNotice.test.tsxsrc/shared/orca-yaml-alias-bounds.test.tssrc/shared/orca-yaml.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
85ed872 to
67c9174
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
f2bf9ad9-fec7-40c9-a426-72937db12585
📥 Commits
Reviewing files that changed from the base of the PR and between 6624610dd3041fddca510083d2b9886958303ddc and 67c9174.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
config/scripts/vitest-runtime-sequencer.mjsconfig/scripts/vitest-runtime-sequencer.test.mjsconfig/scripts/vitest-sqlite-database-runtime-files.mjsconfig/scripts/vitest-sqlite-runtime-boundary.test.tssrc/main/runtime/structured-agent-session-codex-stopped-send-order.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
…6046) The runner excluded *.electron.test.ts with a CLI --exclude, but main's switch to Vitest inline projects (#25967) gave each project its own exclude list, which overrides the CLI one. The directory selectors then pulled profile-state-writer-stall.electron.test.ts into the glibc-floor and musl orcad-template jobs, which have no xvfb. Resolve the exact files with vitest list and drop Electron and cross-runtime ones before running. Co-authored-by: m4air <m4air@Mac.localdomain>
ELI5
Start slow tests early across Bun and Node, instead of finishing Bun's project before beginning Node's. Every test still runs in its own isolated worker.
What Changed
Why
Measured before/after on macOS arm64 (M4 Max, Node 24.20.0, Bun 1.4.2, 16 file workers):
Both 1,000-file samples passed with 9,712 cases, identical per-file outcomes and 71 existing skips. The component improvements are separate experiments and must not be added together. The CLI experiment emitted all 3,300 JavaScript outputs byte-identically; its separate required typecheck remains in CI.
The full-suite row is cumulative across #25840 and this PR, not an isolated before/after measurement of this PR alone. It uses the frozen earlier checkout: all 11,048 files and prior cases remained, and one additional routing-policy assertion brought the after total to 108,364. The 849 existing skips were unchanged; both runs passed. The 2× full-suite target is still unmet. Shared-server, native factory-bridge, cache and alternative transport experiments were slower, incomplete or failed, and are excluded from claimed improvements.
The branch is rebased onto main at 51062e6 and supplies the launch-argument dependency missing from a scripted Codex fixture introduced by newer main commits. Before the latest main update and the additional Node lifecycle routing, its full local suite passed: 11,229 files / 110,105 cases in 606.2s, zero errors. Latest-head validation is listed below; these full-run timings describe the earlier matched checkout. The original Node/Vitest setup collected exactly the same files/cases/skips in 823.9s, but failed two existing filesystem deadlines that the candidate passed; that failed run is not a passing-speedup comparison. The frozen-checkout timings above are not a benchmark of these newly added suites.
Linked Issue
Maintainer follow-up to #25840; no separate issue.
Visual Proof
N/A — test-runner infrastructure and a YAML parsing correction; no rendered UI or interaction changes.
Testing
macOS arm64: full frozen-checkout qualification; matched sample coverage comparisons; rebased
pnpm tc,pnpm lintandpnpm run check:code-quality:changed; scheduling/shard/routing checks; focused YAML, SSH cancellation and Claude child-cleanup tests. The rebased full suite, fullpnpm lintand typecheck passed. The same-source Node baseline had two deadline failures. The Bun/Vitest 4 full comparison collected identical coverage in 692.0s but failed one existing watcher deadline; it is not a passing-speedup comparison. Latest-main typecheck, full lint, and all 23 additionally routed store-lifecycle suites (139 cases) passed. Exact-head CI completed with 35 successful checks, five existing conditional skips and no failures. All five unit shards and Linux/macOS/Windows platform checks passed. Real-desktop computer tests remain paused locally.Review
Fixture cleanup, runtime routing, sorting and coverage reviewed. The two post-merge bot findings are fixed by #25998, merged as
3308ff8b269a828738819f85f72841e8170bf895: pre-conversion YAML merge bounds (including !!omap/!!pairs) and SQLite classification for mixed default/type-only bindings and empty imports. All five unit shards and the complete current-head PR workflow passed; CodeRabbit reviewed that fix head with no actionable comments. Both original review threads now link the merged proof and are resolved. The earlier module-mocking comment was fixed by dependency injection before merge. Paths use Node path utilities; the Node worker uses the existing cross-platform process launcher. No application runtime, SSH protocol or remote execution-boundary migration.Agent skill upstream boundary
Notes
Preserve Node's SQLite and native-module behavior. No removed assertions, added skips, relaxed deadlines, reduced workloads, dependency patches, native loader or worker reuse.
Checklist