Repository navigation
fix(providers): allow canonical Antigravity through fake-IP save validation - #4723
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughChangesAntigravity benchmark DNS exception
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix ✨ Finishing Touches 💡 1🛠️ 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 |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. Automatic draft conversion failed. Please convert this pull request to a draft manually until every box above is ticked. |
리뷰 · 우선순위 74 / 80이 PR은 지금 고치는 방식은 openai처럼 라우트마다 플래그를 더 넣는 대신, 왜 점수 74인가. 현장 Fake-IP 저장 거절을 정본 전송에만 풀어 주는 방향이 맞고, 실패 닫힘(fail-closed) 부정 테스트가 분명합니다. 다만 openai는 아직도 관리 라우트가 명시적으로 플래그를 넘기고 Antigravity만 정책 함수 안으로 예외가 들어가서 패턴이 갈라집니다. 또 예외는
메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
aca715a to
ac4ccc1
Compare
Co-authored-by: cubebox <58514883+juzijia@users.noreply.github.com>
ac4ccc1 to
01dadfd
Compare
lidge-jun
left a comment
There was a problem hiding this comment.
Reviewed against current head ab849de4fe8db63e15ef22b04e3ce6ec31395859 (the earlier review anchor 01dadfddca is now followed by a merge from dev). I accept the approach.
The exception is derived inside config-time resolved-destination validation from the exact canonical registry transport. At src/lib/destination-policy.ts:262-277, all six conditions are present: provider name is exactly google-antigravity; the registry entry has OAuth auth kind; the registry explicitly allows base-URL override; the configured adapter equals the registry adapter; runtime auth mode is OAuth; and the normalized configured base URL equals the normalized registry base URL. The registry row confirms the canonical values (src/providers/registry/entries-core.ts:987-994): Google adapter, OAuth, override enabled, and https://daily-cloudcode-pa.googleapis.com.
The original boundary is preserved. Custom Antigravity relays fail the canonical comparison; literal 198.18.x.x URLs are still rejected synchronously before DNS (src/lib/destination-policy.ts:343-356,380-390); every DNS answer is still classified, so a benchmark answer mixed with private or metadata space is rejected (src/lib/destination-policy.ts:400-409); other providers cannot enter the named exception; and neither allowPrivateNetwork nor the runtime URL-fetch policy is changed. The focused negative cases in tests/routing/destination-policy-resolved.test.ts:179-215 exercise those distinctions.
The remaining delivery gap is issue linkage. closingIssuesReferences is empty and the PR body contains no closing reference. Please name the issue this resolves and add the appropriate closing reference; without that, there is no basis to record a closure for this fix.
IPv6 Mihomo Fake-IP handling is outside this change's scope; this patch is specifically the IPv4 198.18.0.0/15 benchmark-DNS exception. Nit: src/lib/destination-policy.ts still lacks a final newline at the current head.
Summary
198.18.0.0/15as transparent Fake-IP only for the exact canonical Google Antigravity transport (google-antigravity+googleadapter + OAuth + the registrydaily-cloudcode-pa.googleapis.combase URL).providerDestinationResolvedError, so the existing management write/reload callers get the same bounded behavior without enablingallowPrivateNetworkor weakening runtime URL fetch policy.Verification
dev(45cfb04e9757a5a257ab6290d9f24d2ea0bc7573): onlysrc/lib/destination-policy.tsandtests/routing/destination-policy-resolved.test.tschange.daily-cloudcode-pa.googleapis.com -> 198.18.1.68case plus negative coverage for custom base URL, adapter/auth mismatch, literal benchmark destination, RFC1918 companion, and metadata companion.Checklist
Review 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