core: plan the daily budget per day, start forecasts at 2 % and follow the limit week #15

Merged
schmidt.florian merged 6 commits from 13-panel-budget into master 2026-10-18 10:53:02 +02:00
6 Commits
Author SHA1 Message Date
Florian Schmidt 8bde2a3b0e core: estimate the day baseline from whole hours before the first sample
agent-review agent review: pass
The second review found that the hour bucket holding the first sample
keeps growing after it, so use later in that hour still moved the
estimated baseline and both budgets. Following D7, the estimate now
counts only the whole hours before that sample's hour. No counted bucket
can grow after the sample, so later samples and tokens no longer move it.

Refs #13
2026-10-18 10:38:22 +02:00
Florian Schmidt d2cf2c282a docs: count only whole hours before the first sample for an estimated baseline
Token history is kept per hour, and the hour that holds the day's first
sample keeps growing after it, so use in that hour still moved the budget
(second review of #15). The developer chose another round with this rule
on 2026-10-18.

Refs #13
2026-10-18 10:23:32 +02:00
Florian Schmidt 09f7633eb5 core: keep an estimated day baseline fixed and the tile rows equal
agent-review agent review: fail
An estimated day baseline took its scale from the newest sample, so use
from the web lowered the budget while today stayed within it. It now takes
the scale from the first sample at or after the day start (D7). The stale
sample warning moves into the "used" caption, so tiles of one kind keep the
same rows (D8). Both answer the first review of #15.

Refs #13
2026-10-18 10:08:59 +02:00
Florian Schmidt 158572c2ba docs: take an estimated day baseline's scale from the day's first sample
With the newest sample's scale, use from the web or another device moved
an estimated day baseline, and the daily budget moved with it while today
stayed within its plan (review of #15).

Refs #13
2026-10-18 10:02:02 +02:00
Florian Schmidt 941a597680 core: plan the daily budget per day, start forecasts at 2 % and follow the limit week
agent-review agent review: fail
The budget was the rest of the week over the time left, so each use today
lowered it and a partial first day was held to a full day. Now each day of
the instance has its share, its even pace and its budget. Today's budget
starts from the use at the day start and does not move with today's use
(D7). Forecasts start at 2 % of a window, so an early reset no longer hides
them for most of a day.

Limit tiles of one kind show the same rows, with placeholders that say why
a value is missing. The week chart draws per-day steps and marks the
instance start and reset (D8). Week token totals follow the provider's
limit week and say since when, with the calendar week as fallback (D9).

Refs #13
2026-10-18 09:55:41 +02:00
Florian Schmidt a8785fa453 docs: start forecasts at 2 %, plan the daily budget from the day start, follow the limit week
The developer wants forecasts earlier, a daily budget that today's use
does not shrink, and week totals that follow the limit week (D7, D8, D9).

Refs #13
2026-10-18 09:37:00 +02:00