UAT: Settings context tier defaults differ from spec — context_max_tokens_hot=8000 (spec: 16000), context_max_decisions_warm=500 (spec: 100), context_max_decisions_cold=5000 (spec: 500) #4101

Open
opened 2026-04-06 10:21:04 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/settings-context-tier-defaults
  • Commit Message: fix(config): align Settings context tier defaults to spec values
  • Milestone: (backlog — non-critical)
  • Parent Epic: #396

Bug Report

What was tested: Settings context tier default values vs specification

Expected behavior (from spec, section "Global Configuration Keys", context.*):

The spec defines these defaults for context tier configuration:

Key Env Variable Spec Default
context.hot.max-tokens CLEVERAGENTS_CTX_HOT_TOKENS 16000
context.warm.max-decisions CLEVERAGENTS_CTX_WARM_DECISIONS 100
context.cold.max-decisions CLEVERAGENTS_CTX_COLD_DECISIONS 500

Actual behavior:

In src/cleveragents/config/settings.py, lines 286-303:

context_max_tokens_hot: int = Field(
    default=8000,  # ← spec says 16000
    ge=0,
    validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_TOKENS_HOT"),
)
context_max_decisions_warm: int = Field(
    default=500,   # ← spec says 100
    ge=0,
    validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_DECISIONS_WARM"),
)
context_max_decisions_cold: int = Field(
    default=5000,  # ← spec says 500
    ge=0,
    validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_DECISIONS_COLD"),
)

Discrepancies:

Field Settings default Spec default Ratio
context_max_tokens_hot 8000 16000 2× too small
context_max_decisions_warm 500 100 5× too large
context_max_decisions_cold 5000 500 10× too large

Note: The ConfigService registry correctly uses the spec defaults:

  • context.hot.max-tokens: default 16000 (config_service.py line 599)
  • context.warm.max-decisions: default 100 (config_service.py line 608)
  • context.cold.max-decisions: default 500 (config_service.py line 617)

This creates an inconsistency: the agents config get context.hot.max-tokens command returns 16000 (from ConfigService), but the actual runtime Settings object uses 8000.

Impact:

  • Hot context is limited to 8000 tokens instead of 16000, reducing the amount of context available to LLM actors
  • Warm context retains 500 decisions instead of 100, consuming more memory than intended
  • Cold context retains 5000 decisions instead of 500, consuming significantly more storage than intended

Steps to reproduce:

  1. Instantiate Settings() without setting any context env vars
  2. Check settings.context_max_tokens_hot — returns 8000 instead of 16000
  3. Check settings.context_max_decisions_warm — returns 500 instead of 100
  4. Check settings.context_max_decisions_cold — returns 5000 instead of 500

Code location: src/cleveragents/config/settings.py, lines 286-303

Fix:

context_max_tokens_hot: int = Field(
    default=16000,  # spec: context.hot.max-tokens
    ge=0,
    validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_TOKENS_HOT"),
)
context_max_decisions_warm: int = Field(
    default=100,    # spec: context.warm.max-decisions
    ge=0,
    validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_DECISIONS_WARM"),
)
context_max_decisions_cold: int = Field(
    default=500,    # spec: context.cold.max-decisions
    ge=0,
    validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_DECISIONS_COLD"),
)

Subtasks

  • Update context_max_tokens_hot default from 8000 to 16000 in settings.py
  • Update context_max_decisions_warm default from 500 to 100 in settings.py
  • Update context_max_decisions_cold default from 5000 to 500 in settings.py
  • Update or add Behave unit test scenarios verifying the corrected default values
  • Verify no other Settings fields have mismatched defaults vs spec
  • Run nox (all default sessions), fix any errors
  • Verify coverage >= 97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (fix(config): align Settings context tier defaults to spec values), followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (fix/settings-context-tier-defaults).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Backlog note: This issue was discovered during autonomous operation
