feat(primer): fire Codex primer unconditionally like the Claude primer

Raise CODEX_PRIMER_MAX_USAGE_PCT from 1 to 100 so the Codex usage-window
primer fires at every fixed KST slot regardless of current 5h usage level,
mirroring the Claude primer (which always fires unless rate-limited). The d7
gate stays at 100 so an account whose weekly quota is exhausted is still
skipped, matching Claude's rate-limit skip.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-06-01 16:45:18 +09:00
parent f4de795b1e
commit f28399021a
2 changed files with 9 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ vi.mock('./codex-warmup.js', () => ({
}));
describe('usage-primer', () => {
it('refreshes Codex usage before primer selection and allows 1% fresh usage', async () => {
it('refreshes Codex usage before primer selection and fires regardless of usage level', async () => {
callOrder.length = 0;
refreshAllCodexAccountUsage.mockClear();
refreshActiveCodexUsage.mockClear();
@@ -68,7 +68,7 @@ describe('usage-primer', () => {
expect.objectContaining({
enabled: true,
minIntervalMs: 18_000_000,
maxUsagePct: 1,
maxUsagePct: 100,
maxD7UsagePct: 100,
}),
{ ignoreZeroUsageWindow: true },