Skip to content

fix(antigravity): retain unknown usage across CLI quota lanes - #3489

Merged
steipete merged 4 commits into
steipete:mainfrom
urda:urda/agy-cli-lane-parity
Sep 8, 2026
Merged

fix(antigravity): retain unknown usage across CLI quota lanes#3489
steipete merged 4 commits into
steipete:mainfrom
urda:urda/agy-cli-lane-parity

Conversation

@urda

@urda urda commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Antigravity's CLI collapsed quota-summary responses into synthetic family representatives and omitted the individual buckets. Render the visible quota buckets once in usage text and cards, including the separate 5-hour and weekly limits. Keep this projection in the CLI so shared descriptor selection and app menus are unaffected.

Preserve unknown usage through an optional card percentage: missing or disabled quotas display Unavailable without an invented percentage or bar, and brief cards retain an unavailable first quota with its reset context. Existing idle-family rules apply only to display; raw JSON retains every bucket and the legacy family representatives. Legacy Antigravity responses and other providers' known-usage output keep their existing behavior.

Share the duplicated text/card-body rendering and map ordered windows through one metric builder. The final production diff removes 30 lines. Includes the contributor's parser-level missing/disabled-bucket tests, additional full/brief/compact coverage, and updated changelog and provider/CLI documentation. Thanks @urda!

Runtime proof used Developer ID-signed main/candidate CLI builds on macOS 15.4.1 (24E263), with an isolated synthetic HTTPS backend selected through the existing ANTIGRAVITY_CLI_PATH override. The real commands launched the managed backend, discovered its listening port, fetched quota JSON over localhost HTTPS, and rendered the results. No production command, fetching, authentication, or JSON-encoding code was modified. No real account data is included.

The final eight-case matrix passed with exit code 0: baseline/candidate usage, cards, and JSON; an unknown-first brief card; and disabled usage. JSON retained all four lane identities, availability flags, values, periods and reset metadata. Terminal captures show additional successful before/after usage invocations.

Before:
Actual baseline CLI output with synthetic quota data

After:
Actual candidate CLI output showing quota buckets and unavailable usage

Commands exercised:

CodexBarCLI usage --provider antigravity --source cli --no-color
CodexBarCLI cards --provider antigravity --source cli --no-color
CodexBarCLI cards --provider antigravity --source cli --brief --no-color
CodexBarCLI usage --provider antigravity --source cli --format json

Validation: provider/CLI focused suites and output goldens passed; full make test passed all 1,034 selections across 87 groups on the first pass, without retries or timeouts. The subsequently integrated parser cases and architecture gate passed focused validation; production code did not change. make check and independent P0–P2 review passed. All checks passed for head 70ea110, including both macOS test shards and Linux builds: https://github.com/steipete/CodexBar/actions/runs/34191572281.

The Antigravity quota-summary probe reports one lane per quota bucket
("Gemini 5-hour", "Gemini weekly", "Claude/GPT 5-hour") in
extraRateWindows and synthesizes worst-of-family representatives into
primary/secondary for legacy consumers. The menu bar, the widget, and the
web dashboard render the per-bucket lanes. The CLI text and cards paths
did not: Antigravity sets no extraRateWindowSelector, so the renderer
dropped every bucket and printed only the collapsed "Gemini Models" and
"Claude and GPT" rows.

Detect quota-summary lane IDs in the CLI renderer and render those lanes
in place of the synthetic primary/secondary. Apply the same hide-idle
rule the other surfaces use, so a family at known zero usage drops out.
The legacy modelQuotas path and every other provider are unchanged, and
`codexbar usage --format json` still serializes every lane because it
encodes the snapshot rather than this text.
@clawsweeper

clawsweeper Bot commented Sep 8, 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.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 1:45 AM ET / 05:45 UTC.

ClawSweeper review

What this changes

Render Antigravity quota buckets individually in CLI text and cards, preserve unknown usage and reset context, and share the text-rendering path.

Merge readiness

Ready for maintainer review

This PR remains useful: current main and v0.56.8 still use collapsed CLI quota rows. The earlier unavailable-usage finding is resolved, the supplied runtime proof supports the changed behavior, and no blocking defect remains.

Priority: P2
Reviewed head: 70ea1107e33d708a1fe0e76116b5d6718ff7544f

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused implementation with reduced production duplication, resolved prior feedback, targeted regression coverage, and convincing real CLI proof.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The inspected before/after terminal captures demonstrate the changed CLI rendering through the real command, backed by owner-confirmed macOS runs using the existing managed HTTPS backend path. The recorded matrix covers full and brief cards, disabled usage, and unchanged JSON; this is runtime display proof rather than isolated mock-renderer tests.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The inspected before/after terminal captures demonstrate the changed CLI rendering through the real command, backed by owner-confirmed macOS runs using the existing managed HTTPS backend path. The recorded matrix covers full and brief cards, disabled usage, and unchanged JSON; this is runtime display proof rather than isolated mock-renderer tests.
Evidence reviewed 9 items Complete introduced patch: Read all seven changed files against the pinned merge base. Production changes are confined to three CLI renderers; the parser, provider descriptor, fetching, authentication, and JSON encoding are unchanged.
Current-main necessity: Current main still renders primary/secondary representatives and descriptor-selected extras. Antigravity has no extra-rate-window selector, so this CLI projection remains missing.
Latest-release check: The supplied latest release, v0.56.8, also retains the collapsed renderer path; the requested CLI behavior is not already shipped there.
Findings None None.
Security None None.

How this fits together

CodexBar turns Antigravity quota responses into usage snapshots containing individual buckets and legacy family summaries. CLI renderers project those snapshots into text and cards, while JSON exposes the underlying snapshot.

flowchart TD
  A[Antigravity quota response] --> B[Usage snapshot]
  B --> C[CLI display projection]
  C --> D[Shared idle-family rule]
  D --> E[Known percentage or unavailable]
  E --> F[Usage text and cards]
  B --> G[Raw JSON with all buckets]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production -30 lines net; tests +360 lines Shared rendering reduces production code while adding focused quota-availability and display-parity coverage.

Technical review

Best possible solution:

Keep quota availability explicit through every CLI display while reusing family visibility rules and preserving the complete raw snapshot.

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

Yes: current-main source shows quota-summary buckets bypassed by the CLI's descriptor-selected rendering, and supplied baseline output demonstrates the omission. This review did not execute the application.

Is this the best way to solve the issue?

Yes: the CLI-specific projection reuses existing family filtering, carries availability without duplicate state, and leaves shared provider selection and raw JSON intact.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs misleading and omitted Antigravity CLI quota information with a limited display-only scope.
  • 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. Sufficient (terminal): The inspected before/after terminal captures demonstrate the changed CLI rendering through the real command, backed by owner-confirmed macOS runs using the existing managed HTTPS backend path. The recorded matrix covers full and brief cards, disabled usage, and unchanged JSON; this is runtime display proof rather than isolated mock-renderer tests.
  • proof: sufficient: Contributor real behavior proof is sufficient. The inspected before/after terminal captures demonstrate the changed CLI rendering through the real command, backed by owner-confirmed macOS runs using the existing managed HTTPS backend path. The recorded matrix covers full and brief cards, disabled usage, and unchanged JSON; this is runtime display proof rather than isolated mock-renderer tests.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • urda: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (2 earlier review cycles)
  • reviewed 2026-09-08T02:38:13.162Z sha bfb3062 :: needs real behavior proof before merge. :: [P2] Preserve unknown usage when rendering quota lanes
  • reviewed 2026-09-08T04:12:53.789Z sha 56d3023 :: needs maintainer review before merge. :: none

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfb3062ce3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Sources/CodexBarCLI/CLIRenderer.swift
Integrate current main and render each quota-summary bucket once in text
and cards. Carry availability through full and brief card projections so
missing or disabled quota is not presented as an available percentage.
Preserve reset context, shared idle-family visibility, and raw JSON.

Co-authored-by: Peter Urda <peter.urda@gmail.com>
@steipete steipete changed the title fix(antigravity): render one CLI lane per quota bucket fix(antigravity): retain unknown usage across CLI quota lanes Sep 8, 2026
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. 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. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 8, 2026
@steipete

steipete commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Taking this through maintainer validation. The CLI omission is confirmed, and I have preserved the per-bucket change while fixing unknown usage in text, full cards, and brief cards. Shared rendering removes the duplicated blocks, bringing the production diff below zero lines.

Focused suites, the full suite, and isolated executable usage/cards/brief/JSON runs are passing. The runtime checks use the existing ANTIGRAVITY_CLI_PATH override with a synthetic localhost HTTPS backend; no real account data is included in the proof. I am finishing the before/after captures and landing checks.

Co-authored-by: Peter Urda <peter.urda@gmail.com>
@steipete

steipete commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Integrating 56d3023 and its parser-level missing/disabled-bucket coverage with the shared-renderer cleanup. I am retaining the nil-based card metric representation, which gives the same unavailable behavior with less duplicated state, and preserving the updated provider documentation. The combined result will keep this branch history fast-forward and include the executable VM proof.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 8, 2026
@steipete
steipete merged commit b7f2a7c into steipete:main Sep 8, 2026
9 checks passed
@urda
urda deleted the urda/agy-cli-lane-parity branch September 8, 2026 06:47
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. proof: sufficient Contributor real behavior proof is sufficient. 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.

2 participants