Skip to content

Remove unnecessary waits from host package tests - #6231

Merged
ymichael merged 2 commits into
mainfrom
bb/ci-host-test-waits
Oct 24, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/ci-host-test-waits

Conversation

@ymichael

@ymichael ymichael commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The Windows host-package job finished last in the previous full CI run. Its ACP suite spent 30 real seconds waiting for a command timeout, and the process-identity test ran three expensive Windows identity lookups sequentially even though its two refusal checks are independent.

What changed

  • Advance the ACP command timeout with fake timers after the real hung child reports readiness. Preserve the error and missing-result assertions, and verify that the child exits. Always advance the deadline during cleanup, including readiness/assertion failures, and restore real timers in finally.
  • Run the wrong-command and wrong-start-time refusal checks concurrently, preserving their individual results and liveness assertions. Wait for both before the real successful stop. All three fresh OS identity reads remain.

Only two test files change. No production behavior, mocks, test-only production hooks, shard counts, or worker counts change. Existing test cases remain.

How you verified

Local baseline and candidate runs through Turbo reduced the three ACP failure cases from 30.09s to 0.167s. The process-identity test was unchanged at roughly 0.13s on macOS; its benefit is Windows-specific.

Full local package suites passed: ACP 538 passed / 4 existing skips, config 101 passed / 1 existing skip. Lint/typecheck passed (five Turbo tasks), formatting and diff checks passed. Reviewed against CODE_REVIEW and deslop guidance.

Windows comparison 40113506162 passed all four jobs: two baseline and two candidate replicas on four-vCPU runners, with the same nine packages and Turbo concurrency of two. Every run passed 2,265 tests with 24 existing skips.

Measurement Baseline replicas Candidate replicas
Entire host-package Turbo command 120.4s / 91.5s 80.1s / 81.0s
ACP bridge test file 83.6s / 69.1s 44.1s / 40.8s
Real process-identity test 43.6s / 33.7s 26.1s / 24.6s

The whole-command range improves by approximately 11–40s across these samples; components overlap, so their gains are not additive. This measures the host-package command, not total workflow duration. Both variants started with an empty task-cache directory. The benchmark predates only the failure-cleanup refinement; that refinement passed focused tests and lint/typecheck. A simulated readiness failure also failed promptly (1.38s including Turbo) without a pending-request teardown timeout, then was restored byte-for-byte.

Independent review and re-review of the cleanup refinement found no issues. Final PR CI 40113800821 passed all 37 selected jobs, including all 14 selected Windows jobs, on 1fcb0d9950. The final Windows host-package command took 82.0s, and its formerly 30-second timeout case took 396ms. Packaging checks were not selected for these test-only changes. All PR checks are green. Benchmark harness changes live on a separate branch and are excluded from this PR.

AGENT GENERATED

@ymichael
ymichael merged commit 55746d1 into main Oct 24, 2026
52 checks passed
@ymichael
ymichael deleted the bb/ci-host-test-waits branch October 24, 2026 18:13
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