Compare commits

..
Author SHA1 Message Date
james.maesandClaude Fable 5.2 07b06f2070 Merge develop into release/0.1 for the next 0.1.0 RC (save_analysis, decided actions, ask before guessing)
maven / build (push) Successful in 5m13s
build / maven (push) Successful in 5m13s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 07:51:36 -06:00
CI 61fca48424 Bump version to 0.1.0-RC.27 [skip ci] 2026-11-11 13:51:22 +00:00
james.maes d761bd4a7d Merge pull request 'release: merge develop into release/0.1 (analyze_records)' (#97) from rc/develop-into-release-0.1-analyze into release/0.1
maven / build (push) Successful in 6m16s
build / maven (push) Successful in 6m16s
2026-11-11 13:45:08 +00:00
james.maes f1634b0911 Merge develop into release/0.1 for the next 0.1.0 RC (analyze_records)
maven / build (push) Successful in 6m27s
build / maven (push) Successful in 6m27s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

# Conflicts:
#	CHANGELOG.md
#	pom.xml
2026-11-11 07:34:30 -06:00
CI feab4caf17 Bump version to 0.1.0-RC.26 [skip ci] 2026-11-09 15:59:36 +00:00
james.maes ba21b72188 Merge pull request 'fix(engine): a stalled database can no longer hang a turn on 'Thinking'' (#94) from fix/turn-watchdog-never-hangs into release/0.1
maven / build (push) Successful in 5m5s
build / maven (push) Successful in 5m5s
2026-11-09 15:54:38 +00:00
james.maesandClaude Sonnet 5.5 0a65702dab fix(engine): a stalled database can no longer hang a turn on 'Thinking'
maven / build (push) Successful in 5m3s
build / maven (push) Successful in 5m3s
The watchdog ran the deadline logic after two database reads and heartbeat() was synchronized on the monitor that finish() needs, so one blocked database call stopped the deadline, the force-finalize and the final message.end. The deadline now runs first with no database access, housekeeping runs on a bounded abandonable worker, finish() has a guard that ends the stream with an error event, and every phase logs at INFO.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 09:48:47 -06:00
CI 739ca6981f Bump version to 0.1.0-RC.25 [skip ci] 2026-11-07 17:28:54 +00:00
james.maes b51dd4dad1 Merge pull request 'release: merge develop into release/0.1 (Gitea-aligned RC)' (#92) from align/develop-into-release-0.1 into release/0.1
maven / build (push) Successful in 8m11s
build / maven (push) Successful in 8m11s
2026-11-07 17:20:44 +00:00
james.maesandClaude Opus 5.5 c3a03b8d84 Merge develop into release/0.1 (Gitea-aligned RC)
maven / build (push) Canceled after 37s
build / maven (push) Canceled after 43s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:19:04 -06:00
james.maes 2d25f0b769 Merge pull request 'fix(assistant): store the transcript before message.end so the panel shows the answer' (#85) from fix/transcript-stored-before-message-end into release/0.1
QRun-IO/ci-policy: ci / fork-guard (push) Skipped
QRun-IO/ci-policy: ci / head-profile (push) Skipped
QRun-IO/ci-policy: ci / application-template-0 (push) Skipped
QRun-IO/ci-policy: ci / gradle-1 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (push) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (push) Skipped
QRun-IO/ci-policy: ci / node-8 (push) Skipped
QRun-IO/ci-policy: ci / node-9 (push) Skipped
QRun-IO/ci-policy: ci / node-10 (push) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (push) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (push) Skipped
QRun-IO/ci-policy: ci / source-config-13 (push) Skipped
QRun-IO/ci-policy: ci / source-config-14 (push) Skipped
QRun-IO/ci-policy: ci / android-0 (push) Skipped
QRun-IO/ci-policy: ci / original-business (push) Skipped
QRun-IO/ci-policy: ci / original-mcp (push) Skipped
QRun-IO/ci-policy: ci / original-voyage (push) Skipped
QRun-IO/ci-policy: ci / original-cli (push) Skipped
QRun-IO/ci-policy: ci / not-enrolled (push) Skipped
QRun-IO/ci-policy: native / fork-deny (push) Skipped
QRun-IO/ci-policy: native / dotnet-0 (push) Skipped
QRun-IO/ci-policy: native / native-result (push) Successful in 7s
QRun-IO/ci-policy: Shared Java Maven CI with Docker / secrets (push) Successful in 29s
QRun-IO/ci-policy: ci / repository-policy (push) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (push) Skipped
QRun-IO/ci-policy: Shared Java Maven CI with Docker / verify (push) Successful in 5m57s
QRun-IO/ci-policy: Shared Java Maven CI with Docker / gate (push) Successful in 16s
QRun-IO/ci-policy: ci / java-docker-3 (push) Successful in 24m15s
QRun-IO/ci-policy: ci / ci-result (push) Successful in 8s
2026-11-05 10:17:10 +00:00
james.maesandClaude Sonnet 5.5 c5125f9788 fix(assistant): store the transcript before message.end so the panel shows the answer
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Skipped
QRun-IO/ci-policy: ci / android-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-business (pull_request) Skipped
QRun-IO/ci-policy: ci / original-mcp (pull_request) Skipped
QRun-IO/ci-policy: ci / original-voyage (pull_request) Skipped
QRun-IO/ci-policy: ci / original-cli (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 11s
QRun-IO/ci-policy: Shared Java Maven CI with Docker / secrets (pull_request) Successful in 36s
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: Shared Java Maven CI with Docker / verify (pull_request) Successful in 7m8s
QRun-IO/ci-policy: Shared Java Maven CI with Docker / gate (pull_request) Successful in 23s
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Successful in 12m50s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 10s
The panel reloads the conversation the moment the stream ends. The
redacted transcript (message parts, pending actions, stored events) was
flushed only after message.end was sent, so that reload read the "[]"
placeholders and showed the newest question and answer as empty bubbles
until the panel was closed and reopened. Persist and flush first, then
emit message.end.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 19:15:44 -06:00
james.maesandCodex 3de664e0fd ci: centralize release branch verification and workflows (#75)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 12:38:46 -05:00
CircleCI 2caa634044 Bump version to 0.1.0-RC.24 [skip ci] 2026-10-16 17:08:39 +00:00
james.maesandClaude Opus 5.5 c77e5b0123 Merge develop into release/0.1 for 0.1.0-RC.24 (#62 optional unreachable providers report DEGRADED)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:59:08 -05:00
CircleCI f46735b1c0 Bump version to 0.1.0-RC.23 [skip ci] 2026-10-16 16:04:25 +00:00
github-actions[bot] 86563c64d2 Merge develop into release/0.1 for the next 0.1.0 RC 2026-10-16 15:58:52 +00:00
CircleCI 82febe0f19 Bump version to 0.1.0-RC.22 [skip ci] 2026-10-16 02:27:26 +00:00
james.maesandClaude Opus 5.5 1ea23dfc49 Merge develop into release/0.1 for 0.1.0-RC.22 (#60 fail-soft assistant server)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:17:28 -05:00
CircleCI 9d31de46a6 Bump version to 0.1.0-RC.21 [skip ci] 2026-10-16 01:13:38 +00:00
james.maesandClaude Opus 5.5 24b0b3b14a Merge develop into release/0.1 for 0.1.0-RC.21 (#59 records render always carries rows and columns)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:04:06 -05:00
CircleCI 1c33e97664 Bump version to 0.1.0-RC.20 [skip ci] 2026-10-15 21:41:12 +00:00
james.maesandClaude Opus 5.5 fcaf2ded7e Merge develop into release/0.1 for 0.1.0-RC.20 (#56 UI API 1.6.0 extension, QQQ RC.15)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:30:07 -05:00
CircleCI 2cea8ffd44 Bump version to 0.1.0-RC.19 [skip ci] 2026-10-15 21:12:25 +00:00
james.maesandClaude Opus 5.5 6b98d5216b Merge develop into release/0.1 for 0.1.0-RC.19 (#57 shutdown hook holds the runtime weakly)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:04:27 -05:00
CircleCI 6adf390bf8 Bump version to 0.1.0-RC.18 [skip ci] 2026-10-15 03:36:35 +00:00
james.maesandClaude Opus 5.5 bc92c89665 Merge develop into release/0.1 for 0.1.0-RC.18 (#45 health checks)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:29:33 -05:00
CircleCI d43402e262 Bump version to 0.1.0-RC.17 [skip ci] 2026-10-15 02:40:56 +00:00
james.maesandClaude Opus 5.5 fe725ac8ff Merge develop into release/0.1 for 0.1.0-RC.17 (#54 assistant answers in the Jobs tray, QQQ RC.8)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:32:46 -05:00
CircleCI dfb05d8935 Bump version to 0.1.0-RC.16 [skip ci] 2026-10-15 02:20:24 +00:00
james.maesandClaude Opus 5.5 523fd0128a Merge develop into release/0.1 for 0.1.0-RC.16 (#53 help bundle)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:11:51 -05:00
CircleCI 47115fe359 Bump version to 0.1.0-RC.15 [skip ci] 2026-10-15 00:18:50 +00:00
james.maesandClaude Opus 5.5 f2d2b50459 Merge develop into release/0.1 for 0.1.0-RC.15 (#44 transcript redaction)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:10:35 -05:00
CircleCI 8c33db9fcf Bump version to 0.1.0-RC.14 [skip ci] 2026-10-14 23:13:46 +00:00
james.maesandClaude Opus 5.5 75a5dedf7f Merge develop into release/0.1 for 0.1.0-RC.14 (#46, #47 indexes and FKs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:07:05 -05:00
CircleCI c1cceaf4c3 Bump version to 0.1.0-RC.13 [skip ci] 2026-10-14 22:27:30 +00:00
james.maesandClaude Opus 5.5 f8a114bbb8 Merge develop into release/0.1 for 0.1.0-RC.13 (#48 seeds and Setup card, #49 durable turns, #50 seed fixes, #52 rollback)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:20:45 -05:00
CircleCI 3a7ff1c659 Bump version to 0.1.0-RC.12 [skip ci] 2026-10-14 16:03:00 +00:00
james.maesandClaude Opus 5.5 ea81166454 Merge develop into release/0.1 for 0.1.0-RC.12 (#19 #39 #40 #42 #43)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:56:16 -05:00
CircleCI cfcc044055 Bump version to 0.1.0-RC.11 [skip ci] 2026-10-14 12:57:45 +00:00
james.maesandClaude Opus 5.5 620dee488d Merge develop into release/0.1 for 0.1.0-RC.11 (#36 scheduled tasks, #37 provider-api module)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 07:51:34 -05:00
CircleCI e23206f1e8 Bump version to 0.1.0-RC.10 [skip ci] 2026-10-14 12:12:23 +00:00
james.maesandClaude Opus 5.5 c6bae3bcf2 Merge develop into release/0.1 for 0.1.0-RC.10 (#38 bulk-load tools)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 07:09:32 -05:00
CircleCI 2d8459bb24 Bump version to 0.1.0-RC.9 [skip ci] 2026-10-14 01:42:57 +00:00
james.maesandClaude Opus 5.5 ac06a96787 Merge develop into release/0.1 for 0.1.0-RC.9 (presentation #32, RAG and contingent PVs #33, demo #34, P-d/P-e)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:39:02 -05:00
CircleCI d4a1f64480 Bump version to 0.1.0-RC.8 [skip ci] 2026-10-14 00:55:57 +00:00
james.maesandClaude Opus 5.5 c28e782075 Merge develop into release/0.1 for 0.1.0-RC.8 (core alerts #31, budgets #26, routing #27)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 19:52:20 -05:00
CircleCI 5c76a13245 Bump version to 0.1.0-RC.7 [skip ci] 2026-10-13 23:31:30 +00:00
james.maesandClaude Opus 5.5 8d1348888d Merge develop into release/0.1 for 0.1.0-RC.7
Provider/model registry and OpenAI-compatible adapter (#22), Bedrock and
Vertex (#23), data classification, PHI routing and HIPAA mode (#24).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 18:28:10 -05:00
CircleCI 47cc572c36 Bump version to 0.1.0-RC.6 [skip ci] 2026-10-13 19:51:20 +00:00
james.maesandClaude Opus 5.5 8099f64bf2 Merge develop into release/0.1 for 0.1.0-RC.6
Tools via /qqq/v1 with a loopback stand-in (#14); profiles, skills,
explain access, denials, ArchUnit and the denial matrix (#15); #16; the
demo pending-action card (#18).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:49:14 -05:00
CircleCI ac6ec75deb Bump version to 0.1.0-RC.5 [skip ci] 2026-10-13 18:44:09 +00:00
james.maesandClaude Opus 5.5 1f48a370e3 Merge develop into release/0.1 for 0.1.0-RC.5
Tools are no longer all sent as strict, so Anthropic no longer rejects
every turn with "compiled grammar is too large" (#13).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:40:36 -05:00
CircleCI d0ad2aa0fa Bump version to 0.1.0-RC.4 [skip ci] 2026-10-13 15:24:59 +00:00
james.maesandClaude Opus 5.5 16c8500f59 Merge develop into release/0.1 for 0.1.0-RC.4
App home, provider settings with Test connection, per-call usage and
model prices (#12).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:23:04 -05:00
CircleCI a8c5f586ee Bump version to 0.1.0-RC.3 [skip ci] 2026-10-12 21:22:35 +00:00
james.maesandClaude Opus 5.5 3dfa775b21 Merge develop into release/0.1 for 0.1.0-RC.3
Assistant Admin record screens (#6), deterministic RobustnessTest (#9)
and the GA-only tag filter (#8), on top of the snake_case rename (#3).
0.1.0-RC.2 on Central is an accidental republish of RC.1, so this
candidate is RC.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:20:10 -05:00
james.maesandClaude Opus 5.5 67f78fd660 ci: fix the GA tag filter YAML (no brackets in the flow sequence) [skip ci]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:01:54 -05:00
james.maesandClaude Opus 5.5 ff67c6f7cc Set version to 0.1.0-RC.2 and publish only GA tags [skip ci]
0.1.0-RC.2 is already on Maven Central (an RC tag build republished the previous code), so the next release-branch build must publish the following RC. RC tags no longer trigger a publish (/^v[0-9]+\.[0-9]+\.[0-9]+$/ only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:56:59 -05:00
james.maesandClaude Opus 5.5 19551ac2af Merge develop into release/0.1 for 0.1.0-RC.2
Brings the snake_case assistant_ table and key names (#3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:18:00 -05:00
james.maesandClaude Opus 5.5 7263ac627d Bump version to 0.1.0-RC.1 [skip ci]
The orb published 0.1.0-RC.1 but could not push this commit (the
CircleCI deploy key is read only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 12:49:33 -05:00
9 changed files with 15 additions and 348 deletions

No files matched your search

+2 -5
View File
@@ -666,11 +666,8 @@ See [UPGRADE.md](UPGRADE.md) for schema changes, plaintext migration, and key ha
## Data-driven budgets
Admins configure **Assistant > Budgets** for UTC DAY, WEEK (from Monday 00:00 UTC) or
MONTH allowances in USD or TOKENS, scoped to INSTANCE, USER, ROLE (a permission, each
holder counted separately), PROVIDER or MODEL. The rows are read at every question
and before every model call, so a changed limit applies at once. A cost limit above
`budgetCostLimitCeilingUsd` (default 1,000,000) is refused when saved. Provider
Admins configure **Assistant > Budgets** for UTC DAY or MONTH allowances in USD or
TOKENS, scoped to INSTANCE, USER, ROLE (a permission), PROVIDER or MODEL. Provider
and model scope values are registry record ids. Warnings default to 80%; at 100%
the default action is DOWNGRADE, and the hard ceiling defaults to 120% (always
STOP). Multiple budgets apply together and STOP wins.
+1 -1
View File
@@ -20,7 +20,7 @@
<!-- Multi-module build. The qqq-orb sets the revision here; the modules -->
<!-- inherit it, and the flatten plugin resolves it in the published POMs. -->
<properties>
<revision>0.4.0-SNAPSHOT</revision>
<revision>0.1.0-RC.27</revision>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -19,7 +19,6 @@ package com.kingsrook.qbits.assistant;
import javax.net.ssl.SSLContext;
import java.io.IOException;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
@@ -121,7 +120,6 @@ public class AssistantQBitConfig implements QBitConfig
private Integer toolResultRetentionDays = 30;
private Integer approvalRetentionDays = 365;
private Integer policyCacheSeconds = 30;
private BigDecimal budgetCostLimitCeilingUsd = new BigDecimal("1000000");
private String ownerSecurityKeyType = DEFAULT_OWNER_KEY_TYPE;
private String shortcut = DEFAULT_SHORTCUT;
private Set<String> allowedScheduledCredentialEnvNames = new LinkedHashSet<>();
@@ -288,10 +286,6 @@ public class AssistantQBitConfig implements QBitConfig
errors.add("customRedactionPatterns: not a valid regular expression: " + pattern);
}
}
if(budgetCostLimitCeilingUsd != null && budgetCostLimitCeilingUsd.signum() <= 0)
{
errors.add("budgetCostLimitCeilingUsd must be positive, or null for no ceiling");
}
if(policyCacheSeconds == null || policyCacheSeconds < 0)
{
errors.add("policyCacheSeconds must not be negative");
@@ -1139,40 +1133,6 @@ public class AssistantQBitConfig implements QBitConfig
/*******************************************************************************
** Getter for budgetCostLimitCeilingUsd
*******************************************************************************/
public BigDecimal getBudgetCostLimitCeilingUsd()
{
return (this.budgetCostLimitCeilingUsd);
}
/*******************************************************************************
** Setter for budgetCostLimitCeilingUsd
*******************************************************************************/
public void setBudgetCostLimitCeilingUsd(BigDecimal budgetCostLimitCeilingUsd)
{
this.budgetCostLimitCeilingUsd = budgetCostLimitCeilingUsd;
}
/*******************************************************************************
** The most US dollars an administrator may save as the limit of one cost
** budget (Assistant > Budgets), for one period. A larger number is refused
** when the budget is saved, so a slip of the keyboard cannot remove the
** limit in effect. Default 1,000,000; null removes the ceiling.
*******************************************************************************/
public AssistantQBitConfig withBudgetCostLimitCeilingUsd(BigDecimal budgetCostLimitCeilingUsd)
{
this.budgetCostLimitCeilingUsd = budgetCostLimitCeilingUsd;
return (this);
}
/*******************************************************************************
** Getter for policyCacheSeconds
*******************************************************************************/
@@ -32,39 +32,20 @@ import com.kingsrook.qqq.backend.core.model.actions.tables.query.QQueryFilter;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.Clock;
import java.time.DayOfWeek;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
/*******************************************************************************
** Data-driven budgets layered on the existing policy and provider caps.
** Evaluation occurs at dispatch boundaries, never during streaming tokens.
**
** The budget rows are read from their table at every evaluation and nothing
** of them is cached, so a limit an administrator changes applies to the next
** question and to the next model call of a running answer, with no restart.
**
** Periods are UTC: a DAY starts at 00:00 UTC, a WEEK on Monday at 00:00 UTC
** (the ISO week) and a MONTH on the first of the month at 00:00 UTC.
*******************************************************************************/
public class BudgetService
{
public static final String PERIOD_DAY = "DAY";
public static final String PERIOD_WEEK = "WEEK";
public static final String PERIOD_MONTH = "MONTH";
public static final List<String> PERIODS = List.of(PERIOD_DAY, PERIOD_WEEK, PERIOD_MONTH);
private static final DateTimeFormatter RESET_DAY = DateTimeFormatter.ofPattern("EEEE d MMMM uuuu", Locale.ENGLISH);
private final AssistantStore store;
private final ProviderService providers;
private final Clock clock;
@@ -157,12 +138,12 @@ public class BudgetService
}
if("STOPPED".equals(state))
{
message = stoppedMessage(snapshot);
message = "Assistant budget '" + budget.getName() + "' has been reached. Ask an administrator for an override.";
}
if("WARNED".equals(state))
{
message = "You have used " + snapshot.percent().setScale(0, RoundingMode.DOWN) + "% of the "
+ periodWord(budget.getPeriod()) + " assistant budget '" + budget.getName() + "'.";
+ ("DAY".equals(budget.getPeriod()) ? "daily" : "monthly") + " assistant budget '" + budget.getName() + "'.";
}
if("STOPPED".equals(state))
{
@@ -241,83 +222,6 @@ public class BudgetService
/*******************************************************************************
** The first instant of the period that holds `now`: 00:00 UTC of the day, of
** the Monday of the week (ISO week) or of the first of the month.
*******************************************************************************/
public static Instant periodStart(String period, Instant now)
{
LocalDate day = LocalDate.ofInstant(now, ZoneOffset.UTC);
LocalDate start = switch(String.valueOf(period))
{
case PERIOD_MONTH -> day.withDayOfMonth(1);
case PERIOD_WEEK -> day.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
default -> day;
};
return (start.atStartOfDay().toInstant(ZoneOffset.UTC));
}
/*******************************************************************************
** The first instant after the period that starts at `start`, which is when
** its count starts again at zero.
*******************************************************************************/
public static Instant periodEnd(String period, Instant start)
{
LocalDate day = LocalDate.ofInstant(start, ZoneOffset.UTC);
LocalDate end = switch(String.valueOf(period))
{
case PERIOD_MONTH -> day.plusMonths(1);
case PERIOD_WEEK -> day.plusWeeks(1);
default -> day.plusDays(1);
};
return (end.atStartOfDay().toInstant(ZoneOffset.UTC));
}
/*******************************************************************************
** "daily", "weekly" or "monthly".
*******************************************************************************/
public static String periodWord(String period)
{
return (switch(String.valueOf(period))
{
case PERIOD_MONTH -> "monthly";
case PERIOD_WEEK -> "weekly";
default -> "daily";
});
}
/*******************************************************************************
** A limit as a person reads it: US dollars with cents, or whole tokens.
*******************************************************************************/
public static String amount(AssistantBudget budget, BigDecimal value)
{
return ("COST_USD".equals(budget.getMetric()) ? "$" + String.format(Locale.ENGLISH, "%,.2f", value.setScale(2, RoundingMode.HALF_UP))
: String.format(Locale.ENGLISH, "%,d", value.toBigInteger()) + " tokens");
}
/*******************************************************************************
** What a person is told when a budget refuses: which limit, how much it is,
** when its count starts again, and who can change it.
*******************************************************************************/
static String stoppedMessage(Snapshot snapshot)
{
AssistantBudget budget = snapshot.budget();
Instant end = periodEnd(budget.getPeriod(), snapshot.periodStart());
return ("The assistant has reached the " + periodWord(budget.getPeriod()) + " limit" + (snapshot.limit() == null ? "" : " of " + amount(budget, snapshot.limit()))
+ " of the budget '" + budget.getName() + "'. It starts again on " + RESET_DAY.format(LocalDate.ofInstant(end, ZoneOffset.UTC))
+ " at 00:00 UTC. An administrator can raise the limit or grant an override.");
}
/*******************************************************************************
** UTC period, usage, active overrides and effective state, without events.
** ROLE allowances are per permission holder, evaluated with their session.
@@ -326,8 +230,10 @@ public class BudgetService
{
userId = "USER".equals(budget.getScopeType()) ? budget.getScopeValue() : userId;
Instant now = clock.instant();
Instant from = periodStart(budget.getPeriod(), now);
Instant until = periodEnd(budget.getPeriod(), from);
LocalDate day = LocalDate.ofInstant(now, ZoneOffset.UTC);
LocalDate start = "MONTH".equals(budget.getPeriod()) ? day.withDayOfMonth(1) : day;
Instant from = start.atStartOfDay().toInstant(ZoneOffset.UTC);
Instant until = ("MONTH".equals(budget.getPeriod()) ? start.plusMonths(1) : start.plusDays(1)).atStartOfDay().toInstant(ZoneOffset.UTC);
String scopeKey = budget.getScopeType() + ":" + ("ROLE".equals(budget.getScopeType()) ? budget.getScopeValue() + ":" + userId : Objects.toString(budget.getScopeValue(), ""));
boolean shared = List.of("INSTANCE", "PROVIDER", "MODEL").contains(budget.getScopeType());
String dateField = shared ? "occurredAt" : "createDate";
@@ -686,7 +686,7 @@ public final class AssistantHomeView
AssistantBudget budget = snapshot.budget();
html.append("<div style=\"").append(ROW).append("\"><strong>")
.append(recordLink(prefix, AssistantBudget.TABLE_NAME, budget.getId(), budget.getName())).append("</strong>");
html.append("<p>").append(esc(snapshot.scopeKey() + " · " + budget.getPeriod() + ("WEEK".equals(budget.getPeriod()) ? " (UTC, from Monday) · " : " (UTC) · ") + budget.getMetric())).append("</p>");
html.append("<p>").append(esc(snapshot.scopeKey() + " · " + budget.getPeriod() + " (UTC) · " + budget.getMetric())).append("</p>");
html.append("<p>").append(esc(snapshot.used().stripTrailingZeros().toPlainString() + " / "
+ (snapshot.limit() == null ? "Unlimited" : snapshot.limit().stripTrailingZeros().toPlainString()) + " · " + snapshot.state())).append("</p>");
bar(html, snapshot.percent().doubleValue(), snapshot.percent().intValue() >= 100 ? RED
@@ -20,7 +20,6 @@ package com.kingsrook.qbits.assistant.metadata;
import com.kingsrook.qbits.assistant.AssistantQBitConfig;
import com.kingsrook.qbits.assistant.AssistantRuntime;
import com.kingsrook.qbits.assistant.AssistantSecurity;
import com.kingsrook.qbits.assistant.engine.BudgetService;
import com.kingsrook.qbits.assistant.model.AssistantBudget;
import com.kingsrook.qbits.assistant.model.AssistantBudgetOverride;
import com.kingsrook.qqq.backend.core.actions.customizers.TableCustomizerInterface;
@@ -40,9 +39,6 @@ import java.util.Optional;
/*******************************************************************************
** Validates budgets and attributes admin overrides to the current session.
** Both are saved only by a session that holds assistant.admin: the tables'
** permission rules refuse anybody else at the door, and this refuses a save
** that reaches the table some other way.
*******************************************************************************/
public class AssistantBudgetCustomizer implements TableCustomizerInterface
{
@@ -77,10 +73,6 @@ public class AssistantBudgetCustomizer implements TableCustomizerInterface
*******************************************************************************/
private static void checkBudget(QRecord record, QRecord merged) throws QException
{
if(!QContext.getQSession().hasPermission(AssistantQBitConfig.ADMIN_PERMISSION))
{
error(record, "Only assistant.admin may create or change budgets.");
}
defaults(record, merged, "enabled", true);
defaults(record, merged, "warnPercent", 80);
defaults(record, merged, "hardCeilingPercent", 120);
@@ -88,7 +80,7 @@ public class AssistantBudgetCustomizer implements TableCustomizerInterface
String scope = merged.getValueString("scopeType");
String value = merged.getValueString("scopeValue");
choice(record, merged, "scopeType", List.of("INSTANCE", "USER", "ROLE", "PROVIDER", "MODEL"));
choice(record, merged, "period", BudgetService.PERIODS);
choice(record, merged, "period", List.of("DAY", "MONTH"));
choice(record, merged, "metric", List.of("COST_USD", "TOKENS"));
choice(record, merged, "atLimitAction", List.of("DOWNGRADE", "STOP"));
if("INSTANCE".equals(scope) ? value != null && !value.isBlank() : value == null || value.isBlank())
@@ -122,11 +114,6 @@ public class AssistantBudgetCustomizer implements TableCustomizerInterface
{
error(record, "Limit must be positive; token limits must be whole numbers.");
}
BigDecimal ceiling = runtime.getConfig().getBudgetCostLimitCeilingUsd();
if(limit != null && ceiling != null && "COST_USD".equals(merged.getValueString("metric")) && limit.compareTo(ceiling) > 0)
{
error(record, "A cost limit must not be more than " + ceiling.stripTrailingZeros().toPlainString() + " US dollars for one period.");
}
int warn = merged.getValueInteger("warnPercent");
if(warn < 0 || warn >= 100 || merged.getValueInteger("hardCeilingPercent") < 100)
{
@@ -141,7 +141,7 @@ public final class AssistantRecordScreens
QPossibleValueSource.newForTable(AssistantModel.TABLE_NAME).withName("assistant_registry_model"),
QPossibleValueSource.newForTable(AssistantModel.TABLE_NAME).withName("assistant_budget_model"),
budgetEnum("scopeType", "INSTANCE", "USER", "ROLE", "PROVIDER", "MODEL"),
budgetEnum("period", "DAY", "WEEK", "MONTH"),
budgetEnum("period", "DAY", "MONTH"),
budgetEnum("metric", "COST_USD", "TOKENS"),
budgetEnum("atLimitAction", "DOWNGRADE", "STOP"),
new QPossibleValueSource().withName(EFFORT_PVS_NAME).withType(QPossibleValueSourceType.ENUM)
@@ -1015,7 +1015,7 @@ public final class AssistantRecordScreens
}
table.getField("downgradeModelId").withPossibleValueSourceName("assistant_budget_model");
help(table, "scopeValue", "Empty for INSTANCE; user id, permission name, provider row id or model registry row id for the selected scope.");
help(table, "limitValue", "USD for COST_USD, or whole tokens for TOKENS. Periods use UTC; a week starts on Monday.");
help(table, "limitValue", "USD for COST_USD, or whole tokens for TOKENS. Periods use UTC.");
help(table, "downgradeModelId", "Empty chooses the cheapest enabled eligible model, preferring LOCAL providers.");
sections(table,
section("budget", "Budget", "savings", Tier.T1, "id", "name", "enabled", "scopeType", "scopeValue", "period", "metric", "limitValue"),
@@ -1194,7 +1194,7 @@ entries:
- key: table:assistant_budget;field:period
summary: How long the count runs before it starts again at zero, in UTC.
content: |
**DAY** starts at midnight UTC. **WEEK** starts at midnight UTC on Monday. **MONTH** starts at midnight UTC on the first of the month. UTC may differ from your local calendar day.
**DAY** starts at midnight UTC. **MONTH** starts at midnight UTC on the first of the month. UTC may differ from your local calendar day.
- key: table:assistant_budget;field:notes
summary: Optional note about why the budget exists, up to {{maxLength:assistant_budget.notes}} characters.
- key: table:assistant_budget;field:hardCeilingPercent
@@ -1222,7 +1222,7 @@ entries:
- key: table:assistant_budget;field:limitValue
summary: 'The size of the limit: US dollars for cost budgets, whole tokens for token budgets.'
content: |
Must be greater than zero. A cost limit above the largest amount this site allows for one period is refused when you save. Overrides add to this number. A change applies to the next question; nothing needs restarting.
Must be greater than zero. Overrides add to this number.
- key: table:assistant_budget_override;slot:help
summary: A temporary extra allowance or lifted limit on one budget, granted by an assistant admin.
content: |
@@ -46,12 +46,8 @@ import com.kingsrook.qqq.backend.core.alerts.AlertSeverity;
import com.kingsrook.qqq.backend.core.alerts.AlertSignal;
import com.kingsrook.qqq.backend.core.alerts.AlertsInstanceMetaData;
import com.kingsrook.qqq.backend.core.alerts.LoggingAlertSink;
import com.kingsrook.qqq.backend.core.actions.permissions.PermissionsHelper;
import com.kingsrook.qqq.backend.core.actions.permissions.TablePermissionSubType;
import com.kingsrook.qqq.backend.core.context.QContext;
import com.kingsrook.qqq.backend.core.exceptions.QPermissionDeniedException;
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QQueryFilter;
import com.kingsrook.qqq.backend.core.model.actions.tables.update.UpdateInput;
import com.kingsrook.qqq.backend.core.model.data.QRecord;
import com.kingsrook.qqq.backend.core.model.metadata.code.InitializableViaCodeReference;
import com.kingsrook.qqq.backend.core.model.metadata.code.QCodeReference;
@@ -342,185 +338,6 @@ class BudgetServiceTest extends BaseAssistantTest
/*******************************************************************************
** Everyone's weekly spending limit, 500 US dollars, refusing at the limit.
*******************************************************************************/
private AssistantBudget weekly() throws Exception
{
return (store().insert(new AssistantBudget().withName("Everyone, a week").withScopeType("INSTANCE").withPeriod("WEEK")
.withMetric("COST_USD").withLimitValue(BigDecimal.valueOf(500)).withAtLimitAction("STOP").withHardCeilingPercent(100)));
}
/*******************************************************************************
** The evaluator at a given instant.
*******************************************************************************/
private BudgetService serviceAt(String instant)
{
return (new BudgetService(store(), config.getRuntime().getProviderService(), Clock.fixed(Instant.parse(instant), ZoneOffset.UTC)));
}
/*******************************************************************************
** A week is the ISO week in UTC: Monday 00:00:00 UTC up to the next Monday
** 00:00:00 UTC. NOW is Tuesday 2026-10-13, so its week starts on Monday
** 2026-10-12. The last second of Sunday belongs to the week before; the
** first instant of the next Monday belongs to the week after.
*******************************************************************************/
@Test
void weekRunsFromMondayToMondayInUtc() throws Exception
{
AssistantBudget budget = weekly();
usage(1_000_000, Instant.parse("2026-10-11T23:59:59Z"));
usage(20_000_000, Instant.parse("2026-10-12T00:00:00Z"));
usage(300_000_000, Instant.parse("2026-10-18T23:59:59Z"));
usage(4_000_000_000L, Instant.parse("2026-10-19T00:00:00Z"));
BudgetService.Snapshot week = service(new ArrayList<>()).snapshot(budget, USER);
assertThat(week.periodStart()).isEqualTo(Instant.parse("2026-10-12T00:00:00Z"));
assertThat(BudgetService.periodEnd("WEEK", week.periodStart())).isEqualTo(Instant.parse("2026-10-19T00:00:00Z"));
assertThat(week.used()).as("Monday 00:00:00 through Sunday 23:59:59 UTC").isEqualByComparingTo("320");
assertThat(serviceAt("2026-10-11T23:59:59Z").snapshot(budget, USER).used()).as("the week before").isEqualByComparingTo("1");
assertThat(serviceAt("2026-10-18T23:59:59Z").snapshot(budget, USER).periodStart()).isEqualTo(Instant.parse("2026-10-12T00:00:00Z"));
BudgetService.Snapshot next = serviceAt("2026-10-19T00:00:00Z").snapshot(budget, USER);
assertThat(next.periodStart()).as("the count starts again on Monday at 00:00 UTC").isEqualTo(Instant.parse("2026-10-19T00:00:00Z"));
assertThat(next.used()).isEqualByComparingTo("4000");
// Sunday 21:00 in Chicago is already Monday in UTC: the week is UTC's, not the reader's
assertThat(BudgetService.periodStart("WEEK", Instant.parse("2026-10-19T02:00:00Z"))).isEqualTo(Instant.parse("2026-10-19T00:00:00Z"));
assertThat(BudgetService.periodStart("WEEK", Instant.parse("2026-12-31T12:00:00Z"))).as("a week spans the turn of a month and a year")
.isEqualTo(Instant.parse("2026-12-28T00:00:00Z"));
assertThat(BudgetService.periodEnd("WEEK", Instant.parse("2026-12-28T00:00:00Z"))).isEqualTo(Instant.parse("2027-01-04T00:00:00Z"));
assertThat(BudgetService.periodStart("DAY", NOW)).isEqualTo(Instant.parse("2026-10-13T00:00:00Z"));
assertThat(BudgetService.periodStart("MONTH", NOW)).isEqualTo(Instant.parse("2026-10-01T00:00:00Z"));
assertThat(BudgetService.periodEnd("MONTH", Instant.parse("2026-10-01T00:00:00Z"))).isEqualTo(Instant.parse("2026-11-01T00:00:00Z"));
}
/*******************************************************************************
** Cost is counted in micro-USD, millionths of a dollar, and a limit is in
** dollars: 499,999,999 micros are 499.999999 dollars, below a 500 dollar
** limit; one micro more is the limit. At the limit the refusal says which
** limit, how much, when it starts again and who can change it; a week later
** nothing is refused.
*******************************************************************************/
@Test
void weeklyLimitRefusesAtFiveHundredDollarsAndStartsAgainOnMonday() throws Exception
{
AssistantBudget budget = weekly();
usage(499_999_999L, NOW);
BudgetService service = service(new ArrayList<>());
BudgetService.Snapshot below = service.snapshot(budget, USER);
assertThat(below.used()).isEqualByComparingTo("499.999999");
assertThat(below.state()).as("above the 80 percent warning, below the limit").isEqualTo("WARNED");
BudgetService.Decision warned = service.evaluate(USER, null, false, false);
assertThat(warned.stopped()).isFalse();
assertThat(warned.notices()).containsExactly("You have used 99% of the weekly assistant budget 'Everyone, a week'.");
usage(1L, NOW);
assertThat(service.snapshot(budget, USER).used()).isEqualByComparingTo("500");
BudgetService.Decision stopped = service.evaluate(USER, null, false, false);
assertThat(stopped.stopped()).isTrue();
assertThat(stopped.reason()).isEqualTo("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.");
assertThat(serviceAt("2026-10-19T00:00:00Z").evaluate(USER, null, false, false).stopped()).as("the next week").isFalse();
assertThat(BudgetService.amount(budget, new BigDecimal("1234.5"))).isEqualTo("$1,234.50");
assertThat(BudgetService.amount(new AssistantBudget().withMetric("TOKENS"), new BigDecimal("1500000"))).isEqualTo("1,500,000 tokens");
}
/*******************************************************************************
** A person who asks at the limit is refused before any model call: HTTP 429,
** code BUDGET, and the sentence.
*******************************************************************************/
@Test
void aQuestionAtTheWeeklyLimitIsRefusedWithTheReason() throws Exception
{
weekly();
usage(500_000_000L, Instant.now());
assertThatThrownBy(() -> runner.run(USER, "Hello")).isInstanceOf(AssistantApiException.class)
.hasMessageStartingWith("The assistant has reached the weekly limit of $500.00 of the budget 'Everyone, a week'. It starts again on Monday ")
.hasMessageEndingWith(" at 00:00 UTC. An administrator can raise the limit or grant an override.").satisfies(e ->
{
assertThat(((AssistantApiException) e).getStatus()).isEqualTo(429);
assertThat(((AssistantApiException) e).getCode()).isEqualTo("BUDGET");
});
}
/*******************************************************************************
** The limit is read from its row at every evaluation: an administrator's
** change applies to the next one, on the same running service.
*******************************************************************************/
@Test
void aChangedLimitAppliesToTheNextEvaluation() throws Exception
{
AssistantBudget budget = weekly();
usage(500_000_000L, NOW);
BudgetService service = service(new ArrayList<>());
assertThat(service.evaluate(USER, null, false, false).stopped()).isTrue();
store().updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("limitValue", BigDecimal.valueOf(1000)));
BudgetService.Decision raised = service.evaluate(USER, null, false, false);
assertThat(raised.stopped()).as("raised to 1,000: 500 spent is half").isFalse();
assertThat(raised.notices()).isEmpty();
store().updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("limitValue", BigDecimal.valueOf(100)));
assertThat(service.evaluate(USER, null, false, false).reason()).as("lowered to 100").contains("weekly limit of $100.00");
store().updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("enabled", false));
assertThat(service.evaluate(USER, null, false, false).stopped()).as("turned off").isFalse();
}
/*******************************************************************************
** A budget is saved only by an administrator and only with a sane limit: a
** known period, a positive number, and a cost limit no larger than the
** ceiling the host configured.
*******************************************************************************/
@Test
void onlyAnAdministratorSavesABudgetAndOnlyASaneOne() throws Exception
{
AssistantBudget budget = weekly();
assertThatThrownBy(() -> store().updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("period", "FORTNIGHT")))
.hasMessageContaining("Invalid period");
assertThatThrownBy(() -> store().updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("limitValue", BigDecimal.ZERO)))
.hasMessageContaining("Limit must be positive");
assertThatThrownBy(() -> store().updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("limitValue", new BigDecimal("-5"))))
.hasMessageContaining("Limit must be positive");
assertThatThrownBy(() -> store().updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("limitValue", new BigDecimal("1000000.01"))))
.hasMessageContaining("must not be more than 1000000 US dollars");
config.setBudgetCostLimitCeilingUsd(new BigDecimal("10000"));
assertThatThrownBy(() -> store().updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("limitValue", new BigDecimal("50000"))))
.hasMessageContaining("must not be more than 10000 US dollars");
store().updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("limitValue", new BigDecimal("10000")));
assertThat(store().budget(budget.getId()).getLimitValue()).isEqualByComparingTo("10000");
AssistantBudget tokens = store().insert(new AssistantBudget().withName("Tokens").withScopeType("INSTANCE").withPeriod("WEEK")
.withMetric("TOKENS").withLimitValue(new BigDecimal("5000000000")));
assertThat(tokens.getId()).as("the dollar ceiling does not apply to a token limit").isNotNull();
AssistantStore store = store();
QContext.init(qInstance, AssistantTestFixture.ownerSession(USER, config));
assertThatThrownBy(() -> PermissionsHelper.checkTablePermissionThrowing(new UpdateInput(AssistantBudget.TABLE_NAME), TablePermissionSubType.EDIT))
.as("the table refuses a person without assistant.admin").isInstanceOf(QPermissionDeniedException.class);
assertThatThrownBy(() -> store.updateFields(AssistantBudget.TABLE_NAME, new QRecord().withValue("id", budget.getId()).withValue("limitValue", new BigDecimal("9000"))))
.hasMessageContaining("assistant.admin");
assertThatThrownBy(() -> store.insert(new AssistantBudget().withName("Mine").withScopeType("INSTANCE").withPeriod("WEEK")
.withMetric("COST_USD").withLimitValue(BigDecimal.TEN))).hasMessageContaining("assistant.admin");
QContext.init(qInstance, AssistantTestFixture.ownerSession("admin-budget", config));
assertThat(store.budget(budget.getId()).getLimitValue()).as("the limit is as the administrator left it").isEqualByComparingTo("10000");
}
/*******************************************************************************
** A stop dominates a warning or downgrade in another applicable budget.
*******************************************************************************/