Repository navigation
Conversation
ch-z-hc
marked this pull request as ready for review
October 14, 2026 08:22
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.
When a pending task is near its polling deadline,
poll()still sleeps for the entire configured interval. For example, a 50 ms timeout with a 1.5 s interval takes about 1.5 s to reportPolling timed out. The CLI's default video polling interval is 5 s, so short timeouts can substantially overrun while waiting between requests.Cap that sleep by the time remaining before the existing deadline. This is limited to the interval between requests: it does not change HTTP request timeouts or how completed and failed task responses are handled.
The regression fails on unchanged source (about 1504 ms) and passes with the one-line fix (about 51 ms). A separate real HTTP check against a local pending-task server took about 1543 ms on unmodified upstream and 54 ms with the patch, with one request in both cases.
Validation with Bun 1.4.0:
test/sdk/speech.test.ts.a965e72produces the same 3 failures (596 passed): two region-detection/auth tests exceed their existing 5 s test timeouts, and a FileSDK upload assertion sees a loopback base URL instead of the global endpoint. A second run with process-local loopback proxy bypass had 596 passed and 4 failed, adding an existing ImageSDK validation/network test timeout; that extra timeout is not diagnosed here. The full suite is not green. No tests were skipped or timeouts/assertions relaxed. OAuth tests used a temporary process-local no-opxdg-opento prevent launching a real browser; source and tests were otherwise unchanged.Codex assisted with investigation, implementation, testing and the automated reviews. These reviews are not independent human code review.