fix(accounts): preserve shared workspace account slots#974
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78011b893b
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65518d0a20
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bdbb031de
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90dfd3f6ea
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
741005a to
d07fad5
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d07fad516c
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ebc1d58ad
ℹ️ 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".
| workspace_id=account.workspace_id, | ||
| email=account.email, |
There was a problem hiding this comment.
Include workspace labels in identity reauth lookup
When this merge_by_chatgpt_identity path is used for two same-email, label-only workspace slots, the lookup is still scoped only by workspace_id; with workspace_id is None it considers every label-only row for that ChatGPT id/email, chooses the oldest, and the subsequent duplicate reconciliation also deletes same-email rows with workspace_id IS NULL. Since this change now treats workspace_label as a slot identity elsewhere, reauthing a workspace_label="Triton" slot can overwrite/delete a separate workspace_label="Mavos" slot. Pass the workspace label through this lookup/reconciliation or route this path through the slot-aware matcher.
Useful? React with 👍 / 👎.
* fix(accounts): preserve shared workspace account slots * fix(accounts): align shared workspace slot CI expectations * fix(accounts): preserve shared workspace slot identity semantics * style(accounts): format shared workspace fallback * fix(accounts): preserve legacy workspace upgrades * fix(accounts): keep workspace slot fallback scoped * fix(accounts): allow additional workspace slots * fix(accounts): preserve workspace identity on oauth * fix(accounts): route oauth through account slots * fix(accounts): keep oauth slots identity-keyed * fix(accounts): scope oauth slot preservation * fix(accounts): match identity merge by email slot * fix(accounts): upgrade label-only workspace slots --------- Co-authored-by: Darafei Praliaskouski <me@komzpa.net>
Summary
Fix account add/reauth for OpenAI workspaces where multiple human emails share the same upstream ChatGPT account id. Also render the upstream ChatGPT account id as the workspace/account-slot context before falling back to the generic unknown-workspace label.
Type of change
fix:— bug fix (no behavior change beyond the bug)feat:— new user-facing feature or capabilityrefactor:— internal refactor (no behavior change, no API change)docs:— documentation onlychore:/ci:/build:— tooling, CI, packagingtest:— test-only change!after the type, e.g.feat!:or includeBREAKING CHANGE:footer)Linked issue: Related to #355 and #788; fixes a remaining shared-workspace edge case after #865.
OpenSpec
shape, SSE framing, OAuth flow) and preserves upstream-equivalent behavior
Change directory:
openspec/changes/fix-shared-workspace-account-slots/Changes
chatgpt_account_id + emailinstead of treating shared workspace ids as single-user identities.chatgptAccountIdon dashboard account summaries and use it as the first workspace/account-slot display fallback.Test plan
Result: all commands above passed locally.
Not run locally:
uv run pytest ...,uv run ruff ..., andopenspec validate --specsbecause this shell does not haveuvoropenspec; the Nix Python in the environment could not bootstrappipviaensurepip.Screenshots / output (optional)
N/A.
Checklist
<type>(<scope>)?: <subject>).uv run pre-commit run local-ci --hook-stage manual --all-filesor the relevantmake <target>subset locally.openspec validate --specspasses and/opsx:verifyis clean.