fix(server): deliver Antigravity sign-in URLs without stderr - #10704
fix(server): deliver Antigravity sign-in URLs without stderr#10704mtdewwolf wants to merge 4 commits into
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This authentication fix introduces a new loopback HTTP delivery path and changes how the browser helper communicates with the server during sign-in. It also adds a production static-analysis suppression directive, so the change warrants human review. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe Antigravity authentication flow now uses a loopback HTTP sink to deliver authorization URLs. The browser helper posts the URL to the sink, and the server forwards valid requests to the runtime callback. Tests cover validation, cleanup, shutdown, and end-to-end delivery. ChangesAntigravity authentication handoff
Priority: ➖ Normal — Impact reflects medium issue severity. Estimated code review effort: 3 (Moderate) | ~20 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Antigravity sign-in URLs are delivered through a scoped local listener with the existing stderr marker retained as a fallback. The covered failure and shutdown paths leave no concrete current-head merge-blocking risk. Sequence Diagram(s)sequenceDiagram
participant BrowserHelper
participant AuthorizationSink
participant AntigravityAuthCallback
BrowserHelper->>AuthorizationSink: POST authorization URL
AuthorizationSink->>AntigravityAuthCallback: forward validated URL
AntigravityAuthCallback-->>AuthorizationSink: complete or fail
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Addressed the review findings in 991fd6d:
Validation: 52 focused auth/support tests passed. After replacing the new test's JSON encoder with the repository's Schema helper, all 33 support tests passed again. Server typecheck, targeted lint, formatting, and diff checks passed. Full Google OAuth/client verification remains unperformed as documented in the PR. |
Antigravity sign-in can remain stuck when Python's Windows browser subprocess loses the helper's stderr, leaving T3 without the Google authorization URL (#9624; transport investigation in #9690).
Send the existing browser helper's URL to a tokenized
127.0.0.1listener scoped to explicit sign-in. The listener validates the URL and passes it to the existing auth controller, preserving client ownership and remote callback handling. Rejected or failed listener delivery falls back to the existing stderr marker. The helper still exits successfully if cancellation closes both the listener and stderr, preventing a fallback browser launch on the server. Ambient listener variables are removed before configuring each process.Validation on Windows:
webbrowsersuccessfully delivered a synthetic URL through the new listener. The standalone probe preserved stderr before the change, so it did not independently reproduce the reported failure; the regression test explicitly discards stdio. No full Google OAuth or client UI session was performed.Fixes #9624.
Model: GPT-6. Harness: Codex.
Note
Deliver Antigravity sign-in URLs via loopback HTTP listener instead of stderr
serveAntigravityAuthorizationUrlSink, a scoped loopback HTTP listener with a random 32-byte token in the path that accepts one POST, forwards the parsed authorization URL to the supplied callback, and returns 204 on success.buildAntigravityAcpSpawnInputwrites the sink URL to the canonical environment variable only when supplied, andremovedEnvironmentKeysstrips inherited sink values so stale values are not carried forward.AntigravityDriver.createstarts the listener when an authorization callback is provided and passes the resulting URL into the ACP spawn configuration.ANTIGRAVITY_AUTHORIZATION_SINKaliases in the environment are silently dropped; only the canonical variable name is emitted, so any external tooling relying on the old alias will stop receiving the sink URL.?? Macroscope summarized 7ad9a7b. 2 files reviewed, 1 issue evaluated, 1 issue filtered, 0 comments posted
??? Filtered Issues
apps/server/src/provider/antigravityAuthSupport.ts � 0 comments posted, 1 evaluated, 1 filtered
T3_ANTIGRAVITY_AUTH_SINKis present, as inprepareAntigravityProfile's browser-suppression preflight,process.env.T3_ANTIGRAVITY_AUTH_SINK && fetch(...)evaluates toundefinedand the generated helper immediately evaluatesundefined.then(...). The helper therefore exits with aTypeErrorinstead of writing its stderr marker, so the preflight rejects and every Antigravity profile setup fails before the ACP can start. [ Out of scope (triage) ]Summary by CodeRabbit
New Features
Bug Fixes