Notify when a new earned limit reset is banked (1.1.0) #8
Loading…
Reference in a new issue
No description provided.
Delete branch "oss-oo/banked-reset-notifications"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature for 1.1.0, asked by Claudiu: besides the 7d Codex refresh, notify when a new banked (earned) Codex limit reset arrives.
Data model (app-server schema of Codex CLI 0.165):
rateLimitResetCreditscarries an authoritativeavailableCountandcreditswithid,status,expiresAtandgrantedAt; the list may be capped,nullmeans only the count is known, and the whole summary can be missing.resetCountKnown; a missing summary still reads as a placeholder 0). Replays never carry the flag.findBankedResets()reports a grown count; where the list is complete, only credits no earlier fetch listed count, and the applet's own pending redemption never does, so a credit back from a failed redemption stays silent. A capped or count-only list leaves the count to decide. Never on the first fetch, after a reload or from a replay; each increase once. No credit ID is ever stored._nvia dngettext); settings tooltips, README, packaging notes, CHANGELOG and the translation template updated. Known limit, documented: a sign-in change between two refreshes that the applet never saw can announce the other account's credits.capture.pyreads both manifests before writing either, with unit tests.Validation:
make verifygreen (74 Python tests), all suites green under clock shifts of +1 h, +4 d, +30 d and +1 y (one load flake in a pre-existing transport timing test, three green reruns), 18 README screenshots recaptured, 121/121 baselined mutants, two independent review rounds with every finding fixed (round 1: the grant-time design → seen IDs; round 2: pending redemption across reloads, baseline and seen IDs move together, plural count cap, test gaps).🤖 Generated with Claude Code
Claudiu's request: besides the 7d Codex refresh, notify when a new banked Codex reset arrives. The app-server protocol (Codex CLI 0.165 schema) reports the bank as rateLimitResetCredits: an authoritative availableCount, and credits that each carry a grantedAt time; the list may be capped, and null means only the count is known. - The helper marks whether the backend reported the count at all (resetCountKnown; a missing summary still reads as a placeholder 0) and keeps each listed credit's grantedAt. Replays never carry the flag. - findBankedResets() reports a grown count between two real fetches that both reported one. Where the list is complete, only credits granted since the previous fetch (ten minutes of clock skew allowed) count, so a credit that came back from a failed redemption stays silent; a capped or count-only list leaves the count to decide. - The notification ("Codex limit reset banked", "Limit resets available: N") uses the same switches and delivery as the 7d refresh; the settings tooltips, README, packaging notes, changelog and translation template say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>6b54e01c1c1aa20da9257