feat(quota): auto-expire stale cooldown data on read #87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/cooldown-reset"
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?
Summary
resets_athad already passed — claude-code only refreshesrate_limitson a real inference call, so an idle session never self-corrects.getAccountQuota()(nexus/src/lib/server/quota/store.ts) now prunes an expired window as a pure read-time filter (not a mutation) instead of fabricating a 0% or leaving stale data in place.worker/nexus-statusline.shdoes the equivalent inline on every render, via a newexpired()POSIX helper comparingresets_atagainstdate +%s.null, identical to "never reported" —QuotaBadge.sveltealready renders that as the dashed "unknown" state./api/agent/quota) is deliberately untouched — expiry is a display-layer concern on both sides, not a storage concern.AGENTS.mdfact #19 documents the behavior for future readers.Test plan
pnpm test(nexus/) — 843 tests passingsh worker/nexus-statusline.test.sh— 30 tests passing (7 original + 3 more closing gaps found in review)Design doc:
docs/superpowers/specs/2026-07-16-quota-statusline-design.md("Addendum (2026-07-21)"). Plan:docs/superpowers/plans/2026-07-21-cooldown-reset.md.