Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): distinguish session initialization auth failures #9919

Mergedmaria-rcksmerged 1 commit intomain fromrefs/pull/9919/headmerged by maria-rcks View on GitHub

maria-rckscommented

antigravity session initialization failures after authentication currently appear as generic sign-in failures. identify ACP session/new internal errors as a failure to initialize a session or load models, without exposing the provider error payload.

verified with 19 focused auth tests, server typecheck, and scoped lint and formatting checks. the focused auth test output is shown below. this improves diagnostics; it does not fix the upstream ACP failure.

19 focused antigravity auth tests passing

relates to #9655.

implemented with gpt-6-astra in codex.


Note

Low Risk User-facing error strings only in Antigravity auth; no changes to sign-in, session, or credential handling logic.

Overview After Google sign-in succeeds, Antigravity failures during session/new (ACP internal error -32603) no longer surface as generic “Google sign-in failed” messages.

safeAuthFailure now maps that case to: “Antigravity authenticated, but could not initialize a session or load models.” The raw provider errorMessage (e.g. redirect URLs or other payload) is not shown to users.

A focused auth test simulates auth succeeding then session/new failing, and asserts the new copy, no leaked callback details, unchanged model catalog, and clean process shutdown. The test harness types the discovered deferred so it can fail with AcpRequestError like production.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit fa71942a53befe4fd4e8178e98de58842bd2bf26. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix AntigravityAuth.safeAuthFailure to distinguish session/new errors

Maps ACP request errors from session/new with code -32603 to the message "Antigravity authenticated, but could not initialize a session or load models." instead of the generic auth failure message. Updates makeAuthTestHarness to propagate discovery failures and adds a test covering the post-authentication session failure path.

Macroscope summarized fa71942.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — The PR is a small, well-scoped correction to Antigravity’s user-facing handling of post-authentication session failures, with focused test coverage and no schema or default changes. Because it modifies production authentication behavior and error disclosure, human review is warranted.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. maria-rcks merged this6349a0e

    4. maria-rcks closed this

Sign in to join this conversation.