mirror of
https://github.com/openai/codex.git
synced 2026-11-11 21:10:39 +00:00
## Why A pending token refresh must not overwrite a newer login or recreate credentials after logout. Legacy file entries also need to retain their stored identity across refreshes. ## What changed - Lock and revalidate stored credentials before persisting changed authorization-manager credentials, requiring authorization again if storage has changed. - Update file-backed refreshes only when the matched entry still contains the expected credentials, preserving its key, server name, and ownership. Compare only fields the file format can persist. - Remove matching legacy file entries when saving login credentials or deleting credentials, while preserving unrelated entries and profile-scoped enterprise credentials' separate local entries. ## Testing Add regression coverage for newer logins and logout during pending persistence, repeated refreshes of legacy and escaped-name entries, and cleanup that preserves unrelated credentials. Update guard-retention and telemetry assertions for the validation path. GitOrigin-RevId: 3d7c603950afcff72f0bcd943edae5ecfbcb5bd2