Repository navigation
test: pace the early-boot pack test so a slow runner has two seconds, not half of one - #76
Merged
Merged
Conversation
…two seconds The dev server sends 64 kB at a time, and the download first publishes its forward index at 256 kB. The frame may boot from the fourth slice, and the download ends with the fifth, so the test had one slice's interval to plan, fetch and attach the pack's parts: half a second at 128 kB/s. Passing runs used 0.16 to 0.43 s of it, and a Firefox runner on main used more, so the load went through `indexing`. At 32 kB/s the interval is two seconds, and the test takes about six instead of two. Closes #75 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 23, 2026
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.
Closes #75.
pack.test.ts> "attaches the parts while a download from a host without Range is under way" now paces its archive at 32 kB/s instead of 128 kB/s.Why it failed
sendThrottled). The download first publishes its forward index at 256 kB (FIRST_FLUSH_SIZEin the chunk writer).readyat 1.66 to 1.93 s, using 0.16 to 0.43 s of that window. Onmainafter ci: install Chromium and Firefox without their system packages #74, a runner needed more, and the load went throughindexingas a whole download does. That load's late path took about 0.9 s after the download ended.The change
At 32 kB/s the interval is 2 s, four times what it was and twice what that slow runner needed.
The comment in the test now explains where the window comes from, instead of saying the library folder "arrives seconds before its media". The library folder is in the first 3 kB.
libraries.test.tspaces the same fixture at the same rate, but its assertions hold whichever path wins, so it is unchanged.Testing
Run locally, the whole of
pack.test.ts: 15 of 15 pass in Chromium and in Firefox. This test took 6.1 s in each.🤖 Generated with Claude Code