Repository navigation
Conversation
Pin now in the Codex usage-limit tests so BillingError assertions stop depending on the wall clock crossing the fixture's 7-day RateLimitError horizon on 2026-10-09. Entire-Checkpoint: 7b779d204ec5
…mit tests Claude-Session: https://claude.ai/code/session_01L1XB34cHJP87u166RC13Jn Entire-Checkpoint: b1254e7e12a1
admarble
deleted the
feature/1248-fix-test-codex-usage-limit-tests-read-the-real-clo
branch
October 1, 2026 03:18
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CodexRunOutcomegains an optionalnow?: number, threaded intoclassifyCodexTurnFailureinsideevaluateCodexRun. Production (:nowunset) keepsDate.now()via the existing default parameter.driver-conformance.test.ts'scodexOutcome()helper andbatch-executor.test.ts's inlineevaluateCodexRun()call now pinnowto 2026-09-01, well before the fixture's 2026-10-16 reset enters the 7-dayRateLimitErrorhorizon — the tests no longer flip toRateLimitErrorwhen the wall clock crosses 2026-10-09.codex.test.tsgets a new case that parses the realcodex-turn-failed-usage-limit.jsonlfixture throughevaluateCodexRunwithnowset inside the 7-day horizon (2026-10-10), assertingRateLimitErrorwith the correctresetsAtepoch — so that branch is covered on purpose, not by the calendar.Mutation verification (AC-3)
Reverted
driver-conformance.test.ts'sPINNED_NOWto2026-10-10(inside the horizon), ran the file, confirmed the BillingError assertion failed as expected, then restored the pin.Mutation-verified: AC-3 — set
PINNED_NOWto 2026-10-10 (inside the fixture's 7-day horizon);src/lib/workflow/drivers/__tests__/driver-conformance.test.ts > driver conformance > codex > errors > map the verbatim #1087 usage-limit turn failure to BillingErrorfailed; restored.Test plan
npx vitest run src/lib/workflow/drivers/__tests__/driver-conformance.test.ts src/lib/workflow/batch-executor.test.ts src/lib/workflow/drivers/codex.test.ts— 190 passednpm run build— passesPre-PR AC Verification
nowpinned incodexOutcome()(driver-conformance.test.ts) and inline call (batch-executor.test.ts)codex.test.tsusing the real fixture,nowinside the windowRunner verification (head e7fb33d)
evaluateCodexRun,classifyCodexTurnFailureor the usage-limit fixture (grep -rlE … --include='*.test.ts' | xargs npx vitest run). Result: 3 files, 190 passed.now: PINNED_NOWfromcodexOutcome()and faked the system clock to 2026-10-10 (vi.useFakeTimers({toFake:["Date"]})+vi.setSystemTime). Exactly one test failed, the one named below. Restored.mainwould have gone red.outcome.nowundefined,classifyCodexTurnFailure(msg, undefined)falls back to theDate.now()default parameter, so runtime behaviour is unchanged.### Fixedentry (e7fb33d).Mutation-verified: AC-3 — removed
now: PINNED_NOWfromcodexOutcome()and set the system time to 2026-10-10;src/lib/workflow/drivers/__tests__/driver-conformance.test.ts > driver conformance > codex > errors > map the verbatim #1087 usage-limit turn failure to BillingErrorfailed; restored.Closes #1248
🤖 Generated with Claude Code