Skip to content

test(smoke): wait out a settling edge before calling a chunk broken - #474

Merged
sydevs-dispatcher[bot] merged 5 commits into
mainfrom
claude/test-smoke-settle
Nov 25, 2026
Merged

sydevs-dispatcher[bot] merged 5 commits into
mainfrom
claude/test-smoke-settle

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • embed.smoke.test.ts's chunk crawl now re-checks a 5xx itself, for SETTLE_ROUNDS rounds, instead of calling the chunk broken on the first one. The budget clears feat(widget): open every embed inline; expand the map over the page #466's window on one attempt.
  • crawlDeploy's memo goes: one spec awaited it, and nothing ever read its cached value.
  • docs/testing.md gains the lane-level intent and the one rule the change must not be widened past.

Extracted from #466's red Smoke check, which was not a defect in that branch. No product code here.

What happened

On #466's head 69bede0 the crawl reported four chunks broken on 500:

/assets/InlineEmbedView-D6-2IkeK.js → 500
/assets/EventFacts-93Tna7xZ.js      → 500
/assets/CalendarView-DBz_NLpc.js    → 500
/assets/ShareView-CQutHP26.js       → 500

The deploy held all four the whole time:

  • All four answer 200 text/javascript from that same pinned address now, with no redeploy.
  • Smoke passed on the next head, 72ed9ae, which changes no asset pipeline.
  • The lane's own retry: 2 fired and the broken set only shrank across the three attempts — 4 → 3 → 2 — which is a version still coming up, not a graph with holes in it.

The retries cannot buy that time, and that is the actual defect: each one re-crawls from scratch, so all three raced the same ~25-second window rather than waiting it out.

Why this costs the spec nothing

The failure this spec exists to catch is a loader published without the graph behind it. A chunk the deploy does not hold answers the SPA shell with 200 text/html (assets.not_found_handling), never a 5xx — so the content-type check still reports it immediately, with no waiting at all. Only a 5xx buys patience.

Test results

Watched every behaviour against a stand-in deploy, so the new branch is exercised in both directions:

the chunk answers outcome
500 three times, then 200 passes in 9.3s
500 for about 24s — #466's window — then 200 passes in 24.3s
200 text/html (the shell) fails in 0.04s, naming it
500 for ever fails in 30.1s, naming it, inside the spec's 90s timeout
  • Lean gate: ✓ .claude/skills/pr-prep/check.sh — lint, typecheck, 2372 unit tests
  • Smoke lane: ✓ all 22 specs against the live preview a24d6af4-sahajatlas-web, the very deploy whose read went red — run on 57737a1, before the budget rose. A clean deploy waits for nothing either way.

Notes for reviewer

  • The adversarial review ran after the first push, and all three of its findings are built here: the settle budget, the dead memo, and the docs section that restated the code comment.
  • SETTLE_ROUNDS/SETTLE_WAIT_MS are a budget, not a tuning knob. Their product must stay above feat(widget): open every embed inline; expand the map over the page #466's ~25-second window, which is the coupling the JSDoc now states. A genuinely broken deploy pays the budget once per attempt; a missing chunk pays none of it.
  • Only markdown and tests/** here, so neither the browser lane nor the size budget can be affected.

The chunk crawl read a Workers version uploaded seconds earlier and reported
four chunks as broken on 500. All four served 200 from the same pinned address
afterwards, and Smoke passed on the next head with no deploy change — so the
deploy held every chunk the whole time.

The lane's `retry: 2` cannot absorb that window: each retry re-crawls from
scratch, so the three attempts raced the same window instead of waiting it out,
and the broken set only shrank, 4 -> 3 -> 2. The crawl now re-checks a 5xx
itself, six rounds three seconds apart.

This costs the defect the spec exists to catch nothing. A chunk the deploy does
not hold answers the SPA shell with 200 `text/html`, never a 5xx, so the
content-type check still reports it with no waiting. Watched all three
behaviours against a stand-in deploy: a chunk that 500s three times then heals
passes in 9.3s, one served as the shell fails in 0.3s, and one that 500s
forever fails in 18.3s naming it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYmyVdnfkJdPkJxsXM
@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 18:25Z address-review · attempt 1 · session · done
  • 18:25Z address-review · attempt 1 · session
  • 18:19Z review-pr · attempt 1 · session · done
  • 18:19Z review-pr · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 24, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

Right-sized: two files, no product code, and the branch does what the body says. The new loop is correct — it terminates, a 200 text/html shell still fails instantly, and a chunk that heals mid-settle is still crawled for its own children.

Two things do not line up. The settle budget is 18s, while this PR's own measurement of the window it exists to absorb is ~25s, so a repeat of #466 still needs the retry the change says cannot help. And the docs/testing.md section restates the code comment beside it, the two new constants' values included.

Since the diff grows this file, one older layer too: crawlDeploy's memo has a single caller and nothing ever reads its cached value.

Findings

  • should-fix — settle budget is below the window it was measured against · tests/smoke/embed.smoke.test.ts:87
  • should-fix — crawlDeploy's memo pays no rent · tests/smoke/embed.smoke.test.ts:53
  • should-fix — the docs section is a second home for the code comment · docs/testing.md:215

What was checked

  • Read whole on the branch: the spec, vitest.smoke.config.ts (testTimeout: 30_000, retry: 2), _helpers/preview.ts, and the new docs section in context.
  • new-pieces.mjs: NONE, so no streamliner ran. Ladder walked by hand: node:timers/promises is the platform API and adds no dependency; SETTLE_ROUNDS, SETTLE_WAIT_MS and read each earn their place.
  • Held on the whole-file pass: fetchEmbed's memo (two consumers), the backtick in RELATIVE_JS, GET-not-HEAD, and 90_000, which covers 18s of waiting plus the crawl.
  • Grepped the suite before proposing the prose figures go — nothing pins 9.3/0.3/18.3.
  • No contract surface touched: docs/embedding.md, public/_headers, robots.txt and the generated types are all untouched, so there is no consumer side to follow. No question threads.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread tests/smoke/embed.smoke.test.ts Resolved
Comment thread tests/smoke/embed.smoke.test.ts Resolved
Comment thread docs/testing.md Resolved
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 24, 2026
Six rounds of three seconds waited 18s, while the only window this exists
to absorb — #466's chunks at 500 — ran about 25 seconds. A repeat of #466
would still have failed its first attempt and gone green only through the
`retry: 2` the budget exists to replace.

Ten rounds clear that window on one attempt, inside the spec's own 90s
timeout. The JSDoc now states the coupling, so a later trim of either
constant has to read it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXqLs7mohV6h2RXY9K
One spec awaited `crawlDeploy`, and the only outcome the memo kept was a
clean crawl — which nothing asked for a second time. `retry: 2` re-runs the
body only after a failure, and a failure cleared the memo, so attempt two
always re-crawled. `fetchEmbed`'s memo stays: that one has two consumers.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXqLs7mohV6h2RXY9K
The section held the 25-second #466 measurement, the retry reasoning, the
200 `text/html` invariant and both constants' values a second time, beside
a stand-in test run nothing asserts. Named `SETTLE_ROUNDS` instead and kept
what the code cannot carry: the lane-level intent, the warning, the #466
breadcrumb, and why the retry lost.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXqLs7mohV6h2RXY9K
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

All three critic findings adopted, none rebutted. 57737a1 → e6ac3a2.

origin/main merged in clean (58b4dd5). Lean gate green: lint, typecheck, 2372 unit tests.

Body refreshed: raising the budget made the "18 seconds is above the one window measured" note and two rows of the timing table false.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026
@sydevs-dispatcher
sydevs-dispatcher Bot marked this pull request as ready for review November 24, 2026 18:36
@sydevs-dispatcher
sydevs-dispatcher Bot requested a review from Ardnived November 24, 2026 18:36
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 24, 2026
@sydevs-dispatcher
sydevs-dispatcher Bot added this pull request to the merge queue Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Pending in SYDevelopers Technical Roadmap Nov 25, 2026
Merged via the queue into main with commit 8c54e7e Nov 25, 2026
71 of 79 checks passed
@sydevs-dispatcher
sydevs-dispatcher Bot deleted the claude/test-smoke-settle branch November 25, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants