Repository navigation
fix(server): Antigravity 1.5.16 Google sign-ins stay in profile storage - #41982
berkpolatCE wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The automated pipeline stopped on this pull request and will not merge it: the fix is written and reviewed, but proving it needs something no worker has:
It stays open for a person to finish or close. |
|
Tested this branch locally on macOS (arm64) with managed Antigravity
|
|
Tested the env change from this PR on macOS arm64 with T3 Code Nightly I didn't build the branch. The PR's only runtime change for A/B with the same binary, a fresh empty profile per run (
Without the variable, an empty profile signs in with whatever account is in the shared Keychain entry ( My real T3 profile, before:
After:
With file storage, 1.5.16 still logs I didn't test Gemini Enterprise ( |
|
My pleasure! |
…ge (pingdotgg#41982) agy 1.5.16 stopped switching to file token storage when SSH_CONNECTION is set and reads AGY_CLI_FORCE_FILE_TOKEN_STORAGE instead. Without it, personal Google sign-ins went to the shared OS keyring, which broke per-instance account isolation and left Usage limits saying "Sign in with Google". Squashed from upstream PR pingdotgg#41982, which is not merged yet. Drop this patch once upstream lands it. Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ge (pingdotgg#41982) agy 1.5.16 stopped switching to file token storage when SSH_CONNECTION is set and reads AGY_CLI_FORCE_FILE_TOKEN_STORAGE instead. Without it, personal Google sign-ins went to the shared OS keyring, which broke per-instance account isolation and left Usage limits saying "Sign in with Google". Squashed from upstream PR pingdotgg#41982, which is not merged yet. Drop this patch once upstream lands it. Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Tested this fix on
|
|
Adding an independent multi-profile verification on macOS arm64 with T3 Code's managed Antigravity CLI
(Did not test Gemini Enterprise / |
The Daily Notes build patched the official 0.1.11 app's minified bundles, so its features could not ship or merge. This re-implements them in source under apps/web/src/components/p3, with small mount points in upstream files: - Daily notes page (/daily-notes): sessions per project grouped by day, reachable from the sidebar and the command palette. - /usage?view=limits opens Usage on Limits. - Limits page shows one card per account, with a dial for the main window. - Composer usage strip: context use, last turn tokens and cache hits, remaining quota for the current model. - Thread details quota card: segmented bars for the model's windows and an Other Models list. - Right-edge quota rail with per-provider rings, account breakdowns and a burn forecast. Animations play only on hover or when a value changes. - Compact composer model picker: provider tabs, per-model quota badges and an effort slider. - Antigravity personal sign-ins keep tokens in profile storage (same change as upstream PR pingdotgg#41982). All features read existing client state only; no new network traffic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Daily Notes build patched the official 0.1.11 app's minified bundles, so its features could not ship or merge. This re-implements them in source under apps/web/src/components/p3, with small mount points in upstream files: - Daily notes page (/daily-notes): sessions per project grouped by day, reachable from the sidebar and the command palette. - /usage?view=limits opens Usage on Limits. - Limits page shows one card per account, with a dial for the main window. - Composer usage strip: context use, last turn tokens and cache hits, remaining quota for the current model. - Thread details quota card: segmented bars for the model's windows and an Other Models list. - Right-edge quota rail with per-provider rings, account breakdowns and a burn forecast. Animations play only on hover or when a value changes. - Compact composer model picker: provider tabs, per-model quota badges and an effort slider. - Antigravity personal sign-ins keep tokens in profile storage (same change as upstream PR pingdotgg#41982). All features read existing client state only; no new network traffic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge (pingdotgg#41982) agy 1.5.16 stopped switching to file token storage when SSH_CONNECTION is set and reads AGY_CLI_FORCE_FILE_TOKEN_STORAGE instead. Without it, personal Google sign-ins went to the shared OS keyring, which broke per-instance account isolation and left Usage limits saying "Sign in with Google". Squashed from upstream PR pingdotgg#41982, which is not merged yet. Drop this patch once upstream lands it. Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>



Problem
Starting with Antigravity CLI
1.5.16,composite_token_storage.gono longer falls back to file-based token storage solely becauseSSH_CONNECTIONis set when a system keyring (such as macOS Keychain) is available, and it ignoresAGY_ACP_FORCE_FILE_STORAGE. Instead,1.5.16checksAGY_CLI_FORCE_FILE_TOKEN_STORAGE.Because
antigravityEnvironmentdid not setAGY_CLI_FORCE_FILE_TOKEN_STORAGE, personal Google (oauth-personal) sign-ins (agy acp --login) and sessions on1.5.16silently read and wrote the shared OS keyring instead of<profile>/antigravity-acp/antigravity-oauth-token. That broke per-instance account isolation and causedmakeAntigravityUsageProbe(which skips the shared keyring foroauth-personal) to report"Sign in with Google to see Antigravity limits.".Change
apps/server/src/provider/antigravityAuthSupport.ts:AGY_CLI_FORCE_FILE_TOKEN_STORAGEtoremovedEnvironmentKeysso ambient values (including case-insensitive Windows aliases) cannot override"1"foroauth-personalor leak into other auth methods.AGY_CLI_FORCE_FILE_TOKEN_STORAGE: "1"inantigravityEnvironmentforoauth-personal, keepingSSH_CONNECTION(needed by1.5.12–1.5.15for file storage and by1.5.16for headlessNo browser is available heredetection) andAGY_ACP_FORCE_FILE_STORAGE: "1".oauth-business(Gemini Enterprise) unchanged so existing Enterprise keyring sign-ins andantigravityUsageLimits.ts's keyring fallback keep working.apps/server/src/provider/antigravityAuthSupport.test.ts:AGY_CLI_FORCE_FILE_TOKEN_STORAGE(and its lowercase alias) is stripped and set to"1"foroauth-personal, and stripped (undefined) forgemini-api-key,agent-platform, andoauth-business.Note:
oauth-personalusers who already signed in on1.5.16before this fix have their token only in the shared OS keyring and will need to sign in once after upgrading soantigravity-oauth-tokenis written into the profile (any previous shared keyring entry is left untouched).Scope
Fixes #41973
Verification
main@4afdfefde0, macOS arm64 with live macOS Keychain, managed Antigravity CLI1.5.16):antigravity acpwithSSH_CONNECTION="127.0.0.1 0 127.0.0.1 0"andAGY_ACP_FORCE_FILE_STORAGE=1(noAGY_CLI_FORCE_FILE_TOKEN_STORAGE) against a profile containing a syntheticantigravity-oauth-tokenignored the profile file and loaded the macOS Keychain account instead;antigravity acp --logindid not log file-based token storage.vp test run apps/server/src/provider/antigravityAuthSupport.test.tsfailed the 2 updated assertions (AGY_CLI_FORCE_FILE_TOKEN_STORAGE=0and lowercase alias leaked through; ambientAGY_CLI_FORCE_FILE_TOKEN_STORAGE=1leaked into non-personal methods).1.5.16viaprepareAntigravityProfile+buildAntigravityAcpSpawnInputwith realHOME(macOS Keychain active):oauth-personalwith a synthetic profileantigravity-oauth-tokenand ambientAGY_CLI_FORCE_FILE_TOKEN_STORAGE=0: loggedcomposite_token_storage.go:207] Using file-based token storage because AGY_CLI_FORCE_FILE_TOKEN_STORAGE is setand authenticated as the profile token (e2e-profile@example.com), not the macOS Keychain account.oauth-personalwith an empty profile: logged file-based token storage and returned JSON-RPC error-32603(No browser is available here...), without reading macOS Keychain.oauth-personalacp --login(matchingAntigravityDriver.codeLoginenv): logged file-based token storage and printed the Google OAuth URL.oauth-businesswith ambientAGY_CLI_FORCE_FILE_TOKEN_STORAGE=1: stripped (undefined).vp test run apps/server/src/provider/antigravityAuthSupport.test.ts apps/server/src/provider/Drivers/AntigravityDriver.test.ts apps/server/src/provider/antigravityUsageLimits.test.ts→ 59 passed, 1 skipped (Windows-only).vp run check:changed→ format, lint, knip, graphql, typecheck (3 packages), and tests (2 files) all pass.Built with Gemini 4 Neon in T3 Code (Antigravity harness); independently reviewed by Claude Fable 5.2 and GPT-6.2-Sol.