Skip to content

[CI] Run the SQLite responsiveness test after other suites - #26015

Merged
nwparker merged 1 commit into
mainfrom
nwparker/node-event-loop-measurement-order
Oct 7, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/node-event-loop-measurement-order

Conversation

@nwparker

@nwparker nwparker commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Run the real Node responsiveness measurement after ordinary test suites finish, so it measures the SQLite reader with less interference from other workers.

What Changed

Give ordinary Bun and Node projects execution group 1, and the existing event-loop measurement a dedicated Node project in group 2. Exclude that file from every ordinary project so it still runs exactly once. Apply the same ordering to the stock Node fallback. Keep the real clock, workload, three assertions, deadlines, six setup files, Node flags and Windows worker limit.

Extend the existing configuration and shard contracts to protect that ownership, runtime routing and complete shard partition.

Why

The unchanged measurement passed alone but failed its event-loop occupancy comparison in two complete concurrent runs. Running it after other test bodies and hooks finish provides a direct way to limit test-worker interference without weakening its contract. Vitest starts prior worker termination before advancing groups but does not await every process exit at that boundary; unrelated host activity can still affect a real-clock measurement.

Before/after evidence on macOS arm64, M4 Max, Node 24.20.0, Bun 1.4.2, Vitest 5.0.3:

Scope Before After
Unchanged measurement in complete 16-worker runs Occupancy assertion failed twice: worker active 31.3 / 32.5ms, inline active 99.0 / 100.8ms All three original measurement assertions passed with the measurement scheduled last
File/case coverage in those reports 11,299 files / 110,854 cases / 860 existing skips Same file set, counts and skips; no case removed
Actual tracked-config probes, Bun and Node fallback Ordinary and measurement projects could execute together Four passing ordering probes: other afterAll hooks complete 302–326ms before measurement begins; worker active 1.1–1.4ms versus inline 43.0–44.3ms
Two-shard discovery under both coordinators Existing complete partition Three files / 23 cases appear once across both shards, with complete assignment and timing reports

The complete grouped experiment used frozen combined source e7745b7d1b91 plus an ignored equivalent grouping config. It took 586.2950s and did not pass the whole suite: my experimental direct launcher omitted pnpm's environment, causing one native-rebuild invocation assertion to fail. The preceding 612.3299s run failed only the measurement. These failed process timings are not a speedup comparison. The native invocation contract then passed with the correct pnpm launcher under both coordinators. A second complete run used the tracked grouping on combined source 6ccaf42122448 through standard pnpm test --maxWorkers=16. The unchanged Node measurement passed again. The full run still failed four other cases (a fixed-wait Git upgrade assertion, two real runtime contracts, and large-file fixture cleanup). Its 959.1470s includes a competing full Vitest run in another workspace and is unsuitable for a performance comparison. The probes are smaller, quieter workloads and are not a matched full-suite performance benchmark. This PR claims ordering and retained coverage, not a quantified speed gain or proof of the original failure's cause. The separate 2× full-suite goal remains unmet.

Linked Issue

Maintainer-requested follow-up to #25967 and #25998. The measured fixture improvements and localization runtime change remain in #26000 and #25999.

Visual Proof

N/A — test scheduling and test contracts; no rendered UI or interaction changes.

Testing

  • I manually tested these changes locally
  • Automated tests updated

Tracked config: both Bun/custom-Node and stock Node fallback pass the ten-file infrastructure/routing/native fixture set (51 cases plus four unchanged Windows-only skips). Both also pass the one-worker edge (three files / 23 cases). The measurement uses actual Node with --no-experimental-webstorage, --expose-gc, exposed gc and background launch. The complete tests-and-hooks barrier is verified under both coordinators at one and two workers.

Actual --shard=1/2 and 2/2 runs under both coordinators preserve the full three-file discovery universe, valid selection provenance, exact-once union, and per-shard passed timing reports with zero unhandled errors. Node typecheck, changed-code quality, formatting and commit hooks pass. CI covers remaining platforms; local tests run with background launch.

Reproduce the focused set through the standard entry points, which retain pnpm's launcher environment:

ORCA_BACKGROUND_LAUNCH=1 pnpm test config/scripts/ci-shard-assignment.test.mjs config/scripts/ci-unit-sequencer.test.mjs config/scripts/vitest-runtime-sequencer.test.mjs config/scripts/ensure-native-runtime.test.mjs src/main/foreign-sqlite-readers/foreign-sqlite-reader-event-loop.test.ts --maxWorkers=2
ORCA_BACKGROUND_LAUNCH=1 pnpm test:node config/scripts/ci-shard-assignment.test.mjs config/scripts/ci-unit-sequencer.test.mjs config/scripts/vitest-runtime-sequencer.test.mjs config/scripts/ensure-native-runtime.test.mjs src/main/foreign-sqlite-readers/foreign-sqlite-reader-event-loop.test.ts --maxWorkers=2

Review

Reviewed project ownership, actual Node pool, flags and setup inheritance, Node fallback, one-worker ordering, Windows limit and installed Vitest's shard-before-group execution. No measurement workload, assertion, threshold or deadline changed.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied.

Notes

No application runtime, native binary, UI, SSH protocol or remote wire changes. Platform behavior stays behind existing runtime checks.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Visual proof is N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform and SSH/remote impact considered
  • Relevant local checks pass; CI covers remaining repository checks

@coderabbitai

coderabbitai Bot commented Oct 7, 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: 4e7e5cc0-bcde-4aad-9b0b-efe614fe91f7
📥 Commits

Reviewing files that changed from the base of the PR and between 9c6702b and 7a2d4b6.

📒 Files selected for processing (3)
  • config/scripts/ci-shard-assignment.test.mjs
  • config/scripts/ci-unit-sequencer.test.mjs
  • config/vitest.config.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

Vitest now defines projects for ordinary Node tests, Bun tests when running under Bun, and a separate single-worker Node measurement test. The project configuration applies in all runtimes. Tests now check project settings and verify shard assignments and shard-file coverage.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 7a2d4

The scheduling change is mergeable after normal checks; the separate full-suite performance goal remains unproven.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
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 states the main change: running the SQLite responsiveness test after the other suites.
Description check ✅ Passed The description covers the required sections, explains the change and its motivation, links the maintainer-requested follow-up issues, and gives detailed testing results. It also explains why visual p…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

@nwparker
nwparker merged commit 3fb72d1 into main Oct 7, 2026
30 checks passed
@nwparker nwparker changed the title Run the SQLite responsiveness test after other suites [CI] Run the SQLite responsiveness test after other suites Oct 9, 2026
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