feat(notice): a session wall is not a weekly wall - #38
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why:
Claude Code 2.1.258 can offer
/low-prioritywhen the shorter 5h session window binds. The current line renders that state as5h[101%]while a higher-ranked weekly-surplus notice can say+ 47% unused, so an interrupted session reads like an invitation to spend.This PR makes the state explicit and provenance-gated:
5h[cap@04:00]and suppress the meaningless+Nbump at the wall/low-priorityonly when this session transcript carries a matchingquotaLimits.lowPriorityOfferfor the current reset/api/oauth/usageReal 2.1.258 offer and active transcripts were replayed against the renderer. The active frame reads
+ lower priority · 47% of 7d left; the offer frame reads! 5h capped · /low-priority uses 7d. No raw transcript data enters fixtures or docs.Checklist:
make checkpasses: 491 testst/helpers.bashbash -n statusline.sh install.shandgit diff --checkpassSibling implementation: thevibeworks/ccpace#2 states the 5h wall and weekly headroom from the account-level API, without claiming session-only eligibility.
Cache follow-up: the capped path now has one tested TTL rule in both fetch gates. stdin keeps 5h/7d live; scoped and extra-usage fields remain on a finite 120 s API cadence instead of freezing to reset.