-
Notifications
You must be signed in to change notification settings - Fork 30
chore: release v2.1.13-beta.1 (#491) #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # v2.1.13-beta.1 | ||
|
|
||
| Beta prerelease that adds multi-workspace support for a single email: one | ||
| OpenAI/Google account that belongs to more than one ChatGPT workspace (for | ||
| example a personal Plus workspace and a business/team workspace), each a distinct | ||
| quota pool keyed by its `org_id`. Ships the issue #491 work so users with such | ||
| accounts can register, distinguish, switch, and rotate between workspaces. | ||
|
|
||
| This is a **prerelease** and also carries the pinned-account 503 diagnostic from | ||
| v2.1.13-beta.0. Stable `v2.1.13` will land once the issue #486 root cause is | ||
| identified and patched. | ||
|
|
||
| ## Install | ||
|
|
||
| ```bash | ||
| npm i -g codex-multi-auth@beta | ||
| ``` | ||
|
|
||
| ## Accounts | ||
|
|
||
| ### Fixes | ||
|
|
||
| - Account `workspaces` and `currentWorkspaceIndex` now survive a load | ||
| round-trip. The strict V3 storage schema (`AccountMetadataV3Schema`) did not | ||
| declare these fields, so Zod stripped them on every read; login captured the | ||
| workspaces and wrote them to disk, but the next load wiped them. This is the | ||
| root cause of workspace labels appearing empty after login and of two | ||
| same-email accounts being indistinguishable. | ||
| - `formatAccountLabel` surfaces the active workspace name, so same-email accounts | ||
| in different workspaces stay distinguishable, for example | ||
| `Account 1 ([Personal Plus], user@gmail.com, id:g-AAAA)`. All prior label | ||
| formats are preserved when no workspace is tracked. | ||
|
|
||
| ### Features | ||
|
|
||
| - `status` / `list` now list every workspace beneath an account that tracks more | ||
| than one, marking the active workspace and flagging disabled ones. | ||
| - New `workspace <account> [workspace]` command: with only an account index it | ||
| lists that account's workspaces; with a workspace index it sets the active | ||
| workspace and persists it. | ||
| - `login --org <org_id>` (and `--org=<id>`) binds a login to a specific | ||
| workspace/org. It reuses the `CODEX_AUTH_ACCOUNT_ID` override that every login | ||
| resolver already honors, scoped to the invocation and restored afterward, so a | ||
| second workspace can be registered on demand instead of always resolving to the | ||
| default org. | ||
|
|
||
| ## Release Hygiene | ||
|
|
||
| ### Tests | ||
|
|
||
| - Schema round-trip preservation and a workspace-load regression that locks the | ||
| fix in place. | ||
| - Label disambiguation coverage and `formatWorkspaceLines` output coverage | ||
| (active marker, disabled annotation, indentation). | ||
| - Nine `workspace`-command cases (list, switch, persistence, already-active | ||
| no-op, disabled rejection, out-of-range and non-numeric indices). | ||
| - `login --org` argument parsing and missing-value handling. | ||
|
Comment on lines
+50
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
the test list covers argument parsing and missing-value handling for Prompt To Fix With AIThis is a comment left during a code review.
Path: docs/releases/v2.1.13-beta.1.md
Line: 50-57
Comment:
**missing vitest coverage for env-var restore under failure**
the test list covers argument parsing and missing-value handling for `login --org`, but doesn't mention a case where the login resolver throws mid-flight and we verify `CODEX_AUTH_ACCOUNT_ID` is still restored to its prior value (or `undefined`). given the mutation pattern described above, a regression here would silently corrupt subsequent logins in the same process without any test catching it.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
|
|
||
| ## Known Gaps | ||
|
|
||
| - The issue #486 503 root cause (doctor reports all green, runtime still returns | ||
| 503) is **not** fixed by this prerelease. | ||
| - Whether a real two-workspace login returns both orgs in one token or one at a | ||
| time is unconfirmed. Both paths are supported (the `workspace` command for the | ||
| former, `login --org` for the latter); a sanitized `accounts.json` from a real | ||
| two-workspace account would confirm which path users hit. | ||
|
|
||
| ## Refs | ||
|
|
||
| - Issue #491 — `[feature] Support registering multiple workspaces for the same email` | ||
| - PR #493 — `feat: support multiple workspaces for the same email (#491)` | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
login --orgenv-var mutation is a concurrency riskthe notes say the impl sets
process.env.CODEX_AUTH_ACCOUNT_ID, does the login, then restores it. node is single-threaded but async — if twologin --orgcalls overlap on the event loop (e.g. a cli invocation racing an in-process retry), the second call can read the first call's value or clobber the restore, assigning the wrong workspace to the wrong account. a scoped parameter passed through the call chain would eliminate the risk entirely. also worth checking: the exception path — if the login resolver throws before the restore runs, the env var stays mutated for the rest of the process lifetime, which on windows could also affect any child-process token writes that inherit the env.Prompt To Fix With AI