Repository navigation
Conversation
…BillingError/RateLimitError Entire-Checkpoint: 13aae515c4d7
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
classifyCodexTurnFailureincodex.tsmaps Codexturn.failedmessages to typed errors: usage limit toBillingError(orRateLimitErrorwithresetsAtwhen the reset is within a fixed 7-day horizon), throttle wording to a retryableRateLimitError, anything else toSequantErrorcodeturn-failed.it.failscodex cases in the test(drivers): conformance suite every agent driver must pass — commit in sandbox, network, typed error mapping, env injection, structured outcome #1096 conformance suite to plainit.Acceptance criteria
AC-1: usage-limit turn.failed gives BillingError with reset text in metadata (driver-conformance, codex.test.ts)
AC-2: throttle turn.failed gives retryable RateLimitError (driver-conformance, codex.test.ts)
AC-3: other turn.failed stays SequantError with code turn-failed (driver-conformance, unchanged and green)
AC-4: the real Codex-mapped BillingError stops the -Q loop; exec dispatched once, loop never (batch-executor.test.ts, new #1087 describe)
AC-5: the fixtures are the verbatim run-2 message; mutation records below
Judgement calls
RateLimitError(so--auto-waitcan engage); beyond, past, or unparseable maps toBillingError(fail closed). The 7-day horizon is a driver-side constant because the driver cannot seeautoWaitMinutes. Needs owner confirmation.errorevent with noturn.failedis not widened; it stays generic.rate_limitsin thecodex exec --jsonstream is unverified (not observed in the run-2stdoutTail, which is only the last 50 lines); no live stream was scanned. The mapping does not depend on it.Verification
Ran only the named files (runner rules): codex.test.ts, driver-conformance.test.ts, batch-executor.test.ts, plus
src/lib/workflow/drivers: all green.npm run buildandnpm run lintclean. Fullnpm testleft to the runner.Mutation-verified: AC-1 — broke the usage-limit regex; driver-conformance usage-limit case failed; restored.
Mutation-verified: AC-4 — same mutation; the #1087 batch-executor case failed; restored.
Closes #1087
🤖 Generated with Claude Code
Runner verification (guard-2026-09 wave 2, 2026-09-20)
codex.test.ts(45 passed), the conformancecodexgroup (8 passed, the two formerit.failscases now plain and green) and the#1087batch-executor case (1 passed); both markers classifier-valid; thebatch-executor.test.tschange is one appended block.npm testfrom a clean shell on052fedc5: 329 files, 6627 passed, 1 expected fail, 3 skipped, 354 s. CI green.