Repository navigation
fix(antigravity): read plan limits with Antigravity User-Agent and fix usage refresh races - #1086
Merged
Merged
Conversation
…x usage refresh races Antigravity plan limits stayed stuck on "Usage unavailable" after signing in because Cloud Code quota requests sent a Threadlines User-Agent and logged nothing when Google rejected them. Even when a read succeeded, several races could drop or delay the result: model discovery overwrote out-of-band usage on the snapshot, reads that landed while the snapshot was pending were discarded, null optional fields in the token file failed decoding, and CLI token renewals waited up to 5 minutes for the next periodic probe. - Send Antigravity's Cloud Code client User-Agent on quota requests (keeping Threadlines/<version> on Google userinfo) and log safe host, operation, and reason warnings on failures, malformed 200 payloads, or unreadable token files. - Accept null values for optional token file fields (`refresh_token`, `expiry`, `id_token_email`) and treat malformed 200 summary bodies as failed reads so last good rows are kept. - Track the access-token hash so a renewed token on disk immediately bypasses the 2-minute throttle and cancels any stale in-flight read. - Patch only `models` and `versionAdvisory` during ACP model enrichment and reconcile any background usage read that landed while the snapshot was pending or across an account switch. - Trigger a usage refresh after Antigravity sessions open, model discovery runs, prompts settle, and when clicking Refresh on the Usage page.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
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.
Antigravity plan limits stayed stuck on "Usage unavailable" after signing in because Cloud Code quota requests sent a Threadlines User-Agent and logged nothing when Google rejected them. Even when a read succeeded, several races could drop or delay the result: model discovery overwrote out-of-band usage on the snapshot, reads that landed while the snapshot was pending were discarded, null optional fields in the token file failed decoding, and CLI token renewals waited up to 5 minutes for the next periodic probe.
Fixes
antigravity/hub/2.24.0 (aidev_client; os_type=...; arch=...; cl=963137146)) on quota requests while keepingThreadlines/<version>on Google userinfo.nullfor optional token file fields (refresh_token,expiry,id_token_email) and treat 200 summary responses with neithergroupsnorbucketsas failed reads so last good rows are kept.modelsandversionAdvisoryduring ACP model enrichment so out-of-bandaccountUsageis preserved, and reconcile any landed background usage read when a probe snapshot commits.Verification
vp fmt,vp lint, andvp run typecheck(all 14 packages)AntigravityUsage,AcpProviderDriver,AntigravityAcpSupport,AntigravityTurns,CursorAcpSupportUsageView