Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Reviewed by Codex gpt-6-luna (xhigh); verified and validated by Claude Thermo-nuclear review of PR #687 (Grok local calendar-day window): 1 finding.
|
|
Follow-up: the finding is fixed at the new head. Nothing left open. Commands run: |
Summary
The Grok local-session scan (
rust/src/providers/grok/local_sessions.rs) now covers exactlydayslocal calendar days: start = local midnight of today minus(max(1, days) - 1)days, end = local midnight of tomorrow (half-open[start, end)). Previously it used a rollingnow - dayscutoff and dropped files modified afternow, so daily buckets and aggregate totals could disagree with the advertised 7/30-day window.Upstream reference
Sources/CodexBarCore/Providers/Grok/GrokLocalSessionScanner.swift(summarize(env:lookbackDays:now:)),Tests/CodexBarTests/GrokLocalSessionScannerTests.swift("scan totals cover only the advertised local calendar days"),docs/grok.md.Ported / Deferred
Ported:
docs/PROVIDERS.mdnote.Already satisfied locally, no code change needed:
commands/usage_spend.rscallssummarize(7)andsummarize(30)directly, so no projection beyond the scan exists.spend.seven_day_tokens/thirty_day_tokenscome fromlocal_sessions::summarize), so a billing outage does not hide them.Deferred: none. The Swift-only
UsageSnapshot.replacing(costUsage:)andUsageStorerefresh publication changes have no Windows counterpart.Validation
cargo +1.98.0 fmt --all: cleancargo +1.98.0 clippy --workspace --all-targets -- -D warnings: passcargo +1.98.0 test -p codexbar grok -- --test-threads=4: 48 passed, 0 failed (includesscan_totals_cover_only_the_advertised_local_calendar_days,calendar_window_starts_at_local_midnight, and the existing local-day test)Affected areas
rust/src/providers/grok)docs/PROVIDERS.md)UI proof
Not applicable.