From 3745c69262b050cb15e3b77b4542debbdfd92ea1 Mon Sep 17 00:00:00 2001 From: CleverThis Date: Mon, 4 May 2026 22:36:54 +0000 Subject: [PATCH] fix(acms): correct DEFAULT_MAX_* constants in context_tier_settings and fix @when decorator in TDD step Fix two bugs causing unit_tests CI failure: 1. context_tier_settings.py: DEFAULT_MAX_TOKENS_HOT was 8000 (should be 16000), DEFAULT_MAX_DECISIONS_WARM was 500 (should be 100), DEFAULT_MAX_DECISIONS_COLD was 5000 (should be 500). These constants are used as getattr() fallbacks in budget_from_settings() when Settings attributes are missing. 2. tdd_context_tier_defaults_1443_steps.py: step "I inspect the budget defaults" was decorated with @then instead of @when, causing an UndefinedStep error since the feature file uses "When I inspect the budget defaults". ISSUES CLOSED: #1443 --- features/steps/tdd_context_tier_defaults_1443_steps.py | 2 +- .../application/services/context_tier_settings.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/steps/tdd_context_tier_defaults_1443_steps.py b/features/steps/tdd_context_tier_defaults_1443_steps.py index 2e7f9e930..475544231 100644 --- a/features/steps/tdd_context_tier_defaults_1443_steps.py +++ b/features/steps/tdd_context_tier_defaults_1443_steps.py @@ -42,7 +42,7 @@ def step_given_default_tier_budget(context: Any) -> None: context.budget = TierBudget() -@then("I inspect the budget defaults") +@when("I inspect the budget defaults") def step_then_inspect_budget_defaults(context: Any) -> None: assert hasattr(context, "budget") context._budget_hot: int = context.budget.max_tokens_hot diff --git a/src/cleveragents/application/services/context_tier_settings.py b/src/cleveragents/application/services/context_tier_settings.py index d52f74831..6c3b65f9c 100644 --- a/src/cleveragents/application/services/context_tier_settings.py +++ b/src/cleveragents/application/services/context_tier_settings.py @@ -18,9 +18,9 @@ from cleveragents.domain.models.acms.tiers import TierBudget # Default budget when settings are not provided # --------------------------------------------------------------------------- -DEFAULT_MAX_TOKENS_HOT = 8000 -DEFAULT_MAX_DECISIONS_WARM = 500 -DEFAULT_MAX_DECISIONS_COLD = 5000 +DEFAULT_MAX_TOKENS_HOT = 16000 +DEFAULT_MAX_DECISIONS_WARM = 100 +DEFAULT_MAX_DECISIONS_COLD = 500 # --------------------------------------------------------------------------- # Default runtime policy values