fix(polling): honor cancellation during polling delays - #2477
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Castiron custom code✅ No new custom-code files detected. 32 mixed files remain; 0 existing customizations changed. Compared 32 existing customizations unchanged
A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 32913150326 --repo openai/openai-node \
--name castiron-custom-code-32913150326-1 --dir /tmp/castiron-custom-code-32913150326-1
git apply --stat /tmp/castiron-custom-code-32913150326-1/custom-code.patch
cat /tmp/castiron-custom-code-32913150326-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin c6769fa9b28bbc6f10be81e2f87e18655dfdd008 87bb5fcfc022f3f0e2877301f44773a332ef946e
python3 scripts/castiron/custom_code_report.py report \
--base c6769fa9b28bbc6f10be81e2f87e18655dfdd008 \
--head 87bb5fcfc022f3f0e2877301f44773a332ef946e --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-87bb5fcfc022
cat /tmp/castiron-custom-code-87bb5fcfc022/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
The cancellation and race coverage is otherwise strong, but supported structural/polyfilled AbortSignals can throw while removing the polling listener. That currently clears the only recovery timer without settling the poll, leaving every public polling helper permanently pending. Please make cleanup exception-safe and add abort and ordinary timer-completion regressions before landing.
Summary
RequestOptions.signalimmediately during intermediate assistant-run and vector-store polling delays, including default, server-provided, and custom intervals.APIUserAbortErrorand preserve the exact caller abort reason as its non-enumerablecause; safely clear the timer and only the polling-owned listener across completion, pre-abort, missed-event, and synchronous registration races.Validation