fix(audio): bind stored Direct account identity - #535
Conversation
|
✅ Deterministic PR hygiene checks passed. |
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. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c10cea5d67
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fff013ae97
ℹ️ 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".
| if (!stored?.accessToken || !isMainAccountTokenLive()) { | ||
| throw new CodexMainSubstitutionUnavailableError(); | ||
| } | ||
| selected.delete("chatgpt-account-id"); |
There was a problem hiding this comment.
Update every document that owns src/codex
This authentication change modifies src/codex/auth-context.ts, but checking structure/INDEX.md shows eight documents mapped to src/codex/, while this commit updates only structure/providers/openai-tiers.md; runtime.md, config.md, codex-home.md, catalog.md, subagents.md, gui-and-management-api.md, and ops/docs-and-release.md remain unchanged. Update every mapped document in the same change, or narrow the ownership map if those documents genuinely do not own this contract.
AGENTS.md reference: src/AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
|
The corrected change has been submitted for maintenance review, with its current validation evidence. Closing this development PR to keep one implementation and review queue and avoid repeating integration work later. This does not claim that the change has merged or shipped. |
Motivation
chatgpt-account-idcannot survive when the proxy substitutes the operator-owned Direct bearer.x-opencodex-api-key/x-api-keyso the preserved-header case is exercised.Description
materializeCodexUpstreamAuthremove any caller-suppliedchatgpt-account-idbefore substituting the stored main bearer, and only restore the account header from the stored credential when it is present. (src/codex/auth-context.ts)x-api-keyadmission with a stored Direct credential that lacks anaccount_id, asserting the caller header never reaches upstream. (tests/server/audio-transcriptions.test.ts)structure/data-planes/inbound-compat.md,structure/providers/openai-tiers.md)Testing
./node_modules/.bin/bun test tests/server/audio-transcriptions.test.tsand the focused transcription tests passed (all assertions in that file succeeded)../node_modules/.bin/bun run typecheck,./node_modules/.bin/bun run structure:check, and./node_modules/.bin/bun run privacy:scan, each of which completed successfully../node_modules/.bin/bun run test; the new regression passed but the full repository suite returned unrelated environment-sensitive failures (host/proxy and process-group cleanup tests) that are not caused by this change.git diffshows only the intended changes tosrc/codex/auth-context.ts, the new test additions, and the documentation lines updated as part of this fix.Codex Task