Skip to content

Port upstream 0.69.0: honor explicit Antigravity quota window cadence - #694

Open
Finesssee wants to merge 2 commits into
port/upstream-0.69.0from
port/micro-0.69.0-antigravity-window-cadence
Open

Finesssee wants to merge 2 commits into
port/upstream-0.69.0from
port/micro-0.69.0-antigravity-window-cadence

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Summary

Antigravity quota-summary buckets now accept an explicit window field. A non-empty window replaces the bucketId/displayName cadence candidates entirely: weekly -> 10080 min, 5h/session aliases -> 300 min, anything else -> no cadence. A blank window falls back to the previous id/name inference. Weekly-only Starter groups stay visible without an invented 5-hour bucket (the existing informational "No active 5h session" primary placeholder is unchanged). The 0.64.1 invariant that the selected primary/secondary are removed from extra_rate_windows is preserved.

Upstream reference

Ported / Deferred

  • Ported: window field on QuotaSummaryBucket and bucket_kind precedence in rust/src/providers/antigravity/quota_summary.rs.
  • Deferred/skipped: the OAuth retrieveUserQuotaSummary half (Windows has no Antigravity OAuth lane).

Validation

  • cargo +1.98.0 fmt --all: clean
  • cargo +1.98.0 clippy --workspace --all-targets -- -D warnings: pass
  • cargo +1.98.0 test -p codexbar antigravity -- --test-threads=4: 116 passed, 0 failed (4 new tests: explicit cadence for opaque ids, explicit window over legacy names incl. unknown, blank window fallback, weekly-only Starter)

Affected areas

Rust backend, Antigravity provider only. No shared code, no new dependencies.

UI proof

Not applicable (window minutes only, existing rendering).

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 37d7f0ed-d25e-4413-a7a8-a5574dbd5788

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Thermo-nuclear review

Scope: quota_summary.rs (+82/-4 lines, file is 684 lines, well under 1k). Behavior matches the 0.69.0 spec: an explicit non-empty window replaces the id/name candidates, blank falls back, weekly maps to 10080, 5h to 300, unknown yields no cadence, and the primary/secondary-removed-from-extra_rate_windows invariant is kept. No new dependencies, provider logic stays in the antigravity module, OAuth half not ported (as specified).

Findings (all valid, all small):

  1. bucket_kind computed non_empty(bucket.window) twice and built an intermediate names array plus a &[Option<&str>] slice through a match that re-derived the same value. Replace with one match yielding a fixed [Option<&str>; 2].
  2. explicit_window_sets_cadence_for_opaque_bucket_ids branched on the expected value inside the loop and used title only as an assert message, so the test logic was harder to read than two direct cases.
  3. explicit_window_replaces_legacy_bucket_names used a match minutes inside a loop with a shared trailing assertion; two direct cases with a shared snapshot helper are clearer and drop the duplicated JSON.

Verdict: no correctness or convention problems; fixing the three readability items now, behavior unchanged.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Follow-up to the thermo-nuclear review: pushed bf8b80b "Address thermo review".

Fixed: all three findings. bucket_kind now picks its candidates with a single match, and the two explicit-window tests use a shared single_bucket_snapshot helper with direct assertions. Behavior is unchanged.

Left: nothing. Validation on Rust 1.98.0: cargo fmt --all, clippy -p codexbar --all-targets -D warnings clean, cargo test -p codexbar antigravity 116 passed, 0 failed. No UI change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant