fix(server): exhausted Antigravity quotas show as used up instead of disappearing #29565
main fromrefs/pull/29565/head·opened View on GitHubProblem#
When an Antigravity quota runs out, it disappears from the usage limits instead of showing 100% used with its reset time. The user sees fewer rows than usual at the exact moment the limit matters most.
Google's quota endpoints (v1internal:fetchAvailableModels and retrieveUserQuotaSummary) return proto3 JSON, which leaves out zero-valued fields. An exhausted quota therefore arrives as {"resetTime": "..."} with no remainingFraction. Other Antigravity tools have seen this on real accounts (for example gajae-code#7267, where every exhausted gemini-* model returned only {"resetTime":"2026-10-31T00:30:21Z"}). quotaWindow dropped any quota with a missing remainingFraction, so these pools vanished. In the model fallback, an exhausted model could also be hidden behind a less-used sibling in the same family.
Change#
In quotaWindow, a quota that has a valid resetTime but no remainingFraction is now read as remainingFraction: 0 (fully used). A quota with neither field is still skipped, as before. Untouched-bucket reset hiding (summaryResetTime) only applies when remainingFraction === 1, so it is unaffected.
Scope and approval#
Very small, focused fix for an obvious bug, so no prior issue: one parser function treats the API's encoding of "0 remaining" as "no data". The change is 5 non-test lines plus extensions of two existing test cases.
Overlap search: local PR index and gh search for Antigravity quota/remaining/exhausted. The closest is open #21020, a broad, conflicting PR that also resolves quota projects and changes the UI. It guesses a zero for summary buckets from description text and does not cover model quotas. #23558 and #20081 (merged) cover untouched resets and endpoint merging, not missing fractions.
Verification#
- Red on main (
cd apps/server && vp test run src/provider/antigravityUsageLimits.test.ts):falls back to model quotas…failed withexpected 40 to be 100, and the summary case failed because the exhaustedgemini-weeklywindow was missing. - Green on this branch: 16/16 in
antigravityUsageLimits.test.ts, 22/22 inAntigravityProvider.test.ts. vp run check:changed: format, lint, knip, typecheck (3 packages), and tests all pass.- Not checked: a live Antigravity account with an exhausted quota. The payload shape comes from the linked reports.
Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Approvability#
Verdict: Approved at
04f77b7Macroscope's review found this PR approvable — Exhausted Antigravity quotas with an omitted remaining fraction and valid reset time now appear as fully used rather than disappearing. The change is confined to quota reporting and retains existing validation safeguards.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review.
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: cbd3e14
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9ce506bd-d114-475c-a93a-5b9f6704feba
Commits-
Reviewing files that changed from the base of the PR and between cbd3e149a130f1d99d2d067c77b9889d64e28755 and 04f77b76a03d1ddd6d44ca67e07ff1df83501c84.
Files selected for processing: 2-
apps/server/src/provider/antigravityUsageLimits.test.tsapps/server/src/provider/antigravityUsageLimits.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
Walkthrough
-
Quota windows now treat a missing remaining fraction as exhausted when the reset time is valid. Tests cover model fallback and summary-bucket results.
Changes: Quota window handling
Layer / File(s) Summary Missing-fraction quota handling
apps/server/src/provider/antigravityUsageLimits.ts,apps/server/src/provider/antigravityUsageLimits.test.tsquotaWindowdefaults a missing fraction to zero when the reset time is valid. Tests verify 100% usage and a weekly window with its reset time and duration.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
lvc-chakresh
Merge Risk:
Minimal · up to04f77-
The quota handling change has no established merge-blocking risk.
Pre-merge checks:
4-
Check name Status Explanation Title check The title clearly and concisely describes the main fix: exhausted Antigravity quotas now remain visible as fully used. Description check The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the API behavior, implementation, test results, scope rationale, and remaining live-accoun… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Description check
-
Explanation
The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the API behavior, implementation, test results, scope rationale, and remaining live-account limitation.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
tanstack-source added labelsbug
Review requested
Logged so this PR shows when a maintainer was asked to review it.Date (UTC) Reviewer Where 2026-11-13 Julius Discord DM Note
🤖 GPT-6.1 Sol responding on behalf of saphid
Withdrawing this PR. It has been open for over 18 days without maintainer engagement, and no review ask is recorded in the last seven days. The branch stays at
saphid:fix/antigravity-exhausted-quota. A fresh smaller PR will link this one if the change still matters.saphid(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes