fix(api): preserve stream IDs for factory-created response errors - #926
Conversation
Castiron-Internal-PR: openai/openai-java-internal#43 Castiron-Source-SHA: b46d2787602d56fa4a8653f23463bd9d27251dcc Castiron-Public-Base-SHA: 085ea7d
Castiron custom code✅ No new custom-code files detected. 53 mixed files remain; 0 existing customizations changed; 4 customizations removed; 6 generated baselines changed. Compared
51 existing customizations unchanged
11 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 32502750930 --repo openai/openai-java \
--name castiron-custom-code-32502750930-1 --dir /tmp/castiron-custom-code-32502750930-1
git apply --stat /tmp/castiron-custom-code-32502750930-1/custom-code.patch
cat /tmp/castiron-custom-code-32502750930-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 085ea7d5f9c863aaeb6698f2c5f7efdc283bc01e 10e50df54124d84af72503f6ec389cd45e51aa82
python3 scripts/castiron/custom_code_report.py report \
--base 085ea7d5f9c863aaeb6698f2c5f7efdc283bc01e \
--head 10e50df54124d84af72503f6ec389cd45e51aa82 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-10e50df54124
cat /tmp/castiron-custom-code-10e50df54124/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.
Approved after two independent reviews. Stable and beta factory-created Responses WebSocket error events now preserve typed stream IDs; both production models exactly match the pinned generated snapshot. All 14 existing stream-ID regressions are preserved alongside expanded malformed/null/round-trip coverage, public event APIs and wire compatibility remain intact, and all public checks pass.
Summary
Fix
streamId()on factory-created Responses WebSocket error events by reading the error model's typed metadata field. Preserve the existing stable and beta event types, accessors, factories, visitors, and wire formats.The event-model implementation now matches the generated output. Generation metadata and generated event coverage are refreshed; the existing typed streaming-query setters remain unchanged in the SDK.
(manual)
Resolved generation conflicts in the stable and beta event models and their test files. Kept the generated model implementations and retained all 14 existing stream-ID and shell-event regression tests verbatim. No handwritten runtime workaround was added.
Validation
./scripts/formatpassed.