feat(usage): Antigravity quota grouping and auto-ping scheduler - #82
Open
mahdiwafy wants to merge 1 commit into
Open
feat(usage): Antigravity quota grouping and auto-ping scheduler#82mahdiwafy wants to merge 1 commit into
mahdiwafy wants to merge 1 commit into
Conversation
mahdiwafy
force-pushed
the
pr/antigravity-quota-tracker
branch
from
July 31, 2026 03:09
b3b473a to
621afd5
Compare
Owner
|
Request for revision with concrete behavior requirements. Antigravity quota grouping and auto-ping are relevant, but auto-ping changes real provider quota consumption and must not be enabled implicitly. Please add:
Please preserve existing usage history, token tracking, account fallback, proxy behavior, and RTK/Caveman/Ponytail request flow. The UI grouping can be reviewed separately from the scheduler. |
… tests Per maintainer feedback on Vanszs#82: - auto-ping is explicit opt-in (default off): only connections with settings[settingsKey].connections[connId] === true are targeted; empty map = no pings. - weekly usage marked estimated: true (7-day history scaled + 4x multiplier), documented as estimate not provider-reported. - scheduler hardened: failure cooldown, duplicate-reset protection (lastPingedResetKey), min ping interval, refresh fail-soft. - providerHandlers injectable for tests. - tests: opt-in default-off, per-connection enable, duplicate reset skip, failed ping does not corrupt state, refresh failure fail-soft, bucket classification fixtures (gemini_weekly / claude_gpt_weekly), error rows skipped.
mahdiwafy
force-pushed
the
pr/antigravity-quota-tracker
branch
from
August 4, 2026 09:12
621afd5 to
3fb0887
Compare
Author
|
Per your #82 review notes:
All 8 new tests pass. |
Vanszs
requested changes
Aug 6, 2026
Vanszs
left a comment
Owner
There was a problem hiding this comment.
Request changes
Cross-check against the latest main found runtime blockers despite green build checks:
- Antigravity is not registered in
QUOTA_AUTOPING_CONFIG.providers. The scheduler iteratesObject.entries(C.providers), so the new handler is never scheduled. Add the provider config with explicit per-connection opt-in and default-off behavior. sendAntigravityPing()sends an incompatible executor payload. It passesmessagesat the top level instead of the executor's expectedbodyshape. Add a test against the actual executor call, not a mockedsendPinghandler.- Successful ping returns
undefinedafter draining the stream. The caller treats falsy as failure, solastPingedResetAt/lastPingedResetKeyare never persisted. - No timeout/abort for
reader.read(). A hanging upstream stream can holdstate.runningindefinitely. - Proxy arguments are incorrect for
getAntigravityUsage():proxyOptionsis passed asproviderSpecificData, leaving the proxy argument unset. - Weekly tracker is orphaned: no runtime usage/UI path calls
getWeeklyUsage(). - Weekly extrapolation uses first-use timestamps between buckets and can produce absurd scaling for short observations. Bound or defer estimation and test the edge cases.
Please rebase onto current main, add executor/proxy/timeout/error-path tests, and rerun targeted tests plus the full build/test checks.
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
Refactor Antigravity usage parsing to group models into quotas buckets (Gemini vs Claude/GPT) as enforced by the upstream API, and add an Auto-Ping scheduler to keep windows warm.
Changes
Quota Grouping:
open-sse/services/usage/google.jsno longer loops through 10 repeated models. It now parses the response and outputs two specific buckets:gemini_bucket: Represents the shared limits for all Gemini models.claude_gpt_bucket: Represents the shared limits for Claude and GPT-OSS models./dashboard/usageto show 2 progress bars instead of 10 repeated/misleading rows.Auto Ping Scheduler: Added
antigravityto the Auto Ping scheduler (src/shared/services/quotaAutoPing.js&config.js).gemini-3.5-flash-lowto immediately restart the quota window.Verification
npm run lint:undef— clean