fix(providers): keep Antigravity catalog static - #744
Conversation
📝 WalkthroughWalkthroughGoogle Antigravity is configured as a static-catalog provider. OAuth reconciliation and configuration migration establish this default while preserving explicit overrides, model discovery skips unsupported requests, UI updates preserve toggle provenance, and tests and localized documentation cover the behavior. ChangesGoogle Antigravity static catalog
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant ProviderRegistry
participant OAuthConfig
participant fetchProviderModels
participant ManagementAPI
ProviderRegistry->>OAuthConfig: set or seed liveModels=false
OAuthConfig->>fetchProviderModels: provide static provider configuration
fetchProviderModels->>fetchProviderModels: clear discovery failure
fetchProviderModels-->>ManagementAPI: return configured six-model catalog
ManagementAPI-->>OAuthConfig: expose liveModels=false without discovery status
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddf59d03e1
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ddf59d0 to
baea76f
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/codex/catalog/provider-fetch.ts (1)
82-124: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftBuild the in-flight key from the effective provider configuration.
At Line 85, a persisted provider with
liveModels: undefinedand one withliveModels: trueboth fingerprint aslive: true. However, Lines 675-676 enrich persisted providers from the registry, so an old Antigravity config missing the field becomes static while an explicittrueconfig remains live. If their gathers overlap, Lines 641-650 can join the wrong promise: either suppressing discovery for an explicit live override or issuing unsupported discovery for the legacy static config. Authentication state and other catalog-affecting settings are similarly absent from the key.Compute the key after applying registry defaults to cloned providers, and include all behavior-affecting inputs. Use a non-secret credential generation/digest or explicit invalidation on credential changes; never place raw OAuth/API tokens in the key.
Also applies to: 641-650
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/codex/catalog/provider-fetch.ts` around lines 82 - 124, The in-flight key must reflect effective provider behavior rather than raw persisted configuration. Update gatherFlightKey and its callers around provider catalog gathering to clone providers, apply the same registry defaults used near the provider enrichment flow, and include every catalog-affecting setting, including authentication state via a non-secret credential generation or digest (never raw tokens). Ensure credential changes invalidate or differentiate the key so overlapping gathers cannot share an incompatible promise.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/codex/catalog/provider-fetch.ts`:
- Around line 82-124: The in-flight key must reflect effective provider behavior
rather than raw persisted configuration. Update gatherFlightKey and its callers
around provider catalog gathering to clone providers, apply the same registry
defaults used near the provider enrichment flow, and include every
catalog-affecting setting, including authentication state via a non-secret
credential generation or digest (never raw tokens). Ensure credential changes
invalidate or differentiate the key so overlapping gathers cannot share an
incompatible promise.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f71b64f0-97e2-46cc-94a2-421f421c14a6
📒 Files selected for processing (13)
docs-site/src/content/docs/guides/providers.mddocs-site/src/content/docs/ja/guides/providers.mddocs-site/src/content/docs/ko/guides/providers.mddocs-site/src/content/docs/ru/guides/providers.mddocs-site/src/content/docs/zh-cn/guides/providers.mdsrc/codex/catalog/provider-fetch.tssrc/oauth/index.tssrc/providers/registry.tstests/codex-catalog.test.tstests/google-models-listing.test.tstests/oauth-provider-reconcile.test.tstests/provider-connection-test.test.tstests/provider-registry-parity.test.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/oauth/index.ts`:
- Around line 586-588: Preserve existing explicit liveModels: true values unless
reliable legacy-default provenance proves they were implicitly materialized.
Update the migration logic in src/oauth/index.ts lines 586-588 and re-login
handling at lines 682-686 to avoid resetting or marking unproven true values;
update tests/oauth-provider-reconcile.test.ts lines 44-80 and 104-152 to verify
pre-marker explicit true survives reconciliation while retaining migration
coverage for proven implicit static defaults.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 077c9c97-5cde-4f39-837b-cbf127f84d40
📒 Files selected for processing (7)
gui/src/components/provider-workspace/ProviderSettings.tsxgui/tests/provider-settings-live-models-provenance.test.tsxsrc/config.tssrc/oauth/index.tssrc/types.tstests/config.test.tstests/oauth-provider-reconcile.test.ts
|
NEEDS-CHANGES + NEEDS-SECURITY-REVIEW The discovery half of #723 is solved here. Making the Antigravity catalog static in What is still open is the part users actually complain about. Two ways forward, either is acceptable:
Whichever you pick, please cover the rendered connection-test state, not just the management API response — the bug lives in what the user sees. Security review also applies. What happens next: finish the connection-test behaviour with a regression on the rendered state, then request security review. CI context (shared across the current review round). |
lidge-jun
left a comment
There was a problem hiding this comment.
Formalizing the disposition so it shows on your dashboard.
Blocking: the discovery half of #723 is solved, but tests/provider-connection-test.test.ts:97-114 pins the Antigravity probe to ok: false with "static catalog only". The unsupported request is gone, and the dashboard still tells the user the provider is unavailable while inference and quota work fine — which is the misleading state #723 actually reports. The new test currently locks that in.
Either probe authenticated connectivity through the existing Antigravity contract, or return a neutral result the dashboard does not render as unavailability. Cover the rendered connection-test state, not just the management API response.
This also needs explicit security review under MAINTAINERS.md:33-35: it changes an OAuth preset discovery path, its migration, and whether a credential is resolved and sent at all.
Full reasoning in my earlier comment.
4cf8589 to
397a749
Compare
|
Addressed the blocking connection-state feedback in
Author-side security review:
Validation on the rebased head:
The broad root suite did not finish within the bounded local run, so the new cross-platform CI remains the broad gate. |
397a749 to
38b03d3
Compare
The dev checkout is mid-optimization, so this round stages on codex/260731-pr-merge-round instead of dev. The user merges it into dev and releases once that unit lands. Four reviewers triaged every open PR against origin/dev=356924263 on disjoint slices, and the load-bearing finding is that seven PRs are already fixed on dev by different commits. Merging those heads now would REVERT the newer work. lidge-jun#736 is the clearest case: dev carries decodeSchtasksOutput() at src/service.ts:364-393 because schtasks /query /xml emits UTF-16LE, and the PR head deletes that block and restores encoding: "utf8" -- landing it reopens lidge-jun#722. A clean merge-tree is not permission to merge. An adversarial audit then returned five blockers, all folded in rather than argued away. Two changed what actually gets merged. lidge-jun#744 was routed as a routine catalog fix, but 59d95c0 and 39543a3 change OAuth reconciliation, persist provider settings, and move token resolution around the static branch -- security review per MAINTAINERS.md, so it left the batch. lidge-jun#781's topic commit also swaps three /api/logs test files onto a logsFromApiBody helper that accepts both the array and the {logs} envelope; adopting it would pre-accept the very contract batch B rejects, so only the Anthropic file and its own test come across. The audit also caught three PRs missing from a matrix that claimed to be complete (lidge-jun#750, lidge-jun#746, lidge-jun#644), and lidge-jun#644 additionally carries .codexclaw/goalplans/** and two .DS_Store files. Nothing is merged yet. Batch A is six PRs, batch B rebuilds three whose implementations no longer fit the tree, and 20+ are held for security review, provider evidence, or their own cycle -- each with what would unblock it recorded.
…erve
The google-antigravity entry ships a static ANTIGRAVITY_MODELS catalog
but omitted liveModels. A missing value reads as live, so discovery
built ${baseUrl}/models against an endpoint that does not implement it
and reported permanent failure. Inference worked the whole time, which
is what made the false negative confusing: the provider was fine and the
dashboard said it was not.
liveModels: false makes the static branch engage at
catalog/provider-fetch.ts:451, and management reports discovery as
disabled rather than failed at management/provider-routes.ts:84,:90.
The regression test forces a credential-bearing path on purpose. The
no-token OAuth fallback would short-circuit before any probe and let the
test pass with the flag removed — vacuous. Ablated: without the flag it
fails with 1 probe where 0 are expected.
Registry flag only, cherry-picked from PR #744 by @luvs01. That PR also
reworks OAuth reconciliation and persisted provider settings, which is a
maintainer security-review surface and is deliberately not included.
Co-authored-by: luvs01 <luvs01@users.noreply.github.com>
Read the CI log to the end after pushing the stability fix: zero tests failed. The run died on panic(thread 2852): Internal assertion failure oh no: Bun has crashed. This indicates a bug in Bun, not your code. Bun v1.3.14, Windows x64, bun test --isolate. That explains the part that never made sense: a process dying at an arbitrary point marks whichever test was running as failed, so the blame moved tray to sidebar to server-auth without any of them being at fault. 010 had already bucketed the #744 and #693 Windows failures as a Bun runtime panic class. Same thing, seen from the other side. The two fixes still stand on their own -- spawning a real gh in a route test and building four harnesses in one test were genuine defects. They just were not what was keeping Windows red, and saying otherwise would be claiming a result we did not get. Note for next time: when Windows CI is red, read the tail of the log before the test names.
|
Status update: the registry half of this PR is now on
This PR stays open for the rest of it. Diffed against current It now conflicts with Sorry for the split; taking the one-line fix separately was the only way to close #723 without pre-empting the review the rest of this needs. |
38b03d3 to
69edeab
Compare
Ingwannu
left a comment
There was a problem hiding this comment.
Security review completed against 69edeab18e2de669bde2cf8ce6306f6d38cede8c.
No blocking security finding was identified.
- Static-catalog handling now returns before OAuth token resolution and before any upstream request, so the change reduces credential exposure rather than expanding it.
- The connection-test path returns a neutral
applicable: falseresult without resolving or sending credentials. - The GUI invalidation key contains provider/config/auth identity only; no raw token or API key is introduced into cache or flight keys.
- The one-time Antigravity migration and explicit post-migration override preservation are local configuration semantics, not a cross-trust-boundary write.
The remaining single-flight/account-switch concerns are bounded to same-user local catalog freshness and do not expose credentials or create an attacker-reachable privilege boundary. This approval is the explicit security review required by MAINTAINERS.md; it does not dismiss or override another maintainer's earlier change request.
69edeab to
fa6b3ef
Compare
One-time static-catalog migration already forced liveModels false for omitted/key authMode rows; also refresh preset models so the published static list is not left stale.
[shipping-github] Verdict: changes-requestedPR: UsefulnessYes. Completes Antigravity static-catalog behavior after the registry flag on Bugs / correctness
Security
Spec / standards
Reviews
Base / CI
GateHard blocker for Bottom lineShip-worthy once |
|
@lidge-jun Tip addresses the connection-check CR: probe returns |
…atic-catalog # Conflicts: # src/config.ts # tests/config.test.ts
Summary
google-antigravitypreset already present ondev, so catalog reads, connection checks, settings, and OAuth reconciliation no longer issue or imply unsupported generic discovery.liveModels: truewith no source metadata, so every ambiguous pre-markertrueis normalized once; users who deliberately forced discovery can re-enable it afterward, and later overrides persist through re-login.liveModels.not applicableresult for static-catalog connection checks before credential resolution or network access; render it neutrally in the dashboard and CLI, and invalidate stale probe state when provider configuration or active authentication changes.Follow-up to #723. The registry flag itself is already on
devviac4b83693d; this PR carries the remaining reconciliation, settings, catalog-flight, GUI, CLI, test, and documentation work.Safety review
liveModels: trueprovenance cannot be recovered from the stored config. The one-time reset is deliberate and version-bounded; a post-migration explicittrueremains supported and retains the previous authenticated discovery behavior.Verification
Current head
fa6b3ef2is rebased onto currentdev(33caf336).git range-diffconfirms that all five rebased commits are patch-equivalent to the reviewed series; the duplicate registry line already ondevis absent from the final PR diff.1.3.14 (0d9b296a): root provider/catalog/config regressions 289 passed, 0 failed; rendered GUI regressions 8 passed, 0 failed; typecheck and privacy scan passed.1.4.0-canary.1 (b22e0e6d0): the same root 289/0 and GUI 8/0 suites passed; typecheck and privacy scan passed.git diff --checkpassed.fa6b3ef2. The older functionalCHANGES_REQUESTEDreview remains for the maintainer to dismiss or re-review; both maintainers are already requested reviewers, so no duplicate ping was added.Checklist
Summary by CodeRabbit
New Features
Bug Fixes
liveModels: false) behavior, even after migrations and updates.liveModelschanges.Documentation
Tests
/modelsfetching and correctliveModelsbehavior.