fix: surface exhausted Kimi monthly usage automatically - #3543
Conversation
Prioritize the known exhausted kimi-monthly pool in the existing automatic window resolver, preserving explicit metrics and Code-window fallback. Reuse this result for the status percentage and highest-usage ranking. Partially addresses #3536 and extracts the display correction from #3537. Authentication/storage changes remain separate. Includes regression tests, signed synthetic native proof, docs and changelog. Co-authored-by: Otto <ottoprua@OttodeMac-mini-2.local>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 5:05 PM ET / 21:05 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR makes Kimi’s automatic usage display and highest-usage ranking consider an exhausted monthly membership pool, with regression tests, native rendering proof, and documentation. Merge readiness✅ Ready for maintainer review This remains a useful, narrowly scoped fix absent from current main and v0.58.0. No actionable patch defects were found; the inspected native before/after proof supports the display correction. Priority: P2 Review scores
Verification
How this fits togetherCodexBar combines Kimi Code quota windows with optional monthly membership statistics. Its shared usage-window resolver selects the quota used by menu-bar rendering and highest-usage ranking. flowchart TD
A[Code quota windows] --> C[Combined usage snapshot]
B[Monthly membership statistics] --> C
C --> D{Automatic or explicit metric}
D --> E[Automatic exhaustion selection]
D --> F[Explicit window selection]
E --> G[Menu-bar display and ranking]
F --> G
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep quota selection in the existing shared resolver, preserve explicit selections, and handle Desktop credential discovery separately. Do we have a high-confidence way to reproduce the issue? Yes: a known monthly window at 100% used with reset Code windows makes current main select unused session quota. Source and the supplied native baseline demonstrate the mechanism; this reviewer did not execute it. Is this the best way to solve the issue? Yes: extending the existing Kimi resolver is a small, maintainable correction that reaches both display and ranking while preserving explicit preferences. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cebf9995f672. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged as 9f4f544. The automatic Kimi resolver now considers a known exhausted monthly pool before reset Code windows, fixing the status percentage and highest-usage ranking while preserving explicit choices. The patch passed 189 focused tests, all 1,061 full-suite selections without retries/timeouts, lint, independent P0–P2 review and all Linux/musl/macOS CI checks. Signed native baseline/final proof exercises the actual status-image renderer in light and dark appearances; the final images match those in the PR body byte-for-byte. The merged tree matches the integration tree checked against main. Docs and the Unreleased changelog are updated. #3536 and #3537 remain open for the separate authentication/data-acquisition portion. Thanks @OttoPrua! |
When Kimi's monthly membership pool is exhausted but Code's shorter windows have reset, Auto currently shows unused quota. This change includes the existing known
kimi-monthlywindow in Kimi's exhausted-window selection, fixing both the menu-bar percentage and highest-usage ranking. Partial, absent, unknown and unrelated extra windows retain their existing behavior; explicit window choices still use the standard resolver.This extracts the display correction from #3537 and partially addresses #3536. It does not resolve the authentication portion of either report, so both remain open. Thanks @OttoPrua for identifying the monthly-pool issue.
Validation:
make checkreports zero violations across 2,173 Swift files. Independent P0–P2 review is clean.make testpassed all 1,061 selections across 89 groups on the first attempt, with no retries or timeouts (815.3 seconds). Exact-head CI passed every Linux x64, Linux ARM64, musl and macOS check. Merged as9f4f544a5bf81da276fe94176aa1165c9e296b4b. The touched ranking fixture now uses in-memory settings and stubbed browser discovery.Includes provider documentation and an Unreleased changelog entry.
Inspected synthetic native before/after proof