Repository navigation
Reduce server test time and Windows package setup costs - #6227
Merged
Merged
Conversation
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.
Human comments
What was wrong
Linux server shards used only two Vitest workers on four-vCPU runners while each shard ran one package, leaving parallelism unused. Windows package smokes downloaded npm packages and native prebuilds again on every job. Provider parity launched 70 real bridge replays for 48 scenarios because separate conformance tests repeated 22 scenarios already covered by the self-suite. The update-resolver tests independently constructed the same eight-commit Git repository seven times, starting 245 Git setup processes. Both repeated work on the Windows CI path after #6222 and #6225.
What changed
_cacacheand_prebuildsfor the Windows app smoke, with exact dependency/Node/OS keys. Fresh npm/npx installations, scripts, metadata refreshes, and assertions remain. Installed_npxtrees and consumer directories are excluded. Hard restore failure/timeout leaves npm on its default cache; misses and suppressed restore errors clear partial downloads before activation. Successful misses save once, and exact hits remain immutable.An SDK compiler-reuse experiment produced identical declarations but inconsistent timing improvements, so it is excluded from this PR.
How you verified
Windows npm-cache comparison 40106037278 passed cold → restored-download → cold-again smokes on two runners: 50.9 → 37.3 → 43.0s, and 74.3 → 43.9 → 60.6s. Local archive creation took 1–3s and extraction 0–1s. On the final PR commit, the cold-cache job passed its package smoke in 36.8s and saved the cache successfully. The exact-hit rerun restored the 68 MB archive in 0.8s, passed the fresh-install smoke in 30.7s, and correctly skipped saving. The smoke steps including Turbo took 38s cold and 32s warm; the warm restore adds about 1s. These two jobs are an integration confirmation, with the repeated controlled comparisons above providing the broader timing evidence. Actual action code passed a local exact-hit/miss/suppressed-error check, including removal of simulated partial prebuild archives. Turbo dry-run confirmed that only the smoke receives the cache variable and the smoke remains uncached. CI selection/workflow tests passed (30 tests), and actionlint passed.
Server worker comparison 40104954325 ran both existing shards twice per worker setting on four-vCPU Linux runners. All four candidate jobs passed. The actual server test tasks took 66–79s with two workers versus 46–60s with four, excluding SDK prerequisites. Whole steps took 85/95s versus 63/70s for shard 1, and 99s versus 72/81s for shard 2. One additional two-worker baseline failed the unchanged bundled-dependency rebuild assertion and is excluded from successful timings. All arrangements discovered the same 3,681 cases (3,680 passing and one existing skip in passing runs); only generated timestamps in test names were normalized for inventory comparison.
Two controlled comparisons, 40104010818 and 40104177343, each passed all eight jobs: two baseline and candidate replicas on each of four-vCPU Windows and Linux runners.
The Git file measurements include shared fixture setup. The original busy main run took 14.5s for this file; the table uses the controlled comparison instead. These are component measurements, not additive whole-CI savings. The benchmark also tried the excluded compiler change; emitted declarations were byte-identical across both platforms, and compiler prerequisites are excluded from the Git file measurement.
Independent mutation verification made all five Pi conformance checks fail in both the old aggregate test and retained replay: dropped reply, invalid event schema, duplicate turn start, missing completion, and empty output. Dropped replies also failed both old and retained Claude/Codex tests at the intended check. All mutations were restored byte-for-byte; independent review found no issues.
Local Turbo validation passed: provider parity (59 tests), update resolver (15 tests, also shuffled with seed 104), SDK (402 tests during the rejected experiment), and lint/typecheck for server, provider parity, and SDK. Formatting and diff checks passed. Initial full PR CI 40104525770 passed all 41 selected jobs, including all 16 Windows jobs, on
ae0c029fb0. Worker-allocation full PR CI 40105491281 passed all 41 selected jobs, including all 16 Windows jobs, on85a4a88ce2, in 2m14s from workflow creation to final completion. Linux server steps took 74s and 56s; the previous PR run took 99s and 94s. Whole-workflow timing also includes cache and runner variability, so the controlled component comparison above is the evidence for the optimization. Final full CI 40107142996, attempt 1 passed all 41 selected jobs, including all 16 Windows jobs, ond6831a1d4e. That run took 4m17s from workflow creation, including 70s before the first job started; Windows host packages finished last. The exact-hit Windows app smoke rerun also passed on the same commit. No checks remain pending.