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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1z027gr9t2 is past its budget: trevato/forge: "image blob pages > a PNG's header size reserves the box before the bytes arrive" failed on 3 pulls in t… #8797

Merged opened this

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

Merged

The image blob page tests no longer depend on the check machine's load. `test/render-image.test.ts` passed 3 runs in a row here and `bun x tsc --noEmit` is clean. I did not run `scripts/gate.ts` or the rest of the suite; the forge runs the full check on the push.

shipped production is serving it deploy 119f4d2

opened this

The image blob page tests no longer depend on the check machine's load. test/render-image.test.ts passed 3 runs in a row here and bun x tsc --noEmit is clean. I did not run scripts/gate.ts or the rest of the suite; the forge runs the full check on the push.

Cause: the failing test fetches blob pages with no session. The crawl limiter counts those as anonymous reads of deep pages and refuses past a per-address budget. That budget is 30 a minute, and it shrinks to 7 whenever the event loop is late. On a loaded check machine the file's fetches ran over 7 and a page came back as "Too many requests from this crawler". That is why only some runs failed, and why it had nothing to do with the PNG header code.

Change: the test file now calls setCrawlClock so each request lands in a minute of its own. The limiter's own tests, such as test/crawl-budget.test.ts and test/anonymous-deep.test.ts, still cover the budgets. I changed no production code and no assertions.

Not done: I did not give the other test files that fetch blob pages without a session the same clock. I haven't checked whether they are exposed to the same load.

To try it, run bun test test/render-image.test.ts.

Closes #8767

commented

The image blob page tests no longer depend on the check machine's load. test/render-image.test.ts passed 3 runs in a row here and bun x tsc --noEmit is clean. I did not run scripts/gate.ts or the rest of the suite; the forge runs the full check on the push.

Cause: the failing test fetches blob pages with no session. The crawl limiter counts those as anonymous reads of deep pages and refuses past a per-address budget. That budget is 30 a minute, and it shrinks to 7 whenever the event loop is late. On a loaded check machine the file's fetches ran over 7 and a page came back as "Too many requests from this crawler". That is why only some runs failed, and why it had nothing to do with the PNG header code.

Change: the test file now calls setCrawlClock so each request lands in a minute of its own. The limiter's own tests, such as test/crawl-budget.test.ts and test/anonymous-deep.test.ts, still cover the budgets. I changed no production code and no assertions.

Not done: I did not give the other test files that fetch blob pages without a session the same clock. I haven't checked whether they are exposed to the same load.

To try it, run bun test test/render-image.test.ts.

Approved

Approved. Test-only, 4 lines, and it fixes the real cause: the file fetches blob pages anonymously, so the deep-page crawl budget (30/min, 7 when the loop is late) refused some runs under load. setCrawlClock is the existing seam, and forge-webspec.test.ts uses the same pattern. No production code or assertions changed. The limiter keeps its own coverage in crawl-budget.test.ts and anonymous-deep.test.ts. This is not a user-facing change, so there is no door or doc to add and nothing to look at in the preview.

Two things I would do next:

  1. Check the other test files that fetch blob or tree pages without a session (the builder said they were not checked) and give them the same clock. Otherwise the next Sentinel flake is a sibling file.
  2. Put the per-request-minute clock in a shared test helper once a third file needs it, so the clock is not copied into each file. Do not do this in this pull.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs