[WRONG BRANCH] fix(kiro): honor exhausted account cooldown on rotation - #400
[WRONG BRANCH] fix(kiro): honor exhausted account cooldown on rotation#400luvs01 wants to merge 1 commit into
Conversation
|
✅ Deterministic PR hygiene checks passed. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
⏳ DRAFT
What to do
Its title has been prefixed with |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Motivation
Retry-Afteras if no exhausted-cooldown applied because the parser returnsundefined(notnull), so Kiro accounts known to be exhausted received only the one-minute fallback and could re-enter rotation prematurely.Description
rotateGenericOAuthAccountOn429to useparsed === undefinedsoexhaustedCooldownMsis consulted whenRetry-Afteris absent or invalid, restoring the reset-aligned cooldown for Kiro accounts.tests/kiro-pool-rank.test.ts(rotation uses the reset-aligned cooldown when Retry-After is absent) that seeds a two-account Kiro OAuth pool, marks one account exhausted with a future reset, triggers rotation with noRetry-After, and verifies the exhausted account remains ineligible past the one-minute fallback.eligibleFailoverAccountsfor the new assertion; no behavioral changes outside the rotation cooldown selection were made.Testing
node_modules/.bin/bun test tests/kiro-pool-rank.test.ts, which passed (23 tests passed).bun run typecheck, which succeeded.bun run privacy:scan, which passed.node:zlibexports required by this checkout and failed the focused test run there, but the repository-local Bun v1.4.0 successfully executed the tests;bun run test:changedwas not run due to no resolvable upstreamdevcomparison ref in this environment.Codex Task