feat: Antigravity safeguards (canonical destinations, strict affinity, snapshot pairing, TLS profile, and URI redaction) - #2525
Conversation
…uppercase precedence
…re proxyValue precedence
…nd verify web-search canonical gate
|
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This pull request was already a draft. Its draft status will be preserved after every issue above is resolved. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (73)
📝 WalkthroughWalkthroughThis PR adds Antigravity TLS profile support, request-pacing jitter, Antigravity account routing and retry handling, provider management updates, GUI controls, localized strings, and matching documentation and tests. ChangesAntigravity TLS profile, pacing, and routing
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant ProviderSettings
participant ProviderRoutes
participant ProviderTlsProfile
User->>ProviderSettings: enable antigravity-browser
ProviderSettings->>ProviderRoutes: PATCH tlsProfile
ProviderRoutes->>ProviderTlsProfile: clear cached status
ProviderRoutes-->>ProviderSettings: provider with tlsProfileStatus
ProviderSettings-->>User: show disabled/active/fallback
sequenceDiagram
participant Client
participant Responses
participant Routing as AntigravityRouting
participant OAuth
participant Google
Client->>Responses: request
Responses->>Routing: resolve session account
Routing-->>Responses: account and cooldown state
Responses->>OAuth: get token snapshot for account
OAuth-->>Responses: access token and projectId
Responses->>Google: send provider request
Google-->>Responses: provider error or response
Responses->>Routing: record cooldown/synthetic failure
Responses-->>Client: final response or retry result
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches 💡 2⚔️ Resolve merge conflicts 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closed: opened against upstream by mistake; PRs should target origin fork. |
Summary
Hardens
google-antigravitywith existing OpenCodex mechanisms:daily-cloudcode-pa.googleapis.comandcloudcode-pa.googleapis.com). Noncanonical base URLs fail closed across config, management, and runtime boundaries.OAuthAccessSnapshot. Configuredprovider.projectcannot split across accounts or override active snapshot projects.Retry-After: 0for immediate bounded same-account retry, and maintains strongest active cooldown.http,https,socks5,socks5h) in error messages and native transport errors.jitterMs(0..60,000 ms) at provider and model levels with Antigravity defaults (30 RPM, 2000 ms spacing, 500 ms jitter).wreq-jsTLS/HTTP2 emulation for canonical Antigravity data-plane hosts, while keeping OAuth token flows on Bun TLS.Verification
bun test tests/antigravity-routing.test.ts tests/antigravity-responses.test.ts tests/google-antigravity-wire.test.ts tests/provider-tls-profile.test.ts tests/redact.test.ts tests/request-pacing.test.ts tests/config.test.ts(308 passing)bun test tests/server-images.test.ts(66 passing)bun test tests/gemini-web-search.test.ts(16 passing)bun run typecheck(strict, zero errors)bun run privacy:scan(passed)bun run lint:gui(passed)bun run build:gui(passed)bun run audit:high(passed, zero high/critical vulnerabilities)wreq-jsimport, transport creation, and shutdown smoke test passedReview readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
Documentation
Bug Fixes