Repository navigation
fix(openai): bind credentials and WS continuations to owners - #208
Closed
HTExplicit wants to merge 2 commits into
Closed
HTExplicit wants to merge 2 commits into
HTExplicit wants to merge 2 commits into
Conversation
Owner
Author
|
Closing on the owner's instruction (2026-10-04). This draft extended the per-owner turn-state and credential binding that came with the Codex routing work; that contract was removed from main in #233, so the change no longer has a base to apply to. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replacing an OpenAI OAuth account's credentials could combine a cached bearer with the newly selected workspace, and an earlier token refresh could overwrite a later administrator edit. Validate differing cached tokens against the durable identity and reject identity changes before returning a token. Persist successful OpenAI rotations with an atomic credentials/outbox update that respects reauthorization and proxy changes while preserving the current model mapping, compact mapping, and warmup setting, including deletions and explicit nulls. Grok retains its existing comparison behavior.
Apply the existing HTTP response-owner contract to the first and subsequent WebSocket frames in all three ingress modes, and register successfully completed WS responses under the authenticated downstream user. Same-user continuation across API keys remains supported. Historical WS response IDs without a saved owner now fail closed.
Quota, referral, and Spark fixtures now include persisted synthetic access tokens matching their existing cache entries; their original business and identity assertions are preserved.
Validation: the selected identity/CAS/WS methods passed, followed by the 12 affected quota/referral/Spark methods and the two targets affected by metadata merging. The exact new SQL also passed nine scenarios on disposable PostgreSQL 18.1, covering metadata replacement/deletion/null, reauthorization, workspace/version/unknown-credential changes, proxy changes, and atomic outbox insertion. No live upstream model calls were used to validate these code changes.
This remains a draft while the separate upstream quality investigation continues. No production deployment is included.
All required PR checks for commit 7e1a733 completed successfully or were policy skipped. The PR remains draft because the local correctness fixes are not evidence of upstream quality recovery; no production deployment was started.