Skip to content

Compile exception header assertions against both Java SDK signatures - #1365

Closed
dpiet-oai wants to merge 1 commit into
nextfrom
dpiet/sdk-1462-header-fixture
Closed

dpiet-oai wants to merge 1 commit into
nextfrom
dpiet/sdk-1462-header-fixture

Conversation

@dpiet-oai

Copy link
Copy Markdown
Contributor

The API compatibility job compiles the base branch’s tests against the proposed SDK. Sixteen assertions in ErrorHandlingTest check response header values. They currently expect service exceptions to return Headers directly.

Add a private Optional<Headers>.toMap() overload so the same assertions also compile when the SDK returns optional headers. The helper calls get() and delegates to the existing header conversion. Each assertion still compares the original header name and value.

The full 17-test fixture ran against locally installed JARs for both signatures. In separate runs, returning the wrong value in one HTTP response and omitting the header in another failed exactly those two assertions on each version.

@dpiet-oai
dpiet-oai requested a review from a team as a code owner November 10, 2026 17:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T17:16:39.971455Z 7b45ff8 New commits
🔒 Security Review ✅ Completed 2026-11-10T17:17:26.092190Z 7b45ff8 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dpiet-oai
dpiet-oai force-pushed the dpiet/sdk-1462-header-fixture branch from 453e8b8 to 7b45ff8 Compare November 10, 2026 17:15

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No actionable findings. The private, typed overload preserves header-value assertions and fails on absent optional headers without adding runtime branching or casts. File size increases from 2,040 to 2,042 lines; no new size-threshold crossing.

Source-only review of 7b45ff833b26ce0c61211a2a55ba4834cb7222c8. Two independent source reviews; no candidate code, tests, builds or generators executed.

Validation limits:

  • Source-only review; tests were not executed.
  • Source-only review; tests and reported dual-JAR runs were not independently executed.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the exact commit statically. The private Optional.toMap() overload preserves all 16 existing header assertions and still fails for absent headers. No actionable findings. Hosted CI is still in progress; no candidate code or tests were executed.

@dpiet-oai

Copy link
Copy Markdown
Contributor Author

Superseded by #1367, squash-merged into next at 5d272f8c630ef3628ab6b23aa7f90d0ee3151589. The merged tree matches the reviewed bundle. Component CI and combined CI passed.

@dpiet-oai dpiet-oai closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants