Skip to content

fix(quota): load account quotas automatically and prepare 0.89.1 - #394

Merged
fylorn merged 1 commit into
mainfrom
codex/fix-account-quota-refresh
Nov 4, 2026
Merged

fylorn merged 1 commit into
mainfrom
codex/fix-account-quota-refresh

Conversation

@fylorn

@fylorn fylorn commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Load ChatGPT account quotas at startup and through generic quota reads, so the overview and menu bar no longer depend on visiting Upstreams. Prefer quota headers from real traffic; query again after 15 minutes without an update or after a reported window reset. Manual refresh remains immediate.

Concurrent readers share in-flight queries, with at most four outbound reads. Failures back off while preserving the last quota. Automatic reads exclude disabled accounts and accounts requiring sign-in; late results cannot overwrite disabled or replaced accounts. The poller is cancelled during Core handover.

Why

Only the account usage endpoint populated ChatGPT quota state. A cold Core therefore returned no ChatGPT quota to the overview or menu until the user opened the Upstreams page.

How it was verified

  • 90 control/ChatGPT tests passed, including startup collection, idle refresh, traffic updates postponing queries, reset deadlines, concurrent readers, failures and cancellation.
  • Workspace Clippy with warnings denied and Rust formatting passed.
  • 17 release-note tests passed.
  • Workspace nextest: 4,335 tests passed initially; three loopback-network tests were intercepted by the local system proxy and all three passed with NO_PROXY=127.0.0.1,localhost,::1. Eight tests were skipped by the suite.
  • 86 real-binary smoke checks passed.

The existing account request path retains its OAuth refresh, proxy selection and masked backend errors. Integration tests use a local fake OpenAI server and fabricated credentials.

Notes for review

Prepare v0.89.1 and its release notes. No configuration or control-protocol changes are required. Lite's accompanying overview event-subscription fix and Core pin update are in ThinkWatch-Lite#400, targeting dev without a Lite release.

The overview and menu bar previously depended on opening Upstreams to
populate ChatGPT quota state. Warm it at startup and through generic quota
reads, then prefer real traffic updates, a 15-minute stale-data fallback
and reported window reset times over fixed one-minute polling.

Share concurrent reads, bound outbound queries and back off failures while
retaining the last quota. Cancel the poller during Core handover and reject
late results for accounts that have been disabled or replaced.

Prepare 0.89.1 with regression coverage and release notes.
@fylorn
fylorn merged commit c3a4a39 into main Nov 4, 2026
7 checks passed
@fylorn
fylorn deleted the codex/fix-account-quota-refresh branch November 4, 2026 03:20
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant