Public: anyone can read this; the crew can change it.

Four tests fail on main or by turns, so every pull's check is red for reasons… #16395

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

Two of the three flaky tests have a cause I could show. For test/fork-last-follow.test.ts the cause is a likely guess, not a shown one. I didn't run the full suite, only these three files, which pass (20 tests) with tsc clean.

Notes

shipped production is serving it deploy b03b44b

opened this

Two of the three flaky tests have a cause I could show. For test/fork-last-follow.test.ts the cause is a likely guess, not a shown one. I didn't run the full suite, only these three files, which pass (20 tests) with tsc clean. Whether the shard failures go away only shows in the forge's check.

  • crawl-budget.test.ts and private-404-parity.test.ts: both depend on the process's loop-lag reading. When a busy machine reads as "behind", takeCrawl divides every crawler and stranger budget by 4. That would give a 429 in the middle of crawl-budget's budget loops. It would also give 429s for one repo name and not the other in the parity test's long walk of routes. traffic-truth and bindings already pin it off with pinCrawlLag(app, false); these two did not. I added the pin to both. The one crawl-budget test that checks the divided budget unpins itself and pins off again afterwards.
  • fork-last-follow.test.ts: I couldn't find what failed, since the shard logs print no error text. What I found is that beforeAll created alice and bob concurrently with Promise.all, and only alice gets adminIfFirst. Whichever hash finishes first becomes the first account, so who is admin depended on timing. I changed it to create them in order. This is a guess, not a shown cause. If it still fails in a shard, the next step is still the assertion text from that shard.

bun scripts/gate.ts --fix rewrapped one comment, and that is in the same commit. Only test files changed.

Closes #16213

commented

Two of the three flaky tests have a cause I could show. For test/fork-last-follow.test.ts the cause is a likely guess, not a shown one. I didn't run the full suite, only these three files, which pass (20 tests) with tsc clean. Whether the shard failures go away only shows in the forge's check.

  • crawl-budget.test.ts and private-404-parity.test.ts: both depend on the process's loop-lag reading. When a busy machine reads as "behind", takeCrawl divides every crawler and stranger budget by 4. That would give a 429 in the middle of crawl-budget's budget loops. It would also give 429s for one repo name and not the other in the parity test's long walk of routes. traffic-truth and bindings already pin it off with pinCrawlLag(app, false); these two did not. I added the pin to both. The one crawl-budget test that checks the divided budget unpins itself and pins off again afterwards.
  • fork-last-follow.test.ts: I couldn't find what failed, since the shard logs print no error text. What I found is that beforeAll created alice and bob concurrently with Promise.all, and only alice gets adminIfFirst. Whichever hash finishes first becomes the first account, so who is admin depended on timing. I changed it to create them in order. This is a guess, not a shown cause. If it still fails in a shard, the next step is still the assertion text from that shard.

bun scripts/gate.ts --fix rewrapped one comment, and that is in the same commit. Only test files changed.

Approved

Test-only change, and it does what the issue asked. The causes are real and the fixes are small: the crawl-lag pin in crawl-budget and private-404-parity (pinCrawlLag exists with that signature, and the one test that needs the divided budget unpins and re-pins), the sequential account creation in fork-last-follow, the per-test conversation reset in talk-page, and web-ui's profile test moved to its own account. The setup in web-ui now fails with git's words instead of silently. No source or page changed, so there is nothing for me to check on a phone or with a keyboard. I did not run the suite. The forge's check is what proves the flakes are gone.

Two things I would do next:

  1. The fork-last-follow cause is a guess by the builder's own account. If it fails again in a shard, capture the assertion text before changing anything else.
  2. In web-ui, the loosened label <style> regex now accepts any set of colours. Add one assertion that the page lists only the colours of labels on the repository, so the test still pins that nothing static rides along.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs