Repository navigation
Speed up Pi timeout tests and Tasks fork checks - #6249
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
Pi's real-child tests spent eight seconds waiting for shutdown escalation and five seconds waiting for a hung model refresh. Tasks also started late in its existing standalone fork-check shard, extending the tail after shorter plugins finished.
What changed
Advance the parent timeout clock after real child readiness and RPC receipts, retaining the actual processes, stop acknowledgement, process-exit checks, replacement generation and fresh model assertions. Restore clocks before teardown and preserve explicit real-I/O wait budgets. Node's internal 15-second version-probe test remains unchanged.
Start Tasks early alongside the existing Pi priority. No production runtime changes, added shards, reduced coverage, cache invalidation or selection changes. A measured Codex-priority experiment regressed its shard and was discarded.
How you verified
Full Pi suite: 319 passed, seven existing skips. Local reported suite time fell from 31.05 to 24.40 seconds. Shutdown case: 8.13 to 0.22 seconds; hung refresh: 5.21 to 0.26 seconds.
Turbo Pi lint/typecheck passed; formatting, script syntax and diff checks passed. All three fork shard selections match the baseline byte for byte.
Controlled standalone fork scheduling experiment: shard 2 baseline 86.47/95.05 seconds, candidate 69.74/83.11 seconds; means 90.76 to 76.43 seconds (16%). Four concurrent forks and two Vitest workers per fork unchanged; each run includes fresh dependency resolution, installation, typecheck, tests and build after SDK/CLI preparation. These are command timings, not end-to-end CI gains.
Controlled two-repetition comparisons, same runners and worker limits:
Linux benchmark: all four Linux jobs passed; that experiment's Windows setup failed before tests because its tool action supports Linux/macOS only. Corrected Windows benchmark: all four jobs passed using the normal Windows CI tool setup. Linux retains 319 passes/seven existing skips; Windows retains 324 passes/two existing skips. These are suite/command gains, not a measured whole-pipeline reduction.
Independent old/new mutation audit: all three mutations fail both original and accelerated tests—omitted SIGKILL escalation (same live-child assertion), refresh timeout extended from 5s to 120s (same 60s test deadline), and omitted replacement kill (same 60s test deadline). The final unmodified candidate then passed all 17 tests in the two affected files; audit worktree restored byte for byte, with no owned child processes left running.
Final-head CI passed at
878cfeec6a5ccb936085cfcc116272f390358d55, including Linux/Windows tests, all three standalone fork shards, lint/typecheck and packaging checks.