Skip to content

[WRONG BRANCH] fix(oauth): preserve legacy identity-less accounts on forced add-account login - #275

Closed
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-legacy-kimi-account-overwrite-issue
Closed

[WRONG BRANCH] fix(oauth): preserve legacy identity-less accounts on forced add-account login#275
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-legacy-kimi-account-overwrite-issue

Conversation

@luvs01

@luvs01 luvs01 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Prevent a newly identified OAuth credential from overwriting an active legacy identity-less account when the operator intentionally performs a forced add-account login, which previously caused data loss for providers like Kimi.

Description

  • Change runLogin to pass preserveIdentityless: opts?.forceLogin === true into saveCredential so forced add-account logins preserve an existing identity-less active slot for any provider instead of only for kiro (src/oauth/index.ts).
  • Add a focused regression test asserting that a forced Kimi add-account appends the identified account while keeping the legacy identity-less account (tests/oauth-reauth-bind.test.ts).
  • No user-visible configuration or auth contract changes were made.

Testing

  • Ran the focused tests tests/oauth-reauth-bind.test.ts and tests/kimi-oauth-identity.test.ts, and both passed.
  • Ran bun run typecheck and bun run privacy:scan, and both succeeded.
  • Attempted a full bun run test; many tests passed in this environment, but unrelated Grok model-discovery tests timed out and GUI dependency downloads returned HTTP 403, so the full-suite run is environment-limited rather than indicative of the change's correctness.

Codex Task

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions github-actions Bot changed the title fix(oauth): preserve legacy identity-less accounts on forced add-account login [WRONG BRANCH] fix(oauth): preserve legacy identity-less accounts on forced add-account login Aug 13, 2026
@github-actions
github-actions Bot marked this pull request as draft August 13, 2026 02:10
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: aa8f2a5b-4343-4f40-a91a-78802482bf2c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@luvs01 luvs01 closed this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant