Skip to content

fix(antigravity): prefer Gemini when family usage ties - #5175

Open
ViaxCo wants to merge 2 commits into
steipete:mainfrom
ViaxCo:upstream-pr/antigravity-gemini-wins-ties
Open

ViaxCo wants to merge 2 commits into
steipete:mainfrom
ViaxCo:upstream-pr/antigravity-gemini-wins-ties

Conversation

@ViaxCo

@ViaxCo ViaxCo commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Antigravity's session and weekly windows go to the family (Gemini or Claude/GPT) that has used the most. When both families had used the same share, such as 0% right after a reset, the tie went to Claude/GPT, because of how the window ids sort. For someone who only uses Gemini, the "Session %", "Weekly %", "Session pace" and "Weekly pace" chips and their reset times then moved to a family they never use.

Now Gemini wins a usage tie. The check uses the family (AntigravityQuotaFamilyVisibility.knownFamily), so it works for both the 3p- and third-party- bucket ids. The family with the higher usage still wins as before, and the automatic chip picker does not change.

Tests

  • New test: all four buckets at 0% used, with both Claude/GPT id forms. Without the fix, the session and weekly windows came from Claude/GPT. With the fix, they come from Gemini.
  • make test-fast FILTER='Antigravity|MenuBar|StatusItem|SessionEquivalent|UsageStore|Dashboard|MenuCard': 3198 tests passed
  • make check: 0 violations

No screenshots: the percent shown is the same (0%). Only the window behind it changes, and you can see that in the reset time and pace.

Related: #5174, which adds the Gemini 5-hour and weekly menu bar choices.

The session and weekly picker broke usage ties by the smallest window id, so Claude/GPT won over Gemini whenever both families had used the same share, such as 0% after a reset. Session and weekly chips, pace and reset times then switched to an unused family. Break a usage tie by family so Gemini wins, for both the 3p and third-party bucket ids, and keep the id order for other ties.
@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T08:08:02.617824Z c496d90 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.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 25, 2026
@clawsweeper

clawsweeper Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

This PR makes Gemini win equal-usage ties when selecting Antigravity session and weekly windows.

Example: All four quota buckets report 0% used, with Claude/GPT bucket IDs beginning with 3p-.

  • Before: The selected session reset is Claude/GPT’s 2026-06-15T12:52:10Z.
  • After: The selected session reset is Gemini’s 2026-06-15T11:39:34Z.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is focused and source-correct, with meaningful regression assertions, but required real-behavior proof is absent and the selection preference awaits an owner decision.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: When both families are untouched, generic session and weekly displays can use an unused Claude/GPT family’s reset times and pace context.
Reason: Removing incidental bucket-ID dependence is useful and inexpensive, but always favoring Gemini changes established owner-authored selection behavior and has no recorded approval.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: the change is narrow and no correctness defect was found, but preferring Gemini on equal usage needs an owner decision.

Reviewed head: c496d90bc4fcf8fdb698b34c16cb37430d5aefe4
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should Gemini always win equal-usage Antigravity cadence ties, including nonzero ties, regardless of which family the user normally uses?
  • Recommendation: Approve Gemini tie precedence: Accept the small provider-local policy change so equal usage produces the same family across supported bucket ID forms.
  • Why: The current contract ranks by usage without promising a preferred family, and no recorded owner decision approves replacing the deterministic ID fallback with Gemini precedence.

Before merge

  • Add real behavior proof - The reported parser-to-resolver tests exercise synthetic quota input, while the inspected screenshots belong to the related family-choice PR and show unequal usage; no supplied artifact demonstrates this changed tie behavior through the shipped app. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: Provide a screenshot, recording, or diagnostic output from freshly built CodexBar showing equal-usage buckets with different reset times selecting Gemini for session and weekly presentation; redact account details, IPs, API keys, and non-public endpoints.
Agent review details

How this fits together

Antigravity’s provider descriptor selects cadence windows from parsed quota rows and supplies them to menu bar, pace, dashboard, and icon presentation.

flowchart LR
  A[Antigravity quota response] --> B[Quota parser]
  B --> C[Named quota windows]
  C --> D[Provider selection policy]
  D --> E[Session and weekly presentation]
  D --> F[Icon windows]
Loading

Technical review

Best possible solution:

Use the existing provider comparator for an owner-approved tie policy, preserving higher-usage precedence and separate automatic selection.

Do we have a high-confidence way to reproduce the issue?

Current main selects the lexicographically smaller bucket ID on equal usage, so 3p- buckets beat Gemini and supply their reset timestamps; this is directly traceable through the parser fixture and semantic resolver without executing code.

Is this the best way to solve the issue?

The existing comparator is the smallest appropriate implementation boundary, but equal usage alone does not establish which family a user wants, so Gemini precedence remains a preference requiring owner approval.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a26ca57b5186.

Provenance checked

  • Antigravity equal-usage cadence and icon selection changes intended behavior with a stated reason (fb66e63: The descriptor refactor preserved characterized presentation output, including the existing ID fallback; the later cadence repair reused that helper to select each cadence independently.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 6e99898 adds Sources/CodexBarCore/Providers/Antigravity/AntigravityProviderDescriptor.swift:99 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6e99898b7c9e; files: Sources/CodexBarCore/Providers/Antigravity/AntigravityProviderDescriptor.swift)
  • Zihao Qi: Raw commit 984c2d1 adds Tests/CodexBarTests/AntigravityQuotaSummaryTests.swift:45 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 984c2d1fa91b; files: Tests/CodexBarTests/AntigravityQuotaSummaryTests.swift)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Change size Production +7; tests +13; changelog +4 The implementation reuses the existing comparator and family classifier without introducing additional state or selection paths.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 25, 2026, 3:18 AM ET / 08:18 UTC.

This branch has not been deployed

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

Labels

impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant