Repository navigation
base red: cloud-chat-resume tests prove #35206's resume wait, not the removed 60 s deadline - #35423
Conversation
… removed 60 s deadline #35206 removed useCloudChatRecovery's 60 s recovery deadline on purpose ("removed; retries continue while active"; "a busy machine never turns a slow list into a terminal resume failure"). Five tests still asserted that deadline and failed on the tip. A resume now ends when its request answers (the resume goes on), when the native call fails for good (non-retryable: the daemon is gone; the card shows the error), or when the person leaves the chat (switch, deactivate, unmount). The tests now prove each end, with fake timers and held requests the test answers or fails; no wall-clock wait: - a slow inventory/recheck keeps the resume waiting past the old deadline (10 min) with no timer and no repeated read, until it answers; the answer runs the recheck and the next read. - new: a slow inventory/recheck whose daemon is gone fails the resume with the error. - switching chats ends a hung inventory/recheck with no error and no timer; the old chat's late answer or failure does not touch the new recovery or read for the old chat. - an attach left pending when its resume ends (now: the daemon is gone, was: the deadline): its late rejection leaves a newer resume running; the current attach owns its failure. Gap, not invented here: #35206 states no end for a request that never answers while the bridge stays alive. Today that resume waits until the person leaves the chat (the card has no cancel and disables its actions while resuming). The first two tests assert that explicitly. bun test test/cloud-chat-resume.test.tsx: head 12/12 pass (3 runs). With the hook from a628f50^, 6 fail (the waits now end at its 60 s deadline timer).
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (claude-review-subagent): SHIP at ee3c1e7 What I checked:
Non-blocking notes:
|
|
Found 3 test failures on Blacksmith runners: Failures
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Unclear: CI failed on
Not re-run automatically: Written by red: web / Web status; a job it gathers is red on this change (its line here); do not merge until green; see lane-rules Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Summary
Base red on
feat-cmux-next: 5 tests inwebviews/test/cloud-chat-resume.test.tsxfail on the tip.#35206 removed
useCloudChatRecovery's 60 s recovery deadline on purpose. Its gate table says"removed; retries continue while active", and the code says "a busy machine never turns a slow
list into a terminal resume failure". The tests still asserted the deadline.
This PR changes only that test file. The tests now prove what ends a resume after #35206:
a slow inventory/recheck keeps the resume waiting past the old 60 s deadline until it answersa slow inventory/recheck whose daemon is gone fails the resumeswitching chats cancels a hung inventory/recheck without failing the new recoveryan attach left pending when its resume ends: its late rejection leaves a newer resume runningAll of them use fake timers and held requests that the test answers or fails. They have no wall-clock wait.
Gap: #35206 states no end for one case
A request that never answers while the native bridge stays alive keeps the resume waiting until
the person leaves the chat. While it waits, the card has no cancel and its actions are disabled.
#35206 names no other end for this case, so this PR does not add a timeout. The first two tests
assert today's behavior explicitly: 10 minutes with no timer, no error and no repeated read.
The PR author must decide if a cancel or a liveness end is needed.
Red / green
bun test test/cloud-chat-resume.test.tsxfromwebviews/:useCloudChatRecovery.tsfrom a628f50^ (the old 60 s deadline): 6 fail.So the tests catch a return of the deadline.
Observed / Not run
Observed: the runs above.
bun run check:fixed-waitsadds no fixed wait in this file. On atemporary merge with #35409:
bun run checkexits 0, andcloud-chat-resumepluscloud-chat-recoverypass 18/18.On this branch alone,
scripts/web-lint.shis red only on the base reds that #35409 fixes(
check:fixed-waitsontransportDeadlines.test.ts,vp lintandvp checkon files this PR does not touch).I pushed with
CMUX_WEB_LINT_SKIP_REASONand named the base sha.Not run: the full webviews test suite.
Changelog
none
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the five failing tests in
webviews/test/cloud-chat-resume.test.tsxonfeat-cmux-next; this PR changes only that file. #35206 removeduseCloudChatRecovery's 60-second recovery deadline on purpose, but the tests still asserted it, so they now prove the three ways a resume ends after #35206: the request answers, the native call fails for good, or the person leaves the chat.All tests use fake timers and held requests the test answers or fails, with no wall-clock waits. An old chat's late answer or failure never touches a newer resume.
Gap
#35206 names no end for a request that never answers while the native bridge stays alive. The tests pin the current behavior — the resume waits until the person leaves the chat, with no cancel and disabled actions — and reviewers must decide if a cancel or liveness end is needed. The suite passes 12/12 here and fails 6/12 when run against the old deadline hook, so a return of the deadline would be caught.
Written for commit ee3c1e7. Summary will update on new commits.