fix(alibaba): restore Token Plan 5-hour and weekly windows - #2437
fix(alibaba): restore Token Plan 5-hour and weekly windows#2437rohitsabu wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02161d9b35
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let primary = fiveHour ?? monthlyCredits | ||
| let secondary = fiveHour == nil ? nil : sevenDay |
There was a problem hiding this comment.
Label the restored rate windows by their durations
When the new rate-limit response succeeds, these assignments make the primary bar the 5-hour percentage and the secondary bar the 7-day percentage. MenuCardView+ModelHelpers.rateWindowLabels uses the Token Plan descriptor labels verbatim, but that descriptor still says Credits and Usage (rather than 5-hour and Weekly), so every successful rate-limit fetch presents the new percentage quotas under misleading labels. Update the Token Plan metadata alongside this remapping.
Useful? React with 👍 / 👎.
Release impactThis fixes a current production regression for authenticated Alibaba Token Plan users: the legacy subscription-summary response no longer supplies the 5-hour and weekly limits, so released builds show the provider identity but null usage windows. Merging this provider-only commit and including it in the next normal CodexBar patch release is sufficient for upstream desktop users. For the mobile-enabled fork, the same commit can be cherry-picked without any entitlement or signing changes and published through the existing official o1xhack release pipeline. That restores the 300-minute and 10,080-minute windows for existing Mac users and for the unchanged iPhone snapshot/sync path. No special migration is needed. Requested release action: merge after the focused provider tests pass in full-Xcode CI, then include it in the next ordinary patch release; no out-of-band or ad-hoc artifact is requested. |
02161d9 to
9482737
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(alibaba): restore Token Plan 5-hour and weekly windows This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Full-Xcode validation is now complete on the current head
The provider fix itself is green and remains isolated to the Alibaba endpoint/parser/tests. Please merge and include it in the next ordinary signed patch release; the mobile fork can cherry-pick the corresponding commit and publish through its unchanged o1xhack signing pipeline. |
|
Thanks @rohitsabu for digging into the Personal plan gap. Architecture decision from triage (recorded): Qwen Cloud Personal will land as a first-class provider based on #2361, and mainland/international Alibaba Personal (#2370/#2349) will become explicit variants with a shared Personal parser — so this PR won't proceed in its current shape. Concrete issues found in review, for reference: the personal endpoint is only tried when |
Summary
Regression evidence
The live authenticated international dashboard currently calls
zeldaHttp.apikeyMgr./tokenplan/personal/api/v2/usageand returnsper5HourPercentage,per1WeekPercentage,per5HourResetTime, andper1WeekResetTimeinside a nested JSON envelope. No cookie, token, account identifier, or response value is included in this change.A fail-then-pass isolated harness using the redacted fixture verified:
0.0769maps to7.69%over 300 minutes0.0261maps to2.61%over 10,080 minutesDateVerification
swift build --product CodexBarCLIon currentmain: passgit diff --check: passswift test --filter AlibabaTokenPlanProviderTests: environment-blocked locally because this Mac currently has Command Line Tools only and noTestingmodule; the test sources are included for full-Xcode CIThe change is provider-only: no mobile, signing, entitlement, credential, or private configuration files are touched.