Repository navigation
Reduce host test setup and lifecycle waits - #6234
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
Five host plugin lifecycle tests spent about 31 seconds waiting for real cancellation grace periods and survivor calls. A directory-merge regression also created and deleted 150,000 empty files just to exercise merging a large listing. Host fixtures also spawned Git three times per repository to set fixed configuration values and rebuilt the same three-file Git reader fixture repeatedly. Faster setup exposed an existing fixture collision: independent squash-check tests could create identical commits within one second, allowing an earlier content-addressed result to bypass a later test's injected timeout.
What changed
finally. The 1500ms cold-start regression remains unchanged.initRepocall while preserving platform/template settings. Build the Git reader fixture once and copy the full repository for each test, with independent refs, objects, index, worktree, and cleanup.finally, and remove the large disk-fixture timeout.Only tests and test support change. No production, cache invalidation, CI selection, shard count, or worker count changes.
How you verified
Combined host execution benchmark: two baseline/candidate replicas on four-vCPU Linux and Windows runners, Node 22, with an empty Turbo cache. It compares all changes against the PR base and runs the daemon and CLI with Turbo concurrency 1, the same package selection and concurrency as the Windows host test job. All eight runs passed with unchanged inventories: Linux 1,699 passed/9 existing skips; Windows 1,667 passed/40 existing skips.
Windows daemon task alone fell from 50.3–79.9s to 23.2–31.5s. The path-listing file fell from 32.8–69.7s to 1.10–1.69s; the lifecycle file from 41.1–47.8s to 8.2–10.1s. Runner variability is substantial, especially for the disk-heavy baseline. These are measured package-command gains from two runs per variant, not a claim that the whole CI workflow becomes 48% faster.
Git fixture benchmark: all eight runs passed. Windows workspace task improved from 25.4–26.2s to 22.6–24.2s; Git reader file from 9.49–9.71s to 7.11–7.49s. This smaller change did not consistently improve the combined three-package command.
Local verification through Turbo:
results.push(...childResults)failed both old and new directory tests with the sameRangeError: Maximum call stack size exceeded; the restored candidate passed all 10 cases. Restored focused tests passed; production sources were restored byte-for-byte.03af7872cc5eb770d04c08bd6acb3a1de43f3324; all checks are green or non-applicable skips.Benchmark workflows live on separate branches and are excluded from this PR.