Repository navigation
fix(antigravity): let a 429 hop's 5xx replacement take the one fault hop - #8839
Conversation
The generic 429 account-hop loop re-entered recovery only for non-replayable responses, so a replayable 502/503/504 from the replacement account left the loop and the one-hop 5xx sibling rotation never ran: A:429 -> B:503 failed without trying C. The 5xx guard moves to antigravity-fault-rotation.ts and the 429 hop re-enters recovery when it holds, still once per exchange.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codex Review Summary: ✅ CompletedThis 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. |
|
✅ Deterministic PR hygiene checks passed. |
|
@coderabbitai review |
Action performed
|
|
Maintainer integration of #8839 at e2a0b00. It fixes CodeRabbit thread PRRT_kwDOS-0Gi863wcE0, left on #8778.
|
… one fault hop (#8846) The verify-account 403 hop loop re-entered recovery only for non-replayable responses, so a replayable 502/503/504 from the replacement account left the loop and the one-hop 5xx sibling rotation never ran: A:403 verify -> B:503 failed without trying C. The hop now asks isAntigravityFaultRotatable, the same guard the 429 hop uses since #8839, still once per request. Follow-up to #8839 (CodeRabbit thread PRRT_kwDOS-0Gi863wcE0 on #8778).
Summary
Addresses CodeRabbit review thread
PRRT_kwDOS-0Gi863wcE0on #8778.With three eligible Antigravity accounts, account A answers 429 and the generic 429 account hop replays on B. If B's same-account transient ladder then ends in a replayable 502/503/504, the request failed with B's 5xx and never tried C, even though the one-hop 5xx sibling rotation was still unspent. The 429 loop re-entered recovery only for non-replayable responses, so the 5xx arm never saw B's response.
src/server/responses/antigravity-fault-rotation.ts(isAntigravityFaultRotatable) holds the existing 5xx-rotation guard: Antigravity, 502/503/504, Google adapter, pool activated, not yet attempted, replayable, failover limit not reached. The 5xx arm inadapter-dispatch.tsuses it unchanged in meaning.antigravityFaultRotationAttemptedstill limits it to one hop per exchange, and the failover limit and send budget still apply.adapter-dispatch.tsshrinks from 1,993 to 1,991 lines.structure/transports/responses.mdgains an ownership row for the new module, andtests/helpers/responses-core-source.tslists it in the module roster. The provider docs already state that a surviving 502/503/504 replays once on an eligible sibling; this change makes the 429-then-5xx path honour that, so the en/es docs need no edit.This PR does not overlap #8835 (
fix/antigravity-auth-failed-enum, the other half of the #8778 follow-ups).git merge-treeof the two heads is clean.Verification
Regression test (focused, single file under
/usr/bin/lockf -k /tmp/ocx-test.lock):tests/server/server-google-antigravity-oauth-401-replay.test.ts→ "a 429 hop whose sibling then answers 5xx takes the one fault hop to a third account". The script is A:429 ×3, B:503 ×3, C:200. It expects a 200 from C onproject-c, A to keep its rate-limit cooldown, B to get the fault cooldown (both ineligible), no needs-reauth mark, and bothoauth-account-429andtransient-5xxrecovery kinds. On origin/dev 3ef14ad it fails: the sends stop after B's three 503s and C is never tried. With the fix the whole file passes, 65 pass / 0 fail.responses-core-modules,server-google-antigravity-oauth-429-budget,inference-send-budget,server-generic-oauth-affinity,generic-oauth-failover,server-key-failover-e2e,responses-send-budget-errors,errors-adapter-failure,openrouter-quota-reset-cooldown-4024,oauth-account-quota-rank,server-antigravity-model-denial-recovery,server-antigravity-web-search-validation,provider-antigravity-quota-retry,file-size-ratchet,structure-ssot.bun run typecheck,bun run structure:check,bun run privacy:scan: pass.NOT RUN: full
bun run testandtest:changedlocally. The host is under heavy load and this lane is limited to focused single-file runs. Broader coverage is left to CI (ci:full).Checklist
Summary by CodeRabbit