Repository navigation
fix(cli): stop waiting for the cloud's file check when the caller aborts - #7361
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Approving at 2ad3a7ed. No blockers.
- The fix is correct.
sleep(ms, signal)resolves early on abort, and the newsignal?.abortedcheck right after it throws "Stopped waiting for the cloud to finish checking the uploaded file." withcause: signal.reason.uploadAssetViaDirectUploadnow passesopts.signalthrough. The wait is cut short at the next sleep, not after the full 10-minute budget. - The "fails without the fix" claim holds. I ran it locally. With the abort check removed and
sleepback to no signal,stops waiting when the caller abortstimes out (1 failed, 4 passed inuploadComplete.test.ts). With the fix restored,vitest run src/cloud/upload*passes 25 of 25. - The test rename is accurate. The 20×409 test polls for about 88 s, so "more than a minute" is right.
- CI on this head: CI, CodeQL, regression, preview-regression, PR captures, Player perf and Comments are all green. Windows render verification was still running and doesn't touch this code.
Non-blocking nits:
sleepadds its abort listener only when the signal fires later. If Ctrl-C lands whilecompleteAssetUploadis in flight, the nextsleepstill waits its full poll (at most 5 s) before the check throws. Aif (signal?.aborted) throw …before the sleep, or an early resolve insleepwhen the signal is already aborted, would make it instant.- Each
sleepleaves a{ once: true }listener on the signal when the timer wins. Over a 10-minute wait that's about 120 dead closures. They're harmless, butsleepcould remove its listener in the timeout path.
miguel-heygen
enabled auto-merge
November 7, 2026 11:23
SanHsien
added a commit
to SanHsien/hyperframes
that referenced
this pull request
Nov 7, 2026
…, heygen-com#7360, heygen-com#7347); review to PR heygen-com#7362 Adopt heygen-com#7357 and heygen-com#7361 (upload completion waits and retries), heygen-com#7360 (Chrome start failure names its cause in check) and heygen-com#7347 (Safari perf tooling); release v0.9.20 not applicable. Pin open heygen-com#7362 (needs its golden LFS pointer when adopted); record issue heygen-com#7363. Monitored 126 -> 127. Co-authored-by: Miguel Ángel <[email protected]> Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The wait for the cloud's file check (added in the previous change, up to 10 minutes) ignored the abort signal, so Ctrl-C during it did nothing until the budget ran out.
completeWithRetrytakes the upload'sAbortSignal; an abort during the wait ends it at once with "Stopped waiting for the cloud to finish checking the uploaded file." (the abort reason is kept as the cause).Why
A review note on the wait change: a wait of up to 10 minutes that does not listen to
opts.signalmakes the CLI look hung on Ctrl-C.Size
One function and its test file.
Test plan
bun run format:checkexit 0;fallow audit --base origin/main --fail-on-issuesexit 0 ("No issues in 55 changed files"); oxlint exit 0; tsc no error insrc/cloud;vitest run src/cloud/upload: 25 passed, 3 runs in a row.stops waiting when the caller abortsfails (1 failed, 4 passed inuploadComplete.test.ts).