Skip to content

test(ci): double test deadlines on hosted runners - #10417

Merged
morluto merged 3 commits into
mainfrom
perf/ci-four-workers
Nov 13, 2026
Merged

morluto merged 3 commits into
mainfrom
perf/ci-four-workers

Conversation

@morluto

@morluto morluto commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

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):

Test 2 workers (baseline) 4 workers
semanticFingerprintAccumulation (direct / transferred) 22.2 s / 22.7 s 39.6 s / 46.1 s
appTaskDraftModel (2,000,000 numbers) 16.8 s 32.7 s, timed out
conformanceFixtureVerifier (REA_C_ENTRY) passed 31.8 s, timed out

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: testTimeout is (coverage ? 60_000 : 30_000) × (GITHUB_ACTIONS ? 2 : 1). Local runs are unchanged.
  • docs/development/testing.md: states the deadlines.
  • Explicit per-test timeouts are not scaled. Three are known: semanticFingerprintAccumulation 60 s via test(javascript): give the wide fingerprint regression a capacity deadline #10413, wideOccurrenceCompletion 45 s, and mcpDoctor probes 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 explicit GITHUB_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.ts worker 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_ACTIONS and 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

  • Tests added or updated: ciTestProjects.test.ts worker/deadline policy, local and hosted.
  • Base reproduction or other evidence: timings above, from runs 43460768388, 43485746121 and refactor(cli): run one-shot commands through one shared owner #10405's run.
  • User-visible CLI/MCP output (if applicable): not applicable.
  • Remaining proof gaps:
    • Shard and source-test times at four workers: pending this run. Baseline from six recent two-worker PR runs: slowest shard 985–1,049 s (median 990 s), eight-shard total median 6,600 s, source tests median 420 s.
    • One run does not establish flake rate.
    • Full tier (coverage, six shards) is not exercised by a PR run.

Validation performed

  • npx vitest run tests/boundary/filesystem/ciTestProjects.test.ts -t "worker resources" — 16 passed, both without and with GITHUB_ACTIONS=true in 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

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

…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.
@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge.

Summary

This PR gives tests more time on GitHub Actions while keeping local defaults unchanged.

  • Hosted GitHub Actions test runs get twice the Vitest deadline.
  • Fingerprint projection tests get a 60-second deadline.

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

Comment thread vitest.config.ts Resolved
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
morluto force-pushed the perf/ci-four-workers branch from 9c1fd84 to 2596d90 Compare November 13, 2026 20:12
@morluto
morluto marked this pull request as ready for review November 13, 2026 20:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T20:14:39.555411Z 2596d90 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit cc7d73d into main Nov 13, 2026
8 of 11 checks passed
@morluto
morluto deleted the perf/ci-four-workers branch November 13, 2026 20:17
@morluto morluto added the area: build Build, CI, packaging, and publishing label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant