fix(codex-auth): surface registry corruption

This commit is contained in:
Tam Nhu Tran committed 2026-05-17 18:02:13 -04:00
1 parent c90b3cb9da
commit 54738e88f7
5 files changed
+51 -11

No files matched your search

@@ -127,6 +127,18 @@ describe('CodexProfileRegistry — remove', () => {
reg.removeProfile('work');
expect(reg.getDefault()).toBeNull();
});
it('does not promote another profile when the default profile is removed', () => {
const reg = new CodexProfileRegistry(registryPath);
reg.createProfile('work');
reg.createProfile('personal');
reg.setDefault('work');
reg.removeProfile('work');
expect(reg.listProfiles()).toEqual(['personal']);
expect(reg.getDefault()).toBeNull();
});
});
describe('CodexProfileRegistry — default pointer', () => {