dotfiles/claude/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonny Barnes 2a785a55a7
Pace the per-model weekly limit over the days you actually work
The weekly limit resets every 7 days, but a 5-day week means the sustainable
burn is 20% a day, not the 100/7 the calendar implies. Nothing on the line
said that, so staying inside the limit meant doing the division by hand.

Adds pace and trend to the per-model bar: "Fable 6% 19%/d ✓". pace is what
is left divided by the working days still in the window, so it is the
envelope for today. trend compares usage against today's band - during
working day n of m, anywhere between (n-1)/m and n/m of the budget is on
track - and reports the distance outside it.

A band rather than a point because a point built from completed days expects
0% on the first working day of the window, so any usage at all reads as
overspending: 6% on a Monday morning showed a red arrow. The band is also
all whole-day granularity supports, and the sleep-aware glide in
statusline.burnrate.sh is what it would take to say more.

Working days come from SL_WORK_DAYS (ISO weekdays, default Mon-Fri) and are
counted inside the reset window rather than assumed, so a window that starts
mid-week still divides correctly. The colour thresholds derive from
100/total_workdays instead of the hardcoded 14.3-a-day ones in burnrate.sh,
which would call 13%/d healthy against a 20-a-day budget.

SL_NOW is a test seam for the clock. The cache-age checks deliberately stay
on the real clock: a pinned SL_NOW could otherwise age a fresh fixture past
USAGE_CACHE_SECS and send a test to the network with real credentials.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 21:02:47 +01:00
..
run.sh Pace the per-model weekly limit over the days you actually work 2026-09-02 21:02:47 +01:00
statusline.isaacaudet.cache_test.sh Back off after a failed usage fetch instead of retrying every redraw 2026-09-02 13:22:52 +01:00
statusline.isaacaudet.overflow_test.py Wrap the status line rather than drop the per-model limit 2026-08-31 18:54:02 +01:00
statusline.isaacaudet.pace_test.sh Pace the per-model weekly limit over the days you actually work 2026-09-02 21:02:47 +01:00
statusline.isaacaudet.payload_test.sh Wrap the status line rather than drop the per-model limit 2026-08-31 18:54:02 +01:00
statusline.isaacaudet.thinking_test.sh Read thinking state from the payload and show the effort level 2026-09-02 20:17:12 +01:00
statusline.isaacaudet.width_test.sh Measure line one's branch budget instead of assuming 56 columns 2026-08-31 19:01:24 +01:00