Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Compare the security exit code directly and drop a test case that an existing personal-account test already covers. 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. |
|
Reproduced on a real macOS desktop, in case it helps unblock verification. I also hit it with a different sign-in mode than the one in #41000. Environment
So this affects any sign-in mode that stores the token in the Keychain item ACL after clicking Always Allow and the CLI's next write. The partition list is back to securityd log ( After that it prompts on a steady 5-minute cadence, which matches the usage-limits poll: Totals over the last ~3 days: 38 partition mismatches, 33 denied prompts, 30 ACL rewrites by That's the before-the-fix half of the verification that the pipeline couldn't run. |
Problem
On macOS, Antigravity instances signed in with Gemini Enterprise (
oauth-business) repeatedly trigger the system login Keychain prompt (T3 Code (Nightly) wants to access key "gemini" in your keychain) roughly every hour — even after clicking Always Allow.Why it happens:
1.5.xstores and refreshes itsgemini/antigravityKeychain item throughzalando/go-keyring, which shells out to/usr/bin/security(add-generic-password -U -s gemini -a antigravity -w go-keyring-base64:...). That places the item in macOS'sapple-tool:XARA partition.makeAntigravityUsageProbecurrently reads that item on macOS with@napi-rs/keyring, which callsSecurity.frameworkdirectly from the T3 Code process (teamid:ARK85ZXQ4Z), triggeringACL partition mismatch: client teamid:ARK85ZXQ4Z ACL ("apple-tool:").teamid:ARK85ZXQ4Zto the item's partition list, but ~1 hour later when Google's OAuth access token expires, Antigravity CLI updates the item via/usr/bin/security(SecKeychainItemModifyContent), which rebuilds the integrity ACL (no previous integrity acl exists; making a new one) back to only("apple-tool:")— wiping out T3 Code's approval and re-triggering the prompt on the next usage-limits poll.Change
apps/server/src/provider/antigravityUsageLimits.ts, addreadMacOsCliCredentialforplatform === "darwin", which reads the item via/usr/bin/security find-generic-password -s gemini -a antigravity -w(withstdin: "ignore",stderr: "ignore", scoped cleanup, and a 5-second timeout), trims stdout, and decodes it withdecodeGoKeyringSecret.44(errSecItemNotFound) returnsundefined(missing sign-in →unsupported).AntigravityKeyringError(probeFailed)./usr/bin/securityruns in the sameapple-tool:XARA partition thatgo-keyringwrites with, macOS allows reads without prompting across hourly token refreshes and app updates (matching the pattern used for Claude Code's Keychain credentials in fix(server): Claude banked resets work when the server runs on macOS #34099).apps/server/src/provider/Drivers/AntigravityDriver.ts, provide the already-acquiredChildProcessSpawner.ChildProcessSpawnerservice tomakeAntigravityUsageProbe.apps/server/src/provider/antigravityUsageLimits.test.ts, add unit tests covering macOS/usr/bin/securitydecoding (go-keyring-base64:+ trailing newline), exit code44(unsupported), non-44 error codes (probeFailed), and ensuringoauth-personalnever invokes/usr/bin/security.Scope
Fixes #41000 (also relates to #39775, which was closed as a duplicate of #37587; #39485 bypassed the keyring only for
oauth-personal, leavingoauth-businessreading the shared macOS Keychain entry).Verification
securitydlogs on T3 Code Nightly0.1.12-nightly.20261122.5085, macOS 27.2.1 arm64, Antigravity CLI1.5.12):security: SecKeychainItemModifyContent(no previous integrity acl exists; making a new one) at16:49:20,17:50:04, and18:49:55, immediately followed bysecurityd: ACL partition mismatch: client teamid:ARK85ZXQ4Z ACL ("apple-tool:")on the next usage poll even after clicking Always Allow (adding XARA partition 'teamid:ARK85ZXQ4Z' to list).vp test run src/provider/antigravityUsageLimits.test.ts src/provider/Drivers/AntigravityDriver.test.ts→ 29 passed | 1 skipped (Windows-only).vp fmt --checkon the 3 modified files → clean.effect-tsgo vp lint --report-unused-disable-directiveson the 3 modified files → 0 warnings, 0 errors.effect-tsgo tsc -p tsconfig.json --noEmit→ 0 errors in the 3 modified files./usr/bin/security -i(add-generic-password -U ... go-keyring-base64:...), updated it a second time viaadd-generic-password -Uto replicate an hourly OAuth refresh, read both back via/usr/bin/security find-generic-password ... -w, decoded both viadecodeGoKeyringSecret, deleted it and confirmed exit code44, and verified0Keychain prompts /ACL partition mismatchentries insecuritydunified logs during the run.readWindowsCliCredential) and Linux (@napi-rs/keyring) paths are unchanged.Built with Gemini 4 Neon in T3 Code (Antigravity harness).