release: merge develop into release/0.1 (weekly budgets, refusal sentence, limit ceiling) #101

Merged
james.maes merged 3 commits from rc/develop-into-release-0.1-weekly into release/0.1 2026-11-11 16:15:56 +00:00
3 Commits
Author SHA1 Message Date
james.maesandClaude Fable 5.2 1ae7bb9cfa Merge develop into release/0.1 for the next 0.1.0 RC (weekly budgets, refusal sentence, limit ceiling)
maven / build (push) Successful in 5m16s
build / maven (push) Successful in 5m16s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 10:08:23 -06:00
james.maes f5bf3e1d04 Merge pull request 'feat(budgets): weekly budgets, a refusal that names the limit, a ceiling on what may be saved' (#100) from feat/weekly-budget into develop
maven / build (push) Successful in 6m54s
build / maven (push) Successful in 6m54s
2026-11-11 16:08:12 +00:00
james.maesandClaude Fable 5.2 48cca86285 feat(budgets): weekly budgets, a refusal that names the limit, a ceiling on what may be saved
maven / build (push) Successful in 4m52s
build / maven (push) Successful in 4m52s
A budget (Assistant > Budgets) can count over a WEEK: the ISO week in UTC,
Monday 00:00:00 UTC up to the next Monday 00:00:00 UTC. DAY and MONTH are
unchanged and there is no schema change (period is text).

The refusal at a limit now says which limit, how much, when the count starts
again and who can change it: "The assistant has reached the weekly limit of
$500.00 of the budget 'Everyone, a week'. It starts again on Monday 19 October
2026 at 00:00 UTC. An administrator can raise the limit or grant an override."
The warning says "weekly" for a weekly budget.

New config budgetCostLimitCeilingUsd (default 1,000,000, null for none): a
cost budget above it is refused when saved. A budget is created or changed
only by a session that holds assistant.admin; the save rule now checks it as
it already did for overrides, besides the table's permission rules.

Budgets are read from their table at every evaluation and are not cached, so
a changed limit applies to the next question. That was already so; it is now
stated and tested.

Tests (BudgetServiceTest): the week boundary in UTC, including a Sunday
evening in Chicago that is Monday in UTC and a week across a year end; the
micro-USD to dollar conversion at the limit (499,999,999 micros warn, one more
refuses); the refusal sentence and HTTP 429 BUDGET for a new question; a
changed limit taking effect on the running service; the ceiling; and a person
without assistant.admin refused by the table's permission and by the save.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 10:00:13 -06:00