fix(server): support Antigravity auth in standalone binary - #11936
MohtashamMurshid wants to merge 1 commit into
Conversation
| }).pipe( | ||
| Command.unlisted, | ||
| Command.withHandler(({ url }) => | ||
| Console.error(`${ANTIGRAVITY_AUTH_BROWSER_MARKER}${JSON.stringify(url)}`), |
There was a problem hiding this comment.
🟡 Medium cli/antigravityBrowser.ts:19
When Antigravity closes the helper's stderr pipe during browser cancellation, this handler exits nonzero with an unhandled EPIPE instead of completing the suppression flow. Console.error writes directly to the global stderr, but this standalone helper does not install the stderr error handling used by the inline helper; Python therefore treats the command as failed and launches a real browser. Add the same EPIPE handling to the helper's stderr stream before writing the marker.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/server/src/cli/antigravityBrowser.ts around line 19:
When Antigravity closes the helper's `stderr` pipe during browser cancellation, this handler exits nonzero with an unhandled `EPIPE` instead of completing the suppression flow. `Console.error` writes directly to the global `stderr`, but this standalone helper does not install the `stderr` error handling used by the inline helper; Python therefore treats the command as failed and launches a real browser. Add the same `EPIPE` handling to the helper's `stderr` stream before writing the marker.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes the production Antigravity authentication flow and adds a hidden standalone-binary command that emits OAuth authorization URLs, making it a sensitive authentication-path change. An unresolved Medium finding also reports missing EPIPE handling during browser cancellation, which can alter fallback behavior. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. 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 (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe CLI adds a hidden Antigravity browser helper. Antigravity profile preparation uses this helper when the runtime is a single executable and retains the inline evaluation path for other runtimes. Tests cover both command output and executable preflight invocation. ChangesAntigravity browser helper
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The standalone executable preflight path is wired to the hidden browser helper while Node installations retain the existing inline path. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
The Antigravity profile setup assumes the host executable is Node and invokes it with
-e. Standalone T3 binaries reject that flag, so browser suppression preflight fails before any auth method can start.This adds an unlisted
__antigravity-browsercommand for standalone builds and selects it throughHostProcessIsExecutable. Node-based installs keep the existing inline helper. Regression coverage uses a non-Node executable path, and the built Linux SEA was checked for exact marker output and successful EPIPE handling.Tests:
vp test run apps/server/src/provider/antigravityAuthSupport.test.ts apps/server/src/cli/antigravityBrowser.test.ts apps/server/src/bin.test.ts(53 passed)Fixes #11767
Implemented with GPT-5.6 Sol through the Codex harness in T3 Code.
Summary by CodeRabbit
New Features
Bug Fixes
Tests