Skip to content

fix: activate first account after purge#28

Merged
Loongphy merged 1 commit intomainfrom
fix-purge-activate-fallback
Mar 24, 2026
Merged

fix: activate first account after purge#28
Loongphy merged 1 commit intomainfrom
fix-purge-activate-fallback

Conversation

@Loongphy
Copy link
Copy Markdown
Owner

@Loongphy Loongphy commented Mar 24, 2026

Summary

  • activate the first rebuilt account after purge when the current auth cannot be recovered
  • reuse the normal activate path so auth.json backup behavior stays consistent
  • add regression coverage and document the fallback activation behavior

Testing

  • zig build test
  • zig build run -- list

Note

Activate first account after purge when no active account exists

When purgeRegistryFromImportSource rebuilds accounts but none is marked active, it now calls activateAccountByKey on the first account in sorted order before saving the registry. This ensures a usable active account after purge instead of leaving the registry in an unauthenticated state. New unit and e2e tests cover the case where a stale auth.json is present and two accounts are rebuilt.

Macroscope summarized 1b61706.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 24, 2026

Open in StackBlitz

@loongphy/codex-auth-darwin-arm64

npx https://pkg.pr.new/@loongphy/codex-auth-darwin-arm64@28

@loongphy/codex-auth-darwin-x64

npx https://pkg.pr.new/@loongphy/codex-auth-darwin-x64@28

@loongphy/codex-auth-linux-x64

npx https://pkg.pr.new/@loongphy/codex-auth-linux-x64@28

@loongphy/codex-auth-win32-x64

npx https://pkg.pr.new/@loongphy/codex-auth-win32-x64@28

@loongphy/codex-auth

npx https://pkg.pr.new/@loongphy/codex-auth@28

commit: 1b61706

@Loongphy Loongphy merged commit 94dd736 into main Mar 24, 2026
10 checks passed
@Loongphy Loongphy deleted the fix-purge-activate-fallback branch March 24, 2026 06:48
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