Repository navigation
fix(api): preserve unknown Java union value identity - #1301
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66aee13d12
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
66aee13 to
212e57a
Compare
markstuart-oai
left a comment
There was a problem hiding this comment.
Reviewed 212e57ae00f1dda78ac082866c2b76875b3cf5a4. No changes requested.
Unknown union payloads now retain their identity in sets and maps. Known variants keep their existing equality and hash behavior. The fix covers all 513 changed identity implementations, including the SDK-owned embedding and legacy Realtime unions. The added tests check unknown-value round trips and known factory/decoded-value equality.
Source-only review with an independent pass across all 318 files. No candidate code, builds or tests ran locally. Hosted CI was still pending in the captured snapshot; the local test totals in the PR remain author-reported.
Castiron-Internal-PR: openai/openai-java-internal#391 Castiron-Source-SHA: f2a077fd8c46359ae4db8b8a61fe949f08e7f7f7 Castiron-Public-Base-SHA: ccb201d
212e57a to
982a90f
Compare
Summary
Unknown union values with different JSON payloads currently compare equal and collapse in sets and maps. Use raw JSON for equals and hashCode when no recognized variant is active, preserving existing equality for recognized variants.
Changes