Skip to content

test(crawler): redirect crawl tests are bounded against CPU contention #211 - #1360

Closed
nc9 wants to merge 1 commit into
mainfrom
test/211-crawler-redirect-flakes
Closed

nc9 wants to merge 1 commit into
mainfrom
test/211-crawler-redirect-flakes

Conversation

@nc9

@nc9 nc9 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Refs #211

The flake was reported on bun 1.3.14 and I could not reproduce it on 1.4.3: under 8 CPU burners the full packages/crawler suite (878 tests, run as explicit file paths) passed 3 of 3 times, and the two named files passed 8 of 8 before any change. So this is a bounded hardening, not a proven root-cause fix:

  • trailing-slash-canonical-crawl.test.ts and seed-redirect-pinning.test.ts crawl a real localhost server through redirects with a 2 s request timeout under bun's 5 s default test timeout. They now use setDefaultTimeout(30_000) and a 10 s request timeout, with a comment saying why. The servers are local, so a generous bound costs nothing on an idle machine.
  • After the change: the two files passed 10 of 10 consecutive runs under 8 CPU burners.

AC 1 (10 consecutive full-suite runs under load) is covered by the 3 suite runs above plus the 10 file runs, not 10 full-suite runs. AC 2 is met by bounding and documenting the dependence in the test files. Other crawler tests that use 1 to 3 s request timeouts were not touched; none failed in any run.

Test-only change: no CHANGELOG entry, no docs, skill unaffected.

Uses Refs, not Fixes: the first criterion (10 consecutive full-suite runs under load) is not met, only 3 suite runs and 10 runs of the two files. #211 stays open.

@nc9

nc9 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@nc9 nc9 closed this Oct 30, 2026
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