Repository navigation
feat(types): prepare native synchronous WebSocket option type - #4118
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 codeEvaluated main: Trusted main policy: ✅ No new custom-code files detected. 39 mixed files remain; 0 existing customizations changed. Compared 39 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 39333875920 --repo openai/openai-python \
--name castiron-custom-code-39333875920-1 --dir /tmp/castiron-custom-code-39333875920-1
git apply --stat /tmp/castiron-custom-code-39333875920-1/custom-code.patch
cat /tmp/castiron-custom-code-39333875920-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 163a2966140bc0399af7d81e03580d9d907a51df 07bcd9a18dddea892ccd9bd209d4964d1f38b35c
python3 scripts/castiron/custom_code_report.py report \
--base 163a2966140bc0399af7d81e03580d9d907a51df \
--head 07bcd9a18dddea892ccd9bd209d4964d1f38b35c --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-07bcd9a18ddd
cat /tmp/castiron-custom-code-07bcd9a18ddd/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.
Reviewed both changed files at 07bcd9a with an independent static review. No actionable findings. The new sync TypedDict excludes write_limit while the existing async fields and compatibility alias remain intact. The corrected type contract preserves the negative assignment check without unused variables. Generated annotation adoption is intentionally a follow-up. Hosted CI passed/skipped and exact-head OkTest reports 236/236 passing. No candidate code or tests executed locally.
The synchronous WebSocket client never supports
write_limit; itsmax_queueoption requires websockets 14 or newer. The SDK currently describes both sync and async connections with one options type.Add
SyncWebSocketConnectionOptionsto the SDK-owned options module with the five sync fields and the version note. Keep the existingWebSocketConnectionOptionsand legacyWebsocketConnectionOptionsalias fully compatible for async callers. This prepares the owned type for a separate generated-code update: current generated sync method annotations and the top-level export are unchanged in this PR.Validation: the new type contract failed before the change and passes afterward. Full Pyright, Mypy (2,036 files), Ruff and formatting passed. After rebasing onto the latest recovery fix, 132 focused options, recovery, Live and Translation checks pass; targeted Pyright remains clean. The trusted budget check passes at the current PR head.