Skip to content

fix(quota): align Antigravity probes with fixed outbound destinations - #3799

Merged
lidge-jun merged 3 commits into
devfrom
codex/t4-03-antigravity-81a8
Sep 6, 2026
Merged

fix(quota): align Antigravity probes with fixed outbound destinations#3799
lidge-jun merged 3 commits into
devfrom
codex/t4-03-antigravity-81a8

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Align provider and account quota probes with the same fixed Google destinations and protected outbound transport. Preserve redirect rejection, TLS verification and address policy. Addresses the transport slice of [Bug]: Antigravity quota refresh failure — investigate missing canonical Fake-IP handling #3781; live TUN reproduction and error-category follow-up remain open.
  • Manual review chain, layer 3/5; base codex/t4-02-credit-bars-81a8. No GitHub native stack registration. Each layer is independently scoped; this chain batches review and final verification.

Verification

Manual review chain (bottom-up): #3797#3798#3799#3800#3801

  • Local test suites, typecheck and builds were not run, per maintainer instruction. Source audits and git diff --check were performed.

  • Final combined Cross-platform CI (lane=all) passed all 25 jobs on d1915c470bdcc95bbb3f7c716152ed013622634f. Lower test runs are deferred per the maintainer-directed combined-evidence strategy; skipped/cancelled runs are not passing evidence.

  • Independent Astra high source/security reviews and actual Aside fixture rendering are recorded where applicable. All scoped source/security reviews passed. Repaired-source remote diagnostics passed; the final full cross-platform matrix passed all 25 jobs.

  • Maintainer integration policy: the owner explicitly authorized final-combined-CI-first validation and eventual bottom-up admin merge. Exact combined CI is green; fresh per-PR head/base/actor and maintainer-objection checks precede each admin merge. Repository auto-delete is enabled, so the next owned child is retargeted to dev immediately before its parent lands.

  • Exact-source diagnostic gates, d1915c470bdcc95bbb3f7c716152ed013622634f: lint, typecheck, 27 focused config/picker tests, 1,706 GUI tests, privacy scan, GUI build and 425-page documentation build all passed. No deployment.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • New Features

    • Added subscription-credit quota display, including usage, reset times, ordering, and responsive layouts for narrow screens.
    • Google Antigravity quota checks now use fixed Google endpoints with model-list fallback and secure connection safeguards.
    • Custom provider base URLs affect model requests only; quota checks continue using their designated endpoints.
  • Documentation

    • Updated provider guides in multiple languages with Google Antigravity quota behavior and connection-policy details.
  • Tests

    • Expanded coverage for quota display, proxy behavior, redirects, authentication errors, and endpoint validation.

t and others added 3 commits September 7, 2026 01:48
Carries #3728 with raw-label and partial-coverage preservation.

Co-authored-by: Yumi <automation@sbyoon.com>

Co-authored-by: SB Yoon <44089734+yansigit@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: cf2cb34d-7516-4469-a21a-335a2baf1cdf

📥 Commits

Reviewing files that changed from the base of the PR and between a92835d and 59a2f0d.

⛔ Files ignored due to path filters (1)
  • docs-site/public/pr-screenshots/t4-credit-bars-81a8.png is excluded by !**/*.png
📒 Files selected for processing (14)
  • docs-site/src/content/docs/fr/guides/providers.md
  • docs-site/src/content/docs/guides/providers.md
  • docs-site/src/content/docs/ja/guides/providers.md
  • docs-site/src/content/docs/ko/guides/providers.md
  • docs-site/src/content/docs/ru/guides/providers.md
  • docs-site/src/content/docs/tr/guides/providers.md
  • docs-site/src/content/docs/zh-cn/guides/providers.md
  • docs-site/src/content/docs/zh-tw/guides/providers.md
  • gui/src/components/QuotaBars.tsx
  • gui/src/styles/provider-quota.css
  • src/providers/quota.ts
  • tests/gui/quota-bars-rows.test.ts
  • tests/providers/provider-account-quota.test.ts
  • tests/providers/provider-quota.test.ts

📝 Walkthrough

Walkthrough

The change pins Google Antigravity quota probes to fixed endpoints, adds transport-policy tests, renders subscription-credit quota data in the GUI, improves narrow-card layout, and updates localized provider documentation.

Changes

Antigravity quota transport

Layer / File(s) Summary
Pinned quota transport
src/providers/quota.ts
Antigravity summary and model-fallback probes use canonical Google URLs through the provider-outbound transport. The flow preserves URL validation and redirect handling.
Transport validation
tests/providers/provider-quota.test.ts, tests/providers/provider-account-quota.test.ts
Tests cover canonical destinations, fallback requests, credential separation, proxy policies, TLS and DNS settings, malformed responses, redirects, and raw-fetch bypass prevention.

Subscription-credit quota display

Layer / File(s) Summary
Subscription-credit rows and layout
gui/src/components/QuotaBars.tsx, gui/src/styles/provider-quota.css, tests/gui/quota-bars-rows.test.ts
The GUI synthesizes subscription-credit rows from creditsUsd, canonicalizes labels, updates utilization and incomplete-state handling, and reflows credit rows in narrow cards. Tests cover ordering, duplication, reset metadata, and precedence.

Localized provider documentation

Layer / File(s) Summary
Provider guide updates
docs-site/src/content/docs/*/guides/providers.md
Provider guides describe fixed Antigravity quota endpoints, model-list fallback, network checks, custom base URL scope, and NO_PROXY behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant fetchAntigravityQuota
  participant providerOutboundPost
  participant DNSAndTLSPolicy
  participant GoogleAccountingEndpoint
  fetchAntigravityQuota->>providerOutboundPost: Send summary request to canonical URL
  providerOutboundPost->>DNSAndTLSPolicy: Resolve destination and apply network checks
  DNSAndTLSPolicy->>GoogleAccountingEndpoint: Send authenticated request
  GoogleAccountingEndpoint-->>fetchAntigravityQuota: Return summary or fallback status
  fetchAntigravityQuota->>providerOutboundPost: Send models fallback request after 404
  providerOutboundPost->>GoogleAccountingEndpoint: Request model quota data
  GoogleAccountingEndpoint-->>fetchAntigravityQuota: Return model quota response
