Repository navigation
fix: preserve suppressed workload authorization - #2699
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. |
Castiron custom code✅ No new custom-code files detected. 32 mixed files remain; 1 existing customization changed. Compared
31 existing customizations unchanged
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 34257793599 --repo openai/openai-node \
--name castiron-custom-code-34257793599-1 --dir /tmp/castiron-custom-code-34257793599-1
git apply --stat /tmp/castiron-custom-code-34257793599-1/custom-code.patch
cat /tmp/castiron-custom-code-34257793599-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin bb0f51bed84bf60b0639af7a894fcf538264e435 1b34a791605fdffcb745110514f27a532bc303fd
python3 scripts/castiron/custom_code_report.py report \
--base bb0f51bed84bf60b0639af7a894fcf538264e435 \
--head 1b34a791605fdffcb745110514f27a532bc303fd --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-1b34a791605f
cat /tmp/castiron-custom-code-1b34a791605f/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Reviewed the exact 2-file patch against the narrow dispatch outcome: preserve the final merged Authorization value, including explicit null and empty client/request overrides, and resolve only the SDK workload-identity placeholder. The equality check is case-insensitive through native Headers lookup, leaves replacement credentials and inherited defaults intact, and preserves suppression on repeated cached-token requests. Credential acquisition timing, 401 provenance, and custom hook ownership are unchanged and remain explicit non-goals. The focused workload-identity and header suites pass locally: 46 tests. Git diff check passes, no API or architecture expansion, no unresolved threads, and every exact-head lint/build/Node 22/24/26/ecosystem/CodeQL/Castiron check is green. No blocking findings.
markstuart-oai
left a comment
There was a problem hiding this comment.
Reviewed the complete two-file diff and the unchanged header merge, workload credential cache, and dispatch path. No findings. Resolving only the existing workload placeholder preserves the final merged Authorization value, including null/empty suppression, case-insensitive overrides, replacement credentials, and undefined inheritance. This is the right structural simplification: remove the fallback, with no additional state or header machinery. Client size stays 2,362 lines; tests grow 457 to 511.
Fresh validation: 46 focused tests pass on Node 24.20.0 and exact minimum 22.0.0; the same tests against the actual base fail seven suppression cases. An independent built CJS/ESM matrix passes 192 cases per runtime, each on first and cached requests. Canonical build and core/provider import checks pass. These runs used copied local dependencies because the configured registry was unavailable; Vitest matches, but the full dependency tree does not match the lockfile. Exact pinned lint could not be completed, and whole-project tsc is blocked by missing example dependencies. Author-reported lint/type results remain unverified locally. Credential-acquisition timing, 401 attribution, and arbitrary hook/header-copy ownership remain separate follow-ups.
Automated Release PR --- ## [7.12.0](openai/openai-node@v7.11.0...v7.12.0) (2026-09-08) ### Features * **api:** add GPT Image 2.5 models and image options ([openai#2705](openai#2705)) ([6500a16](openai@6500a16)) ### Bug Fixes * **assistants:** reject root IDs in run-step deltas ([openai#2698](openai#2698)) ([63dfa4c](openai@63dfa4c)) * **files:** use a monotonic clock for processing timeout ([openai#2657](openai#2657)) ([bb0f51b](openai@bb0f51b)) * preserve suppressed workload authorization ([openai#2699](openai#2699)) ([57bbfd3](openai@57bbfd3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
Preserve explicit null and empty
Authorizationoverrides from client defaults and request headers by resolving only the SDK workload-identity placeholder at dispatch.Supersedes #2689 with a one-line production fix and 12 focused cases in the existing workload-identity suite. The cases cover client/request overrides, case-insensitive precedence, replacement credentials, undefined values, native Headers, and placeholder resolution. Each case makes two requests to check the result with a populated credential cache.
Review scope
The acceptance criterion is that dispatch respects the final merged Authorization value, including explicit suppression. Credential-acquisition timing, 401 retry attribution, and transparent ownership through custom hooks/header copies should be evaluated as separate changes.
Validation
./scripts/test tests/lib/workload-identity.test.ts tests/buildHeaders.test.ts: 46 tests passed on Node 24.20.0 and exact minimum Node 22.0.0.pnpm lintandpnpm exec tscpassed with pnpm 11.5.1.pnpm buildpassed, including CJS/ESM core and provider import checks.Validation used synthetic credentials and in-memory fetch responses.