Repository navigation
test(ci): double test deadlines on hosted runners - #10417
Merged
Merged
Conversation
…dline Each case runs about 22 s of CPU-bound projection on a typical hosted runner. Its explicit 30 s deadline failed on slower runners at both two and four Vitest workers, and it also overrode the suite's 60 s coverage-mode allowance.
Hosted CI jobs run four Vitest workers on a four-core runner. CPU-bound capacity cases then share every core with other workers and their subprocesses; three such cases exceeded the 30 s deadline at four workers (16.8-22.7 s at two). The deadline only needs to bound a hang, so hosted CI doubles it: 60 s, or 120 s with coverage. Local runs keep 30 s and 60 s.
Contributor
[Medium impact] The reviewed changes appear safe to merge. SummaryThis PR gives tests more time on GitHub Actions while keeping local defaults unchanged.
The earlier CI test failure is fixed. No new actionable issues or security problems were found. Tests were not run during this review. Reviews (4) · Last reviewed commit: "test(ci): check worker and deadline poli..." · Reviewed by Greptile |
The policy test loaded vitest.config.ts in a child that inherited the parent's GITHUB_ACTIONS, so on CI it observed the hosted deadlines and failed. Select the runner explicitly and check both: two workers and the base deadline locally, four workers and twice the deadline on hosted CI.
morluto
force-pushed
the
perf/ci-four-workers
branch
from
November 13, 2026 20:12
9c1fd84 to
2596d90
Compare
morluto
marked this pull request as ready for review
November 13, 2026 20:13
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
9 of 19 tasks
This was referenced Nov 13, 2026
3 of 11 tasks
2 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Main runs four Vitest workers on hosted CI (#10399). On a four-core runner, CPU-bound capacity tests then share every core with other workers and their subprocesses, and three of them exceeded the 30 s test deadline. This keeps four workers and doubles the deadline on hosted CI only. The deadline exists to catch hangs, not to enforce speed.
Fixes main's CI. Since #10399, every PR fails a shard or source tests on a contention timeout. This PR includes #10413's commit (the fingerprint test's own deadline); merging this makes #10413 and the revert #10402 unnecessary. A passing run executes all eight shards, so its timings also measure four workers against two.
Problem and expected behavior
Timeouts observed in CI today (executed, observed):
semanticFingerprintAccumulation(direct / transferred)appTaskDraftModel(2,000,000 numbers)conformanceFixtureVerifier(REA_C_ENTRY)The fingerprint cases also failed at two workers on a slow runner (35 s); #10413 gives them an explicit 60 s deadline.
So far nothing measures the speedup: in #10399's run, fail-fast cancelled seven of eight shards. This run is that measurement.
Expected: no timeouts from contention, and shorter shard jobs than the two-worker baseline.
Change and scope
vitest.config.ts:testTimeoutis(coverage ? 60_000 : 30_000) × (GITHUB_ACTIONS ? 2 : 1). Local runs are unchanged.docs/development/testing.md: states the deadlines.semanticFingerprintAccumulation60 s via test(javascript): give the wide fingerprint regression a capacity deadline #10413,wideOccurrenceCompletion45 s, andmcpDoctorprobes 10 s. This run checks them.tests/boundary/filesystem/ciTestProjects.test.ts: checks the worker and deadline policy for both local and hosted runners with an explicitGITHUB_ACTIONS. It previously inherited the CI value and failed (Greptile review).Not included: per-project worker limits. Vitest requires projects selected in one invocation to share
maxWorkers(see f47ee1a), and full qualification runs every project in one invocation.Contribution scope: not applicable.
Contract and boundary impact
Semantic owner and earliest changed stage:
vitest.config.tsworker and deadline policy.Contribution scope fit and linked maintainer decision: not applicable.
CLI and MCP/tool-catalog contract: none.
Provider, bridge, target-format, or platform compatibility: Windows and macOS CI lanes also set
GITHUB_ACTIONSand get the longer deadline.Evidence, artifact, provenance, or reconstruction contract: none.
Target selection, authority, upstream behavior, and cleanup details (if applicable): a hung test now takes up to 60 s (120 s with coverage) to fail on CI.
Generated metadata, package, or installation impact: none.
Read existing files or captured data.
Launch or attach to a process.
Inject instrumentation or run scripts/code.
Change process memory, registers, files, or configuration.
Contact network services.
Recover protected code or work around protections.
Documentation or usability only; no target interaction.
Not sure yet; investigation or maintainer guidance needed.
Evidence and regression coverage
ciTestProjects.test.tsworker/deadline policy, local and hosted.Validation performed
npx vitest run tests/boundary/filesystem/ciTestProjects.test.ts -t "worker resources"— 16 passed, both without and withGITHUB_ACTIONS=truein the parent.GITHUB_ACTIONS=true npx vitest run --project evaluation— 23 files, 500 passed, 2 skipped (config loads under the CI flag; local macOS, Node 24.22.1).npx oxfmt --check .(the repository formatter) — passed.npx tsc --noEmit -p tsconfig.json— passed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.