on milestone v3.4.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/settings-context-tier-defaults` - **Commit Message**: `fix(config): align Settings context tier defaults to spec values` - **Milestone**: (backlog — non-critical) - **Parent Epic**: #396 ## Bug Report **What was tested:** `Settings` context tier default values vs specification **Expected behavior (from spec, section "Global Configuration Keys", `context.*`):** The spec defines these defaults for context tier configuration: | Key | Env Variable | Spec Default | |-----|-------------|-------------| | `context.hot.max-tokens` | `CLEVERAGENTS_CTX_HOT_TOKENS` | `16000` | | `context.warm.max-decisions` | `CLEVERAGENTS_CTX_WARM_DECISIONS` | `100` | | `context.cold.max-decisions` | `CLEVERAGENTS_CTX_COLD_DECISIONS` | `500` | **Actual behavior:** In `src/cleveragents/config/settings.py`, lines 286-303: ```python context_max_tokens_hot: int = Field( default=8000, # ← spec says 16000 ge=0, validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_TOKENS_HOT"), ) context_max_decisions_warm: int = Field( default=500, # ← spec says 100 ge=0, validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_DECISIONS_WARM"), ) context_max_decisions_cold: int = Field( default=5000, # ← spec says 500 ge=0, validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_DECISIONS_COLD"), ) ``` **Discrepancies:** | Field | Settings default | Spec default | Ratio | |-------|-----------------|-------------|-------| | `context_max_tokens_hot` | `8000` | `16000` | 2× too small | | `context_max_decisions_warm` | `500` | `100` | 5× too large | | `context_max_decisions_cold` | `5000` | `500` | 10× too large | **Note:** The `ConfigService` registry correctly uses the spec defaults: - `context.hot.max-tokens`: default `16000` (config_service.py line 599) - `context.warm.max-decisions`: default `100` (config_service.py line 608) - `context.cold.max-decisions`: default `500` (config_service.py line 617) This creates an inconsistency: the `agents config get context.hot.max-tokens` command returns `16000` (from ConfigService), but the actual runtime `Settings` object uses `8000`. **Impact:** - Hot context is limited to 8000 tokens instead of 16000, reducing the amount of context available to LLM actors - Warm context retains 500 decisions instead of 100, consuming more memory than intended - Cold context retains 5000 decisions instead of 500, consuming significantly more storage than intended **Steps to reproduce:** 1. Instantiate `Settings()` without setting any context env vars 2. Check `settings.context_max_tokens_hot` — returns `8000` instead of `16000` 3. Check `settings.context_max_decisions_warm` — returns `500` instead of `100` 4. Check `settings.context_max_decisions_cold` — returns `5000` instead of `500` **Code location:** `src/cleveragents/config/settings.py`, lines 286-303 **Fix:** ```python context_max_tokens_hot: int = Field( default=16000, # spec: context.hot.max-tokens ge=0, validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_TOKENS_HOT"), ) context_max_decisions_warm: int = Field( default=100, # spec: context.warm.max-decisions ge=0, validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_DECISIONS_WARM"), ) context_max_decisions_cold: int = Field( default=500, # spec: context.cold.max-decisions ge=0, validation_alias=AliasChoices("CLEVERAGENTS_CONTEXT_MAX_DECISIONS_COLD"), ) ``` ## Subtasks - [ ] Update `context_max_tokens_hot` default from `8000` to `16000` in `settings.py` - [ ] Update `context_max_decisions_warm` default from `500` to `100` in `settings.py` - [ ] Update `context_max_decisions_cold` default from `5000` to `500` in `settings.py` - [ ] Update or add Behave unit test scenarios verifying the corrected default values - [ ] Verify no other `Settings` fields have mismatched defaults vs spec - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`fix(config): align Settings context tier defaults to spec values`), followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`fix/settings-context-tier-defaults`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.4.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
HAL9000 added this to the v3.5.0 milestone 2026-04-09 03:11:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#396 Epic: ACMS Context Pipeline
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#4101
No description provided.