Skip to content

fix: resolve Antigravity quotas independently per cadence - #3220

Merged
steipete merged 1 commit into
mainfrom
codex/antigravity-cadence-quota
Aug 27, 2026
Merged

fix: resolve Antigravity quotas independently per cadence#3220
steipete merged 1 commit into
mainfrom
codex/antigravity-cadence-quota

Conversation

@steipete

@steipete steipete commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #3206.

Antigravity's Gemini and Claude/GPT representatives can describe different cadences. With Gemini at 86% session / 55% weekly remaining and Claude/GPT untouched, the old semantic resolver selected the untouched family's session and displayed 5h 100% · W 55%.

Resolve Session and Weekly independently from the provider's known quota-summary rows, reusing its existing most-constrained helper. Preserve unavailable/missing cadences when summary rows exist and standard fallback when they do not. The shared fallback now ignores explicitly unknown extra rows without changing its representative-first/first-match policy for other providers.

Automatic selection, exhausted-quota preference, explicit family metrics, icon selection, raw snapshots and diagnostic rows are unchanged. Provider docs and changelog updated; thanks @foobra for the report.

Before / after

Identical parsed synthetic fixture and identical opt-in harness, run before any production edit and after the fix. Both use the production semantic resolver, title renderer and preview view. No account data is present.

Before:

Synthetic Antigravity quota before: session 100%, weekly 55%

After:

Synthetic Antigravity quota after: session 86%, weekly 55%

This is offscreen production-render proof, not a live provider or desktop status-item capture. It verifies parsing-to-selection-to-rendered text and accessibility, not fetching, status-button assignment, placement or refresh propagation. The harness creates no controller, status bar, settings store, real window or account fixture, and skips before fixture creation unless explicitly enabled.

Verification

  • Before-fix regressions failed as expected, including the normal all-known 100%-versus-86% case.
  • Focused tests passed: 93 tests in seven suites, covering competing families, unknown/missing/all-unknown rows, known zero and exhausted quotas, legacy fallback/ordering, existing provider overrides, unchanged automatic/explicit policies, menu cards and plugin presentation.
  • Command: swift test --filter 'AntigravityQuotaSummaryTests|MenuBarLayoutTests.*semantic|MenuBarMetricWindowResolverTests|MenuCardAntigravityTests|ProviderPresentationPolicyCharacterizationTests|UserPluginQuotaPresentationTests' --skip 'MenuBarLayoutTests.*Kimi lane overrides' with test Keychain access suppressed/disabled and the allow override unset. The skip excludes an unrelated migration fixture accidentally matched by the broad name filter; the full suite runs without that exclusion.
  • swift test --filter MenuLayoutScreenshotRenderTests/test_renderAntigravitySemanticLayoutProof passed with CODEXBAR_ANTIGRAVITY_LAYOUT_SCREENSHOT_DIR set separately for before and after. The opt-out invocation skipped cleanly. Both PNGs were inspected before upload.
  • make check and git diff --check passed; generated provider/plugin artifacts remain current.
  • Independent Codex review reported no actionable blockers. Parent make check also passed with zero violations.
  • env -u CODEXBAR_ALLOW_TEST_KEYCHAIN_ACCESS CODEXBAR_SUPPRESS_TEST_KEYCHAIN_ACCESS=1 make test passed all 933 selections in 78 groups: every group first-pass, zero failures/retries/timeouts, 878.3 seconds. No focused-test exclusion was used.
  • Exact-head CI at ba732e417c03b9e48856e7ac5f829664c2dc8bae passed: lint, Linux x64/ARM builds/tests/smoke checks, musl build, both macOS shards, provider-engine goldens, and aggregate. No CI rerun was needed.

No real credentials, provider requests, app-bundle launch or persisted account/config changes were used.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 7:55 PM ET / 23:55 UTC.

ClawSweeper review

What this changes

The PR makes Antigravity Session and Weekly menu-bar values independently select the most constrained known quota-summary row across model families.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for owner review and merge: the focused fix is source-backed, has direct render proof, and has no actionable defect; exact-head macOS checks are still running.

Priority: P2
Reviewed head: ba732e417c03b9e48856e7ac5f829664c2dc8bae

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The narrowly scoped implementation has direct render evidence and thorough focused regression coverage.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: Real-behavior proof is not a merge gate for this owner-authored PR; the body nevertheless includes before/after production-render screenshots using the parsing-to-rendering path with synthetic data.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real-behavior proof is not a merge gate for this owner-authored PR; the body nevertheless includes before/after production-render screenshots using the parsing-to-rendering path with synthetic data.
Evidence reviewed 5 items Independent cadence selection: The Antigravity presentation adds a semantic resolver that restricts to quota-summary rows, ignores unknown usage, and selects the most constrained row separately for five-hour and weekly cadences.
Production rendering path: The menu-bar semantic resolver obtains Session and Weekly windows from the provider descriptor, so the new Antigravity resolver feeds the rendered layout rather than only a test helper.
Regression coverage: Tests cover competing family values, known/unknown summary rows, missing cadences, legacy fallback ordering, and the concrete rendered text 5h 86% · W 55%.
Findings None None.
Security None None.

Live Verification

Command: env -u CODEXBAR_ALLOW_TEST_KEYCHAIN_ACCESS CODEXBAR_SUPPRESS_TEST_KEYCHAIN_ACCESS=1 swift test --filter AntigravityQuotaSummaryTests

Result: FAIL (failed) — execution before step 1 run: sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.24.0.tgz

sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.24.0.tgz

Assertions:

  • FAIL expect_output: Test run with

How this fits together

CodexBar parses provider quota responses into a usage snapshot, then resolves semantic Session and Weekly values before rendering the menu-bar label. Antigravity has two model families whose representative rows can describe different cadences.

flowchart LR
A[Quota response] --> B[Usage snapshot]
B --> C[Antigravity summary rows]
C --> D[Cadence resolver]
D --> E[Session value]
D --> F[Weekly value]
E --> G[Menu-bar label]
F --> G
Loading

Before merge

  • Resolve merge risk (P1) - The supplied exact-head check state still has both macOS test shards in progress; merge should wait for their result.
  • Complete next step (P2) - This owner-authored PR only needs final maintainer merge judgment after the in-progress exact-head macOS checks finish.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Code versus test delta production +14/-1, tests +267/-7 The small behavior change is accompanied by broad focused coverage for cadence, fallback, and rendered-label cases.
Files affected 7 files affected The patch is limited to provider presentation, shared fallback behavior, tests, and explanatory documentation.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #3206
Summary: This PR is the concrete candidate fix for the reported Antigravity menu-bar quota mismatch.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land this provider-specific semantic resolver after the exact-head macOS shards complete successfully, preserving the existing automatic and explicit metric policies.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land this provider-specific semantic resolver after the exact-head macOS shards complete successfully, preserving the existing automatic and explicit metric policies.

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

Yes—current source and the supplied parsed quota fixture establish the affected resolver path, although this read-only review did not execute it.

Is this the best way to solve the issue?

Yes—the provider-specific semantic resolver is the narrowest maintainable repair because Antigravity family representatives can correspond to different cadences.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against abe8f9180a75.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is not_applicable.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This fixes a provider-specific menu-bar quota display inconsistency with limited blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real-behavior proof is not a merge gate for this owner-authored PR; the body nevertheless includes before/after production-render screenshots using the parsing-to-rendering path with synthetic data.

Evidence

What I checked:

Likely related people:

  • steipete: Owner-authored PR head introduces the affected provider-presentation behavior and is the only available local provenance for this partial review tree. (role: feature owner and recent area contributor; confidence: high; commits: ba732e417c03; files: Sources/CodexBarCore/Providers/Antigravity/AntigravityProviderDescriptor.swift, Sources/CodexBarCore/Providers/ProviderUsagePresentation.swift)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-26T23:40:18.258Z sha ba732e4 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 26, 2026
@steipete
steipete merged commit 6e99898 into main Aug 27, 2026
9 checks passed
@steipete

Copy link
Copy Markdown
Owner Author

Merged as 6e99898b7c9e; #3206 is closed. Local main fast-forwarded and is clean. The fix is provider-owned: Antigravity now chooses the most constrained known quota independently for each semantic cadence. The actual family representatives remain untouched, and the shared fallback only gains an availability filter. Automatic selection, exhausted-quota preference, explicit family metrics, diagnostic rows, authentication and refresh behavior are unchanged.

Verification:

  • The new parsed four-bucket regression failed before the fix. Identical offscreen production-render runs showed 5h 100% · W 55% before and 5h 86% · W 55% afterward; visible and accessibility text are covered. Both attached PNGs were inspected and their uploaded bytes verified against the local files.
  • swift test --filter 'AntigravityQuotaSummaryTests|MenuBarLayoutTests.*semantic|MenuBarMetricWindowResolverTests|MenuCardAntigravityTests|ProviderPresentationPolicyCharacterizationTests|UserPluginQuotaPresentationTests' --skip 'MenuBarLayoutTests.*Kimi lane overrides': 93 tests in seven suites passed with test Keychain access suppressed. The exclusion avoids an unrelated migration fixture selected by the broad focused filter; the full suite had no such exclusion.
  • swift test --filter MenuLayoutScreenshotRenderTests/test_renderAntigravitySemanticLayoutProof passed with the screenshot output variable set for before and after. With the variable unset, it skipped before creating fixtures.
  • make check and git diff --check passed, zero lint violations; generated manifests/plugins remained current.
  • env -u CODEXBAR_ALLOW_TEST_KEYCHAIN_ACCESS CODEXBAR_SUPPRESS_TEST_KEYCHAIN_ACCESS=1 make test: all 933 selections/78 groups first-pass, zero failures/retries/timeouts, 878.3 seconds.
  • Independent Codex review found no actionable blockers. GitHub source review also found no patch defect; its execution attempt stopped in package bootstrap before Swift ran, so it is not counted as executed test proof.

This is source, regression and offscreen production-render proof, not live provider or status-button placement/refresh proof. No real account, saved credentials, app-bundle launch, or persisted settings/account change was used. Final exact-head CI passed lint, Linux x64/ARM builds/tests/smoke checks, musl, both macOS shards, provider-engine goldens, and the aggregate at ba732e417c03b9e48856e7ac5f829664c2dc8bae. No CI rerun was needed. No release was published.

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

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Antigravity menu bar stays at 5h 100% after usage is consumed

1 participant