fix: restore main quality checks

This commit is contained in:
Eyejoker
2026-06-02 18:37:37 +08:00
committed by GitHub
parent 5648b61075
commit 7fc558acb6
6 changed files with 149 additions and 48 deletions

View File

@@ -222,6 +222,22 @@ describe('codex-token-rotation d7 ≥ 100% auto-skip', () => {
expect(accounts[0].isRateLimited).toBe(false);
expect(accounts[1].isActive).toBe(true);
});
});
describe('codex-token-rotation auth synchronization', () => {
let tempHome: string;
beforeEach(() => {
vi.resetModules();
tempHome = fs.mkdtempSync(path.join('/tmp', 'ejclaw-codex-rot-'));
process.env.CODEX_ROT_TEST_HOME = tempHome;
createFakeAccounts(tempHome, 4);
});
afterEach(() => {
delete process.env.CODEX_ROT_TEST_HOME;
fs.rmSync(tempHome, { recursive: true, force: true });
});
it('recovers a dead_auth account when canonical auth.json is refreshed before lease claim', async () => {
vi.useFakeTimers();