UAT: Settings class missing context_tier_cold_ttl_days field — CLEVERAGENTS_CTX_COLD_DAYS env var not wired to ContextTierService #6029

Open
opened 2026-04-09 13:52:13 +00:00 by HAL9000 · 3 comments
Owner

Summary

The Settings class has context_tier_hot_ttl_hours and context_tier_warm_ttl_hours fields but is missing the corresponding context_tier_cold_ttl_days field. The spec-required CLEVERAGENTS_CTX_COLD_DAYS environment variable is registered in ConfigService but has no corresponding Settings field, so ContextTierService cannot read the cold-tier retention policy from configuration.

Expected Behavior (per spec)

From docs/specification.md line 30776:

| `context.tiers.cold.retention-days` | integer | `90` | `CLEVERAGENTS_CTX_COLD_DAYS` | Number of days cold-tier context entries are retained before archival/expiry. |

The Settings class should have:

context_tier_cold_ttl_days: int = Field(
    default=90,
    ge=1,
    validation_alias=AliasChoices(
        "CLEVERAGENTS_CONTEXT_TIER_COLD_TTL_DAYS",
        "CLEVERAGENTS_CTX_COLD_DAYS",
    ),
    description="Days without access before cold fragment is archived/expired.",
)

Actual Behavior

In src/cleveragents/config/settings.py:

  • context_tier_hot_ttl_hours ✓ (with CLEVERAGENTS_CTX_HOT_HOURS alias)
  • context_tier_warm_ttl_hours ✓ (with CLEVERAGENTS_CTX_WARM_HOURS alias)
  • context_tier_cold_ttl_daysMISSING

The ConfigService catalog at line 791 registers context.tiers.cold.retention-days with env_var="CLEVERAGENTS_CTX_COLD_DAYS", but this is never read by ContextTierService because there is no corresponding Settings field.

Code Location

  • src/cleveragents/config/settings.py — missing context_tier_cold_ttl_days field (compare with lines 350-368 for hot/warm TTL fields)
  • src/cleveragents/application/services/context_tiers.py_cold_ttl_from_settings() helper function does not exist
  • src/cleveragents/application/services/config_service.py line 791 — context.tiers.cold.retention-days registered but not wired

Fix Required

  1. Add context_tier_cold_ttl_days: int to Settings with CLEVERAGENTS_CTX_COLD_DAYS alias (default: 90)
  2. Add _cold_ttl_from_settings() helper to context_tiers.py
  3. Wire _cold_ttl into ContextTierService.__init__()

