fix(notify): name the binding window and weekly headroom - #2
Merged
Conversation
4 tasks
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
A spent 5h session window is not an exhausted week. Current Claude Code may offer
/low-priorityat that wall, but the gated offer, active state, and separate allowance are not present in/api/oauth/usage. ccpace should therefore state the relationship it can prove without impersonating session state.This PR changes the block to say
5h capped · 47% of 7d left · back @Wed 2 04:00, renders endpoint values at or above 100 ascap, and suppresses 100-to-101 delta noise.It also fixes a concrete notification contract bug: producers emitted
five_util,five_delta, andreset_time, while the formatter readutilization,delta, andreset_short, producing messages such as0% (+0%) reset. Notifications now use canonicalwindow,utilization,reset_at, andreset_timefields, retain the old aliases for existing custom hooks, and carry a stable custom-notifier event ID such asfull:work:5h:<reset>. The watch frame renders through the same formatter, so it cannot drift separately again.Sibling implementation: thevibeworks/claude-code-statusline#38 can prove
/low-priorityoffer/active state from the current session transcript; ccpace deliberately cannot and does not claim it.Verification
make check: 85 passeduv build: wheel and sdist builtgit diff --checkpassesCache follow-up: 5h and scoped caps no longer freeze the account. Only aggregate 7d exhaustion without a paid path is terminal; manual refresh and a newer shared statusline cache evict that snapshot. Five polling regression tests cover these boundaries.