Loading

Suggested reviewers: luvs01, wibias

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/t4-03-antigravity-81a8

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 48 / 80

지금 dev HEAD(24c761a05, package 2.45.0)의 src/providers/quota.ts를 보면, Antigravity 계정 프로브(fetchAntigravityUsageQuota)는 이미 providerOutboundPost로 고정 Google 호스트를 쓰지만, 프로바이더 프로브(fetchAntigravityQuota)의 models 폴백은 설정 baseUrl로 가는 raw fetch였습니다. 라우팅용 baseUrl이 회계 API 주소로 새면 Fake-IP/리다이렉트/TLS 정책이 어긋날 수 있습니다. 이 PR(DRAFT, Track4 81a8 스택 3/5, base=t4-02-credit-bars, head=t4-03-antigravity)은 #3781의 transport 조각으로, summary·models URL을 상수로 고정하고 isCanonicalAntigravityQuotaUrl을 outbound 의존성에 항상 심습니다. models 폴백도 providerOutboundPost + providerRedirectError로 맞춥니다. config 인자는 프로브에서 빠집니다.

테스트는 provider-account-quota.test.ts / provider-quota.test.ts에 Fake-IP 분리 bearer, NO_PROXY 거부(bearer 미전송), 302/307/308/401/403 비가동, 프로바이더 경로 pinned models 폴백을 넣습니다. PROXY_ENV를 before/after로 치웁니다. docs guides/providers.md 8개 로케일에 고정 destination 설명이 한 줄씩 갑니다. checkout의 src/providers/quota.ts와 두 테스트 파일은 존재하고, src/lib/provider-outbound.tsisCanonicalUrl 훅(이미 dev에 있음)을 이 층이 채웁니다. live TUN 재현·에러 분류 후속은 본문대로 열려 있습니다. #3607/#3662 쿼ota reset 마커와는 다른 “어디로 쏘는가” 층입니다.

src/providers/quota.ts setAntigravityAccountQuotaTransportForTests - 주입 deps에 항상 isCanonicalUrl을 다시 덮어쓴다. 테스트가 canonical 검사를 빼지 못하게 한 안전장치다.
src/providers/quota.ts fetchAntigravityQuota - raw fetch(baseUrl/...) 제거가 핵심이다. 회귀가 이 경로를 다시 열지 않는지 CI에서 보면 된다.
isCanonicalAntigravityQuotaUrl - 이름 google-antigravity와 두 URL 완전 일치만 허용한다. 쿼리/슬래시 변형은 거부되는 편이 맞다.
tests/providers/provider-account-quota.test.ts NO_PROXY - admitted: [false,false], posted: 0으로 bearer 미전송을 잠근다. #3781 조사와 맞물리는 좋은 가드다.
docs providers.md - “accounting은 고정 Google destination” 문장이 코드와 같다. TUN 실기기 증거는 이 PR 범위 밖이다.

메인테이너의 판단이 필요한 지점

너의 추천
DRAFT 유지. 스택 CI 초록 후 #3797#3798 다음에 올린다. raw fetch 제거는 보안·정책상 분명한 이득이고, 범위도 quota transport로 좁다. live TUN은 #3781에 남겨 둔다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun
lidge-jun changed the base branch from codex/t4-02-credit-bars-81a8 to dev September 6, 2026 18:24
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • UI screenshot required.

What to do

  • Add a screenshot of the UI change to the PR description.

Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required enforce-target check will keep failing until every issue above is resolved.

@lidge-jun
lidge-jun marked this pull request as ready for review September 6, 2026 18:24
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 6, 2026 18:25
@lidge-jun
lidge-jun merged commit f7bc920 into dev Sep 6, 2026
34 of 54 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T18:26:32.001691Z 59a2f0d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant