Skip to content

fix(accounts): distinguish Codex Team members - #158

Merged
murongg merged 2 commits into
mainfrom
fix/codex-team-identity
Nov 5, 2026
Merged

murongg merged 2 commits into
mainfrom
fix/codex-team-identity

Conversation

@murongg

@murongg murongg commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Different members of the same ChatGPT Team share a workspace account ID. SubLane previously used that ID alone for deduplication, rejecting the second member and allowing another member to replace an existing account's credentials.

Use a workspace/member identity key while preserving the original workspace ID for upstream requests. Duplicate checks stay inside the mutation transaction and inspect only the relevant upstream workspace, including legacy keys and comparable JWT claims. Reauthorization and refresh reject conflicting member claims and loss of a known canonical user ID.

The PR also includes the versioned v0.19.2 changelog, generated with git-cliff 2.14.2. Changelog validation passed all four tests. The release tag will be created after CI passes and this PR is merged.

Related issues

Closes #157

Validation

  • make check passed: sqlc generation check, Go vet/format checks, frontend type/lint/format checks, script tests (134 passed, 5 conditional skips), the full Go race suite, 544 frontend tests, and the production build.
  • go test ./... passed.
  • go test ./internal/accounts ./internal/backup ./internal/upstream -count=1 passed.
  • Regression tests reproduced duplicate-import, credential-replacement, claim-conflict, and claim-format transition failures before the corresponding fixes.
  • Live ChatGPT Team subscriptions and browser OAuth against the real provider were not exercised; fixtures and upstreams are synthetic.

Compatibility and migration

No schema migration or account recreation is required. Existing encrypted credentials and workspace-only database keys remain readable. Credential rotation upgrades the stored deduplication key without changing local account IDs, resource-group assignments, or conversation bindings. Imports lacking comparable member identity retain conservative workspace-level duplicate protection.

Older binaries cannot read the new member-aware keys. Restore a pre-upgrade backup before downgrading.

Checklist

  • The change is focused on one problem and follows CONTRIBUTING.md.
  • Behavior changes have regression tests using synthetic data only.
  • Validation results and remaining gaps are documented above.
  • Relevant product documentation is updated; no UI text changes.
  • UI checks are not applicable because no UI changed.
  • No real credentials, account identifiers, private content, or local planning documents are included.

@murongg
murongg merged commit c0a47b2 into main Nov 5, 2026
7 checks passed
@murongg
murongg deleted the fix/codex-team-identity branch November 5, 2026 10:50
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.

[Bug]: 明明未添加该账号却显示"此上游账号已添加,请在已有账号上更新凭据。"

1 participant