Skip to content

fix(openai): bind credentials and WS continuations to owners - #208

Closed
HTExplicit wants to merge 2 commits into
mainfrom
codex/quality-identity-guard-20260926
Closed

HTExplicit wants to merge 2 commits into
mainfrom
codex/quality-identity-guard-20260926

Conversation

@HTExplicit

@HTExplicit HTExplicit commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

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.

@HTExplicit

Copy link
Copy Markdown
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.

@HTExplicit HTExplicit closed this Oct 4, 2026
@HTExplicit
HTExplicit deleted the codex/quality-identity-guard-20260926 branch October 4, 2026 00:29
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.

1 participant