Repository navigation
Description
Summary
The Smoke check reads a Workers preview its own job published seconds earlier. On 2026-11-24 three CI runs inside ten minutes read 500 from assets that same preview serves correctly, reddening a required check on healthy commits.
#474 settled the measurement and fixed one read of the lane. It measured the window at about 25 seconds on #466, and gave the chunk crawl a bounded 5xx re-read (SETTLE_ROUNDS = 10 × SETTLE_WAIT_MS = 3_000) instead of leaning on the lane's immediate retry: 2. What remains is every other read of the preview, which is still one bare fetch — including /loader.js, the read that reddened run #470.
Approach
fetchPreview is one bare fetch (tests/smoke/_helpers/preview.ts:22), and 15 of the lane's 16 call sites read through it unchanged. Only the crawl's own read helper waits.
1. Move the budget into the helper, and export a settling read beside the raw one.
SETTLE_ROUNDSandSETTLE_WAIT_MSlive intests/smoke/embed.smoke.test.ts:65on test(smoke): wait out a settling edge before calling a chunk broken #474's branch. Move them to_helpers/preview.tsand export them: a second spec file declaring its own copy is the duplication test(smoke): wait out a settling edge before calling a chunk broken #474's critic already rejected once.- Add
fetchPreviewSettled(path, init?)there, which re-reads while the status is ≥ 500 or the fetch throws, for the shared budget, and returns the lastResponse. LeavefetchPreviewitself a raw read — a spec that wants the first answer must still be able to ask for it. - A thrown fetch belongs in the loop with the 5xx: one of the 12 later reads of feat(widget): open every embed inline; expand the map over the page #466's preview was a dropped connection, not a 500 (see
## Notes). It is not a status, so this does not widen the wait past the rule below.
2. Keep the crawl's batched loop; have it read through the helper's budget.
crawlFromLoader re-reads every unsettled path in one round, so N chunks share one wait instead of paying it serially — four chunks at the budget would be 120s read one at a time against 30s batched. That loop stays in embed.smoke.test.ts; what it stops owning is the two constants.
3. Point the single-path reads at fetchPreviewSettled. Each asserts a 200 and nothing asserts a 5xx anywhere in the lane, so none of them is weakened:
embed.smoke.test.ts:163/loader.jsand:36fetchEmbed's/auto.js— the two unhashed entry files, and/loader.jsis run feat(button): a floating variant for controls over the map #470's recorded failure.cache-headers.smoke.test.ts:103— a hashed/assets/*file read off the deployedindex.html, the same class of file that 500'd on feat(widget): open every embed inline; expand the map over the page #466.root.smoke.test.ts:14,spa-fallback.smoke.test.ts:21,boot-origins.smoke.test.ts:99and:112,robots.smoke.test.ts:22:48:60:77,cache-headers.smoke.test.ts:37:65:82:97.
4. Raise testTimeout once, in vitest.smoke.config.ts:11. It is 30s, which the 30s budget alone would exhaust before a spec could name the status — criterion 2. #474 solved that for the crawl with a 90s per-spec timeout; twelve more per-spec timeouts would be twelve places to keep above one budget. Raising the lane's own timeout costs no failure speed, because a non-5xx answer still fails on the first read with no waiting at all. Its cost is that a genuinely hung request holds a worker for the new timeout rather than 30s.
5. Leave retry: 2 alone (vitest.smoke.config.ts:16). #474's finding is that retry cannot buy the settling time, not that it buys nothing: it stays the outer net for a failure the settle loop does not model.
⚠ Do not widen the wait to a non-5xx status. A path the deploy does not hold answers the SPA shell with 200 text/html (assets.not_found_handling), never a 5xx, so every spec above still reports a missing or wrong file on its first read. That instant half is what the lane exists for, and docs/testing.md's second smoke invariant is why a status check alone would not see it.
Acceptance criteria
- A 5xx the preview stops returning inside the budget no longer fails any spec in the smoke lane, not only the chunk crawl.
- A path the preview cannot serve at all still fails Smoke on its first read, naming the path and the status, with no waiting.
- A path that 5xx's past the budget fails Smoke naming the path and the status, rather than timing out.
- The budget has one home. No spec file declares its own
SETTLE_ROUNDSorSETTLE_WAIT_MS. -
docs/testing.md's section on this covers the lane, not only the crawl, and still carries the ⚠ above. The measured window and the settled numbers stay in the one code comment beside them — test(smoke): wait out a settling edge before calling a chunk broken #474's critic rejected a second home for them, so do not copy them into the doc.
Verification checklist
-
PREVIEW_URL=<a preview published under a minute ago> pnpm test:smokepasses. - Watched against a stand-in deploy, as test(smoke): wait out a settling edge before calling a chunk broken #474 did, each in both directions: a path that 500s then heals passes; one that answers 200
text/htmlfails immediately; one that 500s for ever fails naming the path and the status, inside the lane's timeout. -
PREVIEW_URL=https://design.sahajatlas.com pnpm test:smokestill fails ten specs, so the lane is not vacuously green (docs/testing.md's own non-vacuity read). -
pnpm lint && pnpm typecheck.
Notes
This extends #474 and must land after it — it moves the two constants that PR introduces. #474 is open, green and reviewed, with no human verdict yet. No Blocked by: line: that marker takes an issue, and #474 closes none.
What was observed, all on 2026-11-24:
| run | job | read | result |
|---|---|---|---|
#470 45454784922 |
138661361480 18:00Z |
/loader.js |
500 on all three attempts |
#466 45454048767 |
138658567468 17:56Z |
/assets/InlineEmbedView-*.js, EventFacts-*.js, CalendarView-*.js |
500, and the set differed between its own retries (three, then two) |
#471 45455033534 |
— 18:02Z | the whole crawl | passed |
- On feat(button): a floating variant for controls over the map #470 every other required check was green, and the diff touched only
Button.tsx,SettingsMenu.tsxand their stories./loader.jsis built fromsrc/loader/. - The failing preview,
62520e66-sahajatlas-web, answered/loader.js200 with 3576 bytes on 11 of 12 later reads,cf-cache-status: HIT. The twelfth was a dropped connection, not a 500. So the uploaded version is correct and the lane's read of it was not. - feat(widget): open every embed inline; expand the map over the page #466's varying set of hashed chunks is what rules out a commit as the cause: no diff picks three chunks at random and a different three a second later.
- Smoke is a required check in the merge queue as well, so the same read can stall a merge rather than one pull request.
- The window is no longer unmeasured, and a fixed delay is no longer the shape of the fix: test(smoke): wait out a settling edge before calling a chunk broken #474 measured ~25s on feat(widget): open every embed inline; expand the map over the page #466 and bounded the re-read instead. This ticket inherits that budget rather than tuning a new one.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsAwaiting
Activity
Ardnived commentedon Nov 25, 2026
@sydevs-bot revise - check if any of the recent PRs already address this
sydevs-dispatcher commentedon Nov 25, 2026
🤖 no session running
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.
sydevs-bot commentedon Nov 25, 2026
One PR addresses part of it: #474, still open. Nothing else in the lane has moved since.
#474 measured the window at ~25s on #466 and gave the chunk crawl a bounded 5xx re-read. It leaves every other read of the preview a bare
fetch— including/loader.js(embed.smoke.test.ts:163), which is the read that reddened run #470, and the hashed/assets/*read atcache-headers.smoke.test.ts:103. 15 of the lane's 16 call sites still wait for nothing.So the ticket is not covered, and I rewrote it as the remainder: move #474's budget into
_helpers/preview.ts, add a settling read beside the rawfetchPreview, point the single-path specs at it, and raisetestTimeoutonce so a spec can still name the status instead of timing out. It must land after #474, which it builds on.Two body claims were stale and are gone: that nothing was changed on 2026-11-24, and that the window was unmeasured.
@sydevs-bot implementstarts the work.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code