Repository navigation
Conversation
markstuart-oai
left a comment
There was a problem hiding this comment.
Approved. JSON read failures, SSE decoding failures and streaming I/O failures retain the response headers through an explicit accessor. The existing constructor parameters and default arguments remain intact. SSE decoding enriches the original exception, while consumer exceptions and stream-close behavior stay unchanged. The private header field is not added to default exception messages.
Moving Headers into the runtime compilation shard satisfies the new dependency without changing the published artifact boundary. The changed files are outside the generated-file inventory. The focused tests cover missing response context, parsing and read failures, and consumer exception identity. No actionable findings after source review and an independent pass.
Current-head hosted checks passed, including API compatibility, Jackson compatibility, Java 8/25, the SDK suite, ProGuard and R8. No candidate code or tests ran locally. The reported baseline-compiled constructor tests were not independently rerun; this review makes no claim about Java object-serialization compatibility.
Reviewed head: 04b660ae40057ddb95d29efbda43935ab5479738; base: 4311dba26c34f5d813105f94f2a76ba9073561dc.
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.
Approved after static review of all eight changed files and relevant streaming, SSE, header and compilation-shard code, with an independent second review. No actionable findings. Existing constructor and Kotlin default-argument signatures remain intact; response headers are retained on parsing/read failures without changing consumer exceptions or default exception messages. Hosted CI has 13 passed checks; OkTest remains in progress. No local code or tests were run.
Refresh review: approval retained at ffef365 after merging main 28dce99. All eight PR patches and resulting file blobs are identical to the prior review. Core production/test sources and compilation-shard sources are unchanged by the merge; Headers remains in the correct runtime shard. Independent second review found no actionable issues. Fresh hosted checks are in progress; the prior OkTest reporting failure is not evidence of this new commit passing. No candidate code or tests ran locally. Existing approval updated without a duplicate review.
Refresh at 4a30e26: retained approval after static review and an independent second review. This merges main e1bd0d3 containing the separately reviewed token-response change from PR #1289. All eight PR patches and resulting file blobs remain identical; incoming auth changes do not conflict with header retention or compilation shards. Fresh hosted CI and OkTest are still running. No local code or tests ran.
Preserve response headers, including
x-request-id, when JSON body reads, JSON deserialization, SSE JSON parsing, or streaming reads fail.OpenAIInvalidDataExceptionandOpenAIIoExceptionnow exposeheaders(): Optional<Headers>; failures without response context return an empty optional.Existing constructors and Kotlin default-argument signatures remain unchanged. SSE parsing enriches the original exception, preserving its cause and stack trace. Consumer callback exceptions remain untouched, and headers are not added to exception messages.
OpenAIServiceException.headers()and the base exception API remain unchanged.Existing stream-close mocks now supply empty headers to satisfy the non-null
HttpResponse.headers()contract.The build also compiles
Headers.ktin the runtime shard alongside the exceptions. No published artifact boundaries or generated-owned files change.Validation:
git diff --checkpass.Builds on the approach in #922 and adds SSE parsing coverage and the required compilation-shard adjustment.
Fixes #690.