You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
per-host-throttle sequential-mode test fails under load (expected >= 30 ms) #1521
apps/cli/tests/crawler/per-host-throttle.test.ts "sequential mode (perHostConcurrency=1) still spaces starts by the delay" is timing-sensitive and fails on a loaded CI runner. It measures Date.now() deltas between the starts of five fetches and requires each gap to be at least DELAY * 0.6 (30 ms for a 50 ms delay). On a busy runner the timer fires early or the clock reads round, and a gap of 27 ms was observed: Expected: >= 30. The crawler behaves correctly; the assertion is too tight for a wall-clock measurement on a shared machine.
Seen once on a draft PR's CLI tests job (the PR changed nothing in the crawler). It reddens a PR check for no product reason.
Acceptance Criteria
The test no longer depends on a wall-clock gap of at least 30 ms: it either uses a fake or injectable clock, or asserts a tolerance that load cannot break (for example at least 40 percent of the delay, or the ordering of starts plus a total elapsed time over the sum of the delays).
The test still fails if the single slot collapses to back-to-back fetches (gaps near zero): a mutation that removes the per-host delay makes it fail.
50 consecutive runs of the file with the machine under load (for example a parallel CPU burn) pass.
Activity
nc9 commentedon Nov 2, 2026
Duplicate of #1516. The fix landed in v0.0.158 as d200773 and f4a8e93 (via #1522): the sequential-mode test asserts the median of the start gaps and the total span, each with a margin of more than 2x. An independent check ran the file 8 of 8 times with 6 busy processes alongside. Closing as a duplicate. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.158
nik