Spec References

  • docs/specification.md line 30776: context.tiers.cold.retention-days config key
  • v3.4.0 acceptance criterion #7: Hot/warm/cold tier management functional

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Summary The `Settings` class has `context_tier_hot_ttl_hours` and `context_tier_warm_ttl_hours` fields but is **missing** the corresponding `context_tier_cold_ttl_days` field. The spec-required `CLEVERAGENTS_CTX_COLD_DAYS` environment variable is registered in `ConfigService` but has no corresponding `Settings` field, so `ContextTierService` cannot read the cold-tier retention policy from configuration. ## Expected Behavior (per spec) From `docs/specification.md` line 30776: ``` | `context.tiers.cold.retention-days` | integer | `90` | `CLEVERAGENTS_CTX_COLD_DAYS` | Number of days cold-tier context entries are retained before archival/expiry. | ``` The `Settings` class should have: ```python context_tier_cold_ttl_days: int = Field( default=90, ge=1, validation_alias=AliasChoices( "CLEVERAGENTS_CONTEXT_TIER_COLD_TTL_DAYS", "CLEVERAGENTS_CTX_COLD_DAYS", ), description="Days without access before cold fragment is archived/expired.", ) ``` ## Actual Behavior In `src/cleveragents/config/settings.py`: - `context_tier_hot_ttl_hours` ✓ (with `CLEVERAGENTS_CTX_HOT_HOURS` alias) - `context_tier_warm_ttl_hours` ✓ (with `CLEVERAGENTS_CTX_WARM_HOURS` alias) - `context_tier_cold_ttl_days` ✗ **MISSING** The `ConfigService` catalog at line 791 registers `context.tiers.cold.retention-days` with `env_var="CLEVERAGENTS_CTX_COLD_DAYS"`, but this is never read by `ContextTierService` because there is no corresponding `Settings` field. ## Code Location - `src/cleveragents/config/settings.py` — missing `context_tier_cold_ttl_days` field (compare with lines 350-368 for hot/warm TTL fields) - `src/cleveragents/application/services/context_tiers.py` — `_cold_ttl_from_settings()` helper function does not exist - `src/cleveragents/application/services/config_service.py` line 791 — `context.tiers.cold.retention-days` registered but not wired ## Fix Required 1. Add `context_tier_cold_ttl_days: int` to `Settings` with `CLEVERAGENTS_CTX_COLD_DAYS` alias (default: 90) 2. Add `_cold_ttl_from_settings()` helper to `context_tiers.py` 3. Wire `_cold_ttl` into `ContextTierService.__init__()` ## Spec References - `docs/specification.md` line 30776: `context.tiers.cold.retention-days` config key - v3.4.0 acceptance criterion #7: Hot/warm/cold tier management functional --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-09 13:52:13 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Critical — The Settings class is missing the context_tier_cold_ttl_days field, meaning CLEVERAGENTS_CTX_COLD_DAYS env var is not wired to ContextTierService. Cold-tier TTL configuration is completely non-functional.
  • Milestone: v3.4.0 — ACMS v1 + Context Scaling is the v3.4.0 deliverable. Cold-tier TTL is a required configuration knob for the context tier system.
  • Story Points: 3 — M — Adding the field to Settings and wiring it through to ContextTierService is a targeted change, but requires careful testing of the full tier configuration path.
  • MoSCoW: Must Have — The spec requires all three tier TTL settings to be configurable. Missing one makes the tier system partially non-configurable.
  • Parent Epic: Needs linking to the ACMS/Context Tier epic under Legendary #377.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Critical — The `Settings` class is missing the `context_tier_cold_ttl_days` field, meaning `CLEVERAGENTS_CTX_COLD_DAYS` env var is not wired to `ContextTierService`. Cold-tier TTL configuration is completely non-functional. - **Milestone**: v3.4.0 — ACMS v1 + Context Scaling is the v3.4.0 deliverable. Cold-tier TTL is a required configuration knob for the context tier system. - **Story Points**: 3 — M — Adding the field to `Settings` and wiring it through to `ContextTierService` is a targeted change, but requires careful testing of the full tier configuration path. - **MoSCoW**: Must Have — The spec requires all three tier TTL settings to be configurable. Missing one makes the tier system partially non-configurable. - **Parent Epic**: Needs linking to the ACMS/Context Tier epic under Legendary #377. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Critical — Settings class missing context_tier_cold_ttl_days field means the CLEVERAGENTS_CONTEXT_TIER_COLD_TTL_DAYS env var is silently ignored. Context tier configuration is a core ACMS feature. Missing settings fields cause silent misconfiguration.
  • Milestone: v3.5.0 — ACMS context tier management is a v3.5.0 deliverable.
  • Story Points: 5 — L size. Adding a missing settings field with env var binding, validation, and tests.
  • MoSCoW: Must Have — Settings fields that are documented in the spec but missing from the implementation are Must Have fixes. Silent env var ignoring is a correctness bug.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Critical — `Settings` class missing `context_tier_cold_ttl_days` field means the `CLEVERAGENTS_CONTEXT_TIER_COLD_TTL_DAYS` env var is silently ignored. Context tier configuration is a core ACMS feature. Missing settings fields cause silent misconfiguration. - **Milestone**: v3.5.0 — ACMS context tier management is a v3.5.0 deliverable. - **Story Points**: 5 — L size. Adding a missing settings field with env var binding, validation, and tests. - **MoSCoW**: Must Have — Settings fields that are documented in the spec but missing from the implementation are Must Have fixes. Silent env var ignoring is a correctness bug. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
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.

Reference
cleveragents/cleveragents-core#6029
No description provided.