Repository navigation
refactor: reuse Java WebSocket connection helpers - #1194
Conversation
Castiron-Internal-PR: openai/openai-java-internal#287 Castiron-Source-SHA: ac314daf9f2e48d609d245501665fb466d63d3e1 Castiron-Public-Base-SHA: 812a4fb
Castiron custom codeEvaluated main: Trusted main policy: Mixed files: 102 → 96 1 newly customized · 7 customizations removed · 0 existing customizations changed · 33 generated baselines changed Compared
70 existing customizations unchanged
30 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 38875818876 --repo openai/openai-java \
--name castiron-custom-code-38875818876-1 --dir /tmp/castiron-custom-code-38875818876-1
git apply --stat /tmp/castiron-custom-code-38875818876-1/custom-code.patch
cat /tmp/castiron-custom-code-38875818876-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 812a4fb74885f69b130c82d024f44541f73b8f5e 3f8a44f40f355bfe6d6c738348e295d747096301
python3 scripts/castiron/custom_code_report.py report \
--base 812a4fb74885f69b130c82d024f44541f73b8f5e \
--head 3f8a44f40f355bfe6d6c738348e295d747096301 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-3f8a44f40f35
cat /tmp/castiron-custom-code-3f8a44f40f35/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.
Reviewed 3f8a44f40f355bfe6d6c738348e295d747096301 against 812a4fb74885f69b130c82d024f44541f73b8f5e. No actionable findings.
The extraction preserves the existing Live wrappers' request policy, event types, error text, queue/drain behavior, cancellation and uncertain-write handling. Fork/Sideband path encoding and command restrictions stay in their API-specific wrappers; Realtime, Translation and Responses retain their existing connection machinery while taking endpoint/auth metadata from the generated bindings.
I also checked the new Sideband unions and compilation-shard dependencies, the Translation visitor defaults, and the generated request changes. Across all 42 changed request models, the only non-whitespace change is the 60 missing-list guards, preserving explicit-null/invalid-value behavior. The legacy custom-code inventory fallback is tied to exact checker bytes and does not relax the budget policy or workflow ownership rules.
Validation: static review only; git diff --check passed. I independently verified the public generated snapshot hash (bda6b5fe…f75878). Hosted tests, older-Jackson compatibility, API compatibility, Java 8/25 runtime checks, and Castiron statuses are green for this head. I did not locally rerun tests, generation, or the author-reported installed-JAR/socket experiments.
Why
Existing and new WebSocket APIs should share the SDK's connection code while preserving each API's public behavior.
High-level description
Extract Live's connection mechanics into an SDK-owned helper. Keep the existing wrappers, options, validation, errors, authentication, and session rules. Generate endpoint and event bindings that use the same request factory and helper.
The current compiler also supplies its already-merged fix for adding items to a copied request's omitted list. That changes 42 request models without changing public signatures. The WebSocket runtime, bindings, and tests match the previously tested candidate.
Validation