Skip to content

fix(antigravity): show the Gemini 4 Argon quota group separately - #7283

Merged
lidge-jun merged 3 commits into
devfrom
codex/7272-argon-quota-summary
Oct 17, 2026
Merged

lidge-jun merged 3 commits into
devfrom
codex/7272-argon-quota-summary

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Antigravity's retrieveUserQuotaSummary now returns a dedicated Gemini 4 Argon group, and OpenCodex never showed it. The parser matched the group as "gemini", so its weekly bucket collided with Gem (Weekly) and was dropped. When the Argon group came first, it replaced the Gemini reading instead. The fetchAvailableModels fallback had the same ordering problem with gemini-4-argon-* models.

  • Each summary bucket now decides its family from its own id and name: Argon first, then Gemini, then Claude/3P/GPT. The group is consulted only when the bucket is inconclusive. Argon comes from the group display name only, never from a description that mentions it.
  • Argon buckets become Argon (5h) and Argon (Weekly) windows tagged modelId: "gemini-4-argon". The tag uses the existing contract that model-attributed windows are display evidence only, so Argon does not change Gem/Cla headroom, provider exhaustion, reset ordering or reset notifications.
  • The fallback no longer lets an Argon model seed the Gem family bar. The exact model rows stay.
  • accountResetTimestamp now skips model-attributed rows, so a diagnostic row can never become the account's reset time for a family-less request. This is the same one-line filter as in fix(antigravity): show CLI-only Argon quota without duplicate effort rows #7245.

With the issue's payload, the report goes from Gem, Gem (Weekly), Cla, Cla (Weekly) to the same four windows plus Argon (Weekly).

Display tradeoffs: like other diagnostic rows, the Argon window gets normal severity in the GUI and is not picked as a headline. An Argon-only summary (no Gemini group) therefore has no compact summary row, though detail views, CLI and management DTOs still show it. The Rust tray minimum includes it, as it already does for fallback model rows.

Out of scope, follow-up: Argon routing still uses the Gemini window, because classifyModelFamilyForQuota maps gemini-4-argon to gem. Judging Argon requests by their own pool is a separate routing decision.

Interaction with #7245 (draft, same file): with this change the summary already includes a gemini-4-argon model-attributed window, so #7245's optional CLI supplement skips itself on summary success. #7245's "IDE Argon ladder" test expects {label: "Gem", percent: 80} from an Argon-first model list. That expectation changes here, so whichever PR lands second has to reconcile it and test the combined tree, including that an untagged gemini-4-argon label does not suppress the supplement.

Closes #7272

Verification

Bun 1.4.3, repository runner (scripts/test.ts isolation), synthetic credentials and injected pinned transports only:

  • bun scripts/test.ts tests/providers/provider-antigravity-model-quota.test.ts tests/providers/provider-quota.test.ts tests/oauth/oauth-account-quota-rank.test.ts tests/providers/provider-antigravity-quota-retry.test.ts tests/providers/provider-account-quota.test.ts: 291 pass, 0 fail.
  • The 7 new tests in provider-antigravity-model-quota.test.ts cover both group orders; 5h, weekly, unsupported-cadence, malformed and duplicate buckets; bucket-versus-group precedence (Claude bucket under an Argon group, Gemini bucket under a Claude group, inconclusive bucket, argonaut boundary); the fallback; routing isolation for an exhausted Argon pool (headroom, cachedProviderQuotaIsExhausted, reset observations, reset time); and an Argon-only summary. Driven red once: with the three source files restored to origin/dev, those 7 fail and the 10 existing tests pass.
  • bun run typecheck: exit 0. bun run structure:check: exit 0. bun run privacy:scan: exit 0.
  • bun scripts/test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/test-layout.test.ts tests/ci-workflows/structure-ssot.test.ts: 62 pass, 0 fail.
  • Full bun run test: not run locally (documented resource exception). Eleven concurrent worktrees on this machine share the repository runner's user-wide test lock; the full run queued behind another worktree's suite for more than 30 minutes and was stopped. The full suite ran in hosted CI at this exact head: test 1/4 to test 4/4 all succeeded at fea2fdbbc11eec5eed38d99d2a9b17eb8514b37e.
  • Independent review of the final diff: NEAR-PASS with one documentation wording finding, fixed in the second commit; a fresh review of that fix and of this description: PASS.

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. (No auth or credential change: quota parsing and one reset-ordering filter. The probe destination and transport are unchanged.)

retrieveUserQuotaSummary reports Gemini 4 Argon as its own group. The
summary parser matched it as "gemini", so its weekly bucket collided with
Gem (Weekly) and was dropped, or replaced the Gemini reading when the Argon
group came first. The model-list fallback had the same order problem.

Each bucket now decides its family from its own id and name (Argon before
Gemini), with the group display name only as a fallback. Argon buckets
become Argon / Argon (Weekly) windows tagged with the canonical pool model
gemini-4-argon, which keeps them out of headroom, exhaustion, reset
ordering and reset notifications like the existing model rows. The
account reset-time selection now skips model-attributed rows as well.

Closes #7272
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 17, 2026 19:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 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-10-17T19:33:15.672296Z fea2fdb PR opened
ℹ️ 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.

@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Oct 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • missing_coauthor_credit — This pull request says it reimplements, supersedes, carries, or rebases another author's pull request, but no Co-authored-by trailer names that author. Prose in a commit body is not read by anything; the trailer is what GitHub counts. Add it to the description or a commit, or obtain attribution-approved. Paths: #7245.

@github-actions github-actions Bot added the bug Something isn't working label Oct 17, 2026
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed.

Hygiene

✅ Deterministic PR hygiene checks passed.

@github-actions
github-actions Bot marked this pull request as draft October 17, 2026 19:31
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 4d72f1d6-3e1c-4298-b1d9-57f55ddc3f6f
📥 Commits

Reviewing files that changed from the base of the PR and between fea2fdb and 0b41da7.

📒 Files selected for processing: 7
  • docs-site/src/content/docs/reference/configuration/providers.md
  • src/oauth/account-quota-rank.ts
  • src/providers/quota-types.ts
  • src/providers/quota/antigravity.ts
  • structure/providers-and-adapters.md
  • structure/transports/inventory.md
  • tests/providers/provider-antigravity-model-quota.test.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 4314c1ac-7c9c-4039-8e83-aba491913f53
📥 Commits

Reviewing files that changed from the base of the PR and between 2a10a2b and fea2fdb.

📒 Files selected for processing: 7
  • docs-site/src/content/docs/reference/configuration/providers.md
  • src/oauth/account-quota-rank.ts
  • src/providers/quota-types.ts
  • src/providers/quota/antigravity.ts
  • structure/providers-and-adapters.md
  • structure/transports/inventory.md
  • tests/providers/provider-antigravity-model-quota.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

Antigravity quota summaries now display Gemini 4 Argon in separate Argon and Argon (Weekly) windows. Model-attributed windows do not determine account reset times. The changes also document and test how Argon windows relate to Gemini and Claude quota calculations.

Changes: Antigravity Argon quota handling

Layer / File(s) Summary
Classify and display Argon quota windows
src/providers/quota/antigravity.ts, tests/providers/provider-antigravity-model-quota.test.ts, structure/providers-and-adapters.md, docs-site/src/content/docs/reference/configuration/providers.md
The parser distinguishes Argon groups and buckets, adds Argon and Argon (Weekly) windows, and orders them after Gemini and Claude windows. Tests cover bucket classification, supported readings, model-list fallback, and Argon-only summaries. Documentation describes the display windows and their relationship to Gemini and Claude quota calculations.
Exclude model-attributed windows from quota calculations
src/providers/quota-types.ts, src/oauth/account-quota-rank.ts, structure/transports/inventory.md, tests/providers/provider-antigravity-model-quota.test.ts
The modelId documentation identifies model-attributed windows as display evidence. accountResetTimestamp now excludes custom windows with a modelId. Tests check that Argon windows do not affect account headroom, reset times, reset-first ordering, or observed reset windows.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to fea2f

Argon quota windows can be displayed separately without changing account quota decisions. No identified issue prevents merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Issue #7272 requires separate Argon quota visibility and correction of the model-list fallback. src/providers/quota/antigravity.ts now detects Argon before Gemini, uses bucket identity before group …
Out of Scope Changes check Passed The changes stay connected to issue #7272. src/oauth/account-quota-rank.ts excludes model-attributed diagnostic rows from reset-time selection, which preserves the required routing and reset isolati…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the primary change: displaying the Gemini 4 Argon quota group separately in Antigravity.
Full details: Linked Issues check

Explanation

Issue #7272 requires separate Argon quota visibility and correction of the model-list fallback. src/providers/quota/antigravity.ts now detects Argon before Gemini, uses bucket identity before group fallback, creates Argon and Argon (Weekly) windows with modelId: "gemini-4-argon", and preserves exact Argon model rows without seeding Gem. The added tests in tests/providers/provider-antigravity-model-quota.test.ts cover group order, bucket precedence, 5-hour and weekly buckets, malformed and duplicate readings, fallback ordering, and Argon-only summaries. The tests also verify that Argon diagnostic rows do not affect routing-related quota decisions. The documented routing follow-up remains outside issue #7272's requested fix.

Full details: Out of Scope Changes check

Explanation

The changes stay connected to issue #7272. src/oauth/account-quota-rank.ts excludes model-attributed diagnostic rows from reset-time selection, which preserves the required routing and reset isolation. The quota type comment and provider documentation describe the new Argon display behavior. The tests exercise the new parser and its isolation guarantees. No unrelated product behavior or cleanup is demonstrated.

Full details: Docstring Coverage

Explanation

Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 removed the intake: hygiene-blocked Deterministic PR hygiene checks failed label Oct 17, 2026
@github-actions
github-actions Bot marked this pull request as ready for review October 17, 2026 19:34
@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration into dev (MAINTAINERS.md exception, actor lidge-jun, admin). This is maintainer integration, not an independent review or self-approval.

Exact head: 0b41da7 (contains origin/dev 688b258)

Workflow runs at this head:

  • PR Labeler: success (run 39064950335, attempt 1)
  • Enforce PR target branch: success (run 39064950207, attempt 2)
  • PR hygiene: success (run 39064950268, attempt 1)
  • React Doctor: success (run 39064951733, attempt 1)
  • Cross-platform CI: success (run 39064951734, attempt 1)
  • Catalog async contracts: success (run 39064951776, attempt 1)

Decision record:

  • independent-review: PASS — lane l7272 fresh sol reviewer PASS; Codex no findings at fea2fdb, merge commit 0b41da7 only brings dev 688b258 (no overlapping files); 0 unresolved threads; coordinator reviewed account-quota-rank.ts change: excludes model-attributed windows from reset ordering, keeping routing unchanged
  • security: N/A — quota display classification; no credential/token/auth path touched; account-quota-rank.ts change is a defensive filter
  • attribution: N/A — original lane work, fix(antigravity): show CLI-only Argon quota without duplicate effort rows #7245 not carried
  • residual: ACCEPTED — fix(antigravity): show CLI-only Argon quota without duplicate effort rows #7245 overlaps the same file (later lander reconciles); Argon-specific routing deferred as follow-up; local full suite not run (shared test lock), hosted 4 test shards green
  • checklist: N/A — maintainer-owned branch on origin

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