base red: cloud-chat-resume tests prove #35206's resume wait, not the removed 60 s deadline
Summary
Base red on feat-cmux-next: 5 tests in webviews/test/cloud-chat-resume.test.tsx fail 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:
| End | Test |
|---|---|
| The request answers: the resume goes on | a slow inventory/recheck keeps the resume waiting past the old 60 s deadline until it answers |
| The native call fails for good (non-retryable, the daemon is gone): the resume fails with the error | new: a slow inventory/recheck whose daemon is gone fails the resume |
| The person leaves the chat (switch, unmount): the wait ends with no error and no timer | switching chats cancels a hung inventory/recheck without failing the new recovery |
| A newer resume owns the card after an older resume ends | an attach left pending when its resume ends: its late rejection leaves a newer resume running |
All 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.tsx from webviews/:
- Base (a727959532e): 5 fail (shown on #35409 and on the base run).
- Head: 12/12 pass, 3 runs.
- Head tests with
useCloudChatRecovery.tsfrom a628f506790e^ (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-waits adds no fixed wait in this file. On a
temporary merge with #35409: bun run check exits 0, and cloud-chat-resume plus
cloud-chat-recovery pass 18/18.
On this branch alone, scripts/web-lint.sh is red only on the base reds that #35409 fixes
(check:fixed-waits on transportDeadlines.test.ts, vp lint and vp check on files this PR does not touch).
I pushed with CMUX_WEB_LINT_SKIP_REASON and named the base sha.
Not run: the full webviews test suite.
Changelog
none
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the five failing tests in webviews/test/cloud-chat-resume.test.tsx on feat-cmux-next; this PR changes only that file. #35206 removed useCloudChatRecovery'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.