test(webviews): base passes the fixed-wait ratchet again
Merged
TE
15d ago+150+150+012345678901234567890123456789-78-78-01234567890123456789
Base fails bun run check:fixed-waits (and so every PR into feat-cmux-next): #23094 merged after the guard (#23365) with 9 new fixed waits.
test/snapshot-save-throttle.test.ts: the 250 ms snapshot save timer now runs on bun's fake timers. Nothing is written at 249 ms and one write lands at 250 ms. The oldsleep(300)passed with any delay under 300 ms; I checked that settingSNAPSHOT_SAVE_MSto 100 now fails it.test/browser/streaming-text.harness.tsx,test/streaming-text-frames.test.ts: the reveal drain and the settle window are sampled for jumps, so the window is the test. The 500 ms before sampling lets start-up work finish so the work budget measures only the stream, and nothing marks start-up as done. All three get// fixed-wait:markers.RevealedMarkdown.test.tsx: the 20 ms inafterEachis teardown with nothing asserted after it. Marked.
Checks: check:fixed-waits passes (992), bun run check, scripts/web-lint.sh, and the two unit files 3 × 3 pass. The browser files only gained comments.
Agent session: huge-blue
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes bun run check:fixed-waits on base so PRs into feat-cmux-next no longer fail from waits merged after the guard in #23094 and #22967, plus follow-up test fixes.
Test changes
- Switch
snapshot-save-throttle.test.tsto bun's fake timers with exact assertions at 249 ms and 250 ms. - Run the row-wait tests in
agent-pane-reveal-message.test.tson the fake clock, advancing it instead of sleeping. - Replace the poll loops in
agent-pane-queued-images.test.tswith waits that resolve on the client's snapshots and time out at 3 s so the failure message isn't swallowed by bun's 5 s test timeout. - Mark the reveal drain and settle window waits in
streaming-text.harness.tsxand the 500 ms start-up wait instreaming-text-frames.test.tsas fixed waits; these windows are the test. - Mark the 20 ms teardown wait in
RevealedMarkdown.test.tsxas a fixed wait since nothing asserts after it.
Script changes
- A baseline row for a deleted file now passes instead of failing every PR, and is dropped on
--update-baseline; the comparison logic is extracted ascompareToBaselineand covered by a unit test. - Drop the stale
session-sidebar-preview.test.tsxbaseline row so a new file at that path wouldn't inherit its six-wait allowance.