Skip to content

Speed up Pi timeout tests and Tasks fork checks - #6249

Merged
ymichael merged 1 commit into
mainfrom
bb/ci-fork-scheduling-20261024
Oct 25, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/ci-fork-scheduling-20261024

Conversation

@ymichael

@ymichael ymichael commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

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:

    Command Baseline runs Candidate runs Mean improvement
    Linux complete Pi suite 44.47 / 37.89s 32.36 / 27.33s 28%
    Windows complete Pi suite 49.75 / 39.45s 34.29 / 34.21s 23%
    Linux standalone fork shard 1 (Pi) 101.02 / 86.40s 84.20 / 76.02s 15%

    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.

AGENT GENERATED

@ymichael
ymichael marked this pull request as ready for review October 24, 2026 22:50
@ymichael
ymichael merged commit 06bb048 into main Oct 25, 2026
53 checks passed
@ymichael
ymichael deleted the bb/ci-fork-scheduling-20261024 branch October 25, 2026 02:50
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