test: synchronize replacement WebSocket handshake - #3891
Conversation
Castiron-Internal-PR: openai/openai-python-internal#110 Castiron-Source-SHA: b1c4143561caf94fc09952581bc7e5b1059c499f Castiron-Public-Base-SHA: 3b865af
Castiron custom code✅ No new custom-code files detected. 46 mixed files remain; 0 existing customizations changed. Compared 46 existing customizations unchanged
6 more in the full report. 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 35289793446 --repo openai/openai-python \
--name castiron-custom-code-35289793446-1 --dir /tmp/castiron-custom-code-35289793446-1
git apply --stat /tmp/castiron-custom-code-35289793446-1/custom-code.patch
cat /tmp/castiron-custom-code-35289793446-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 3b865af92e8dc65e14ab6d565304fe778bac1eef 5de2ceac17868a86039f58a015587d96a7ea81bc
python3 scripts/castiron/custom_code_report.py report \
--base 3b865af92e8dc65e14ab6d565304fe778bac1eef \
--head 5de2ceac17868a86039f58a015587d96a7ea81bc --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-5de2ceac1786
cat /tmp/castiron-custom-code-5de2ceac1786/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
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. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
The test-only synchronization closes the intended race at the correct boundary: the replacement socket is not returned to the shutdown path until the server application handler has accepted it. Both close-deadline variants and their ownership/cleanup assertions remain intact, the diff is limited to this focused test, and exact-head CI is green. My local rerun was unavailable because the workspace lacks the locked httpx2 test dependency.
The reconnect shutdown regression could fail during cleanup because the replacement client handshake completed and closed before the server application handler recorded it. Wait for explicit server acceptance before returning the replacement socket to the shutdown path.
The test retains both close-deadline variants, the two-connection assertion, and reader/ownership cleanup checks. No SDK runtime, dependency, or release metadata changes.
Validation: 156 session tests, both targeted variants, Ruff and Pyright pass. The local mypy run reports two identical errors on the unchanged baseline and candidate.