UAT: ContextConfig domain model missing 6 spec-required ACMS fields: strategy, default_breadth, default_depth, depth_gradient, skeleton_ratio, query_limit #4557

Closed
opened 2026-04-08 14:30:53 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: ACMS / ContextConfig domain model
Severity: Medium
File: src/cleveragents/domain/models/core/project.py

What Was Tested

The ContextConfig domain model was compared against the specification's context view configuration schema.

Expected Behavior (from spec)

Per docs/specification.md lines 35481–35492 and the Structure Reference table (lines 35517–35521), the context view configuration (and by extension ContextConfig) must include these ACMS-specific fields:

Field Type Default Description
strategy list[str] [] ACMS strategies to use (overrides global list). Built-in: simple-keyword, semantic-embedding, breadth-depth-navigator, arce, temporal-archaeology, plan-decision-context
default_breadth integer 2 Default hop count for UKO graph expansion
default_depth integer or string 3 Default detail depth (integer or named level like SIGNATURES)
depth_gradient dict[int, int|str] {} Per-hop detail depth overrides (key=hop distance, value=depth)
skeleton_ratio float 0.15 Fraction of budget for inherited plan skeleton
query_limit integer 20 Max retrieval results per query against cold tier

Actual Behavior

The ContextConfig class in src/cleveragents/domain/models/core/project.py (lines 186–290) is missing all 6 ACMS-specific fields. The class only has:

  • ignore_patterns, include_patterns (path filtering)
  • max_file_size, max_total_size (size limits)
  • indexing_strategy, chunking_policy, chunk_size (indexing)
  • hot_max_tokens, warm_max_decisions, cold_max_decisions (tier config)
  • summarize, summary_max_tokens (summarization)
  • temporal_scope, auto_refresh (temporal/refresh)
  • retention_policy, execution_environment, execution_env_priority

The 6 ACMS strategy/depth fields are completely absent from the domain model.

Steps to Reproduce

  1. Inspect src/cleveragents/domain/models/core/project.py class ContextConfig
  2. Compare against spec lines 35481–35492 and the Structure Reference table
  3. Note strategy, default_breadth, default_depth, depth_gradient, skeleton_ratio, query_limit are all absent

Impact

  • ContextConfig cannot represent the full ACMS configuration as specified
  • The database model (NamespacedProjectModel.context_policy_json) stores ACMS config as a separate untyped acms_config dict in the CLI (see project_context.py), bypassing the domain model entirely
  • No type safety or validation for ACMS strategy/depth parameters at the domain layer
  • The ContextConfig used in NamespacedProject.context_config is incomplete — it cannot carry ACMS strategy configuration

Code Location

  • src/cleveragents/domain/models/core/project.py lines 186–290 (ContextConfig class)
  • src/cleveragents/cli/commands/project_context.py lines 540–560 (_default_acms_config() — workaround storing ACMS config as untyped dict)

Fix

Add the 6 missing fields to ContextConfig:

strategy: list[str] = Field(default_factory=list, description="ACMS strategies to use")
default_breadth: int = Field(default=2, ge=0, description="Default UKO graph hop count")
default_depth: int | str = Field(default=3, description="Default detail depth")
depth_gradient: dict[int, int | str] = Field(default_factory=dict, description="Per-hop depth overrides")
skeleton_ratio: float = Field(default=0.15, ge=0.0, le=1.0, description="Skeleton budget fraction")
query_limit: int = Field(default=20, gt=0, description="Max cold tier retrieval results")

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

## Bug Report **Feature Area:** ACMS / ContextConfig domain model **Severity:** Medium **File:** `src/cleveragents/domain/models/core/project.py` ### What Was Tested The `ContextConfig` domain model was compared against the specification's context view configuration schema. ### Expected Behavior (from spec) Per `docs/specification.md` lines 35481–35492 and the Structure Reference table (lines 35517–35521), the context view configuration (and by extension `ContextConfig`) must include these ACMS-specific fields: | Field | Type | Default | Description | |-------|------|---------|-------------| | `strategy` | list[str] | `[]` | ACMS strategies to use (overrides global list). Built-in: `simple-keyword`, `semantic-embedding`, `breadth-depth-navigator`, `arce`, `temporal-archaeology`, `plan-decision-context` | | `default_breadth` | integer | `2` | Default hop count for UKO graph expansion | | `default_depth` | integer or string | `3` | Default detail depth (integer or named level like `SIGNATURES`) | | `depth_gradient` | dict[int, int\|str] | `{}` | Per-hop detail depth overrides (key=hop distance, value=depth) | | `skeleton_ratio` | float | `0.15` | Fraction of budget for inherited plan skeleton | | `query_limit` | integer | `20` | Max retrieval results per query against cold tier | ### Actual Behavior The `ContextConfig` class in `src/cleveragents/domain/models/core/project.py` (lines 186–290) is **missing all 6 ACMS-specific fields**. The class only has: - `ignore_patterns`, `include_patterns` (path filtering) - `max_file_size`, `max_total_size` (size limits) - `indexing_strategy`, `chunking_policy`, `chunk_size` (indexing) - `hot_max_tokens`, `warm_max_decisions`, `cold_max_decisions` (tier config) - `summarize`, `summary_max_tokens` (summarization) - `temporal_scope`, `auto_refresh` (temporal/refresh) - `retention_policy`, `execution_environment`, `execution_env_priority` The 6 ACMS strategy/depth fields are completely absent from the domain model. ### Steps to Reproduce 1. Inspect `src/cleveragents/domain/models/core/project.py` class `ContextConfig` 2. Compare against spec lines 35481–35492 and the Structure Reference table 3. Note `strategy`, `default_breadth`, `default_depth`, `depth_gradient`, `skeleton_ratio`, `query_limit` are all absent ### Impact - `ContextConfig` cannot represent the full ACMS configuration as specified - The database model (`NamespacedProjectModel.context_policy_json`) stores ACMS config as a separate untyped `acms_config` dict in the CLI (see `project_context.py`), bypassing the domain model entirely - No type safety or validation for ACMS strategy/depth parameters at the domain layer - The `ContextConfig` used in `NamespacedProject.context_config` is incomplete — it cannot carry ACMS strategy configuration ### Code Location - `src/cleveragents/domain/models/core/project.py` lines 186–290 (`ContextConfig` class) - `src/cleveragents/cli/commands/project_context.py` lines 540–560 (`_default_acms_config()` — workaround storing ACMS config as untyped dict) ### Fix Add the 6 missing fields to `ContextConfig`: ```python strategy: list[str] = Field(default_factory=list, description="ACMS strategies to use") default_breadth: int = Field(default=2, ge=0, description="Default UKO graph hop count") default_depth: int | str = Field(default=3, description="Default detail depth") depth_gradient: dict[int, int | str] = Field(default_factory=dict, description="Per-hop depth overrides") skeleton_ratio: float = Field(default=0.15, ge=0.0, le=1.0, description="Skeleton budget fraction") query_limit: int = Field(default=20, gt=0, description="Max cold tier retrieval results") ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Closing as duplicate of #4432. Both issues describe the same bug: ContextConfig domain model is missing spec-required ACMS fields. Issue #4432 is older and covers the same root cause.


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

Closing as duplicate of #4432. Both issues describe the same bug: `ContextConfig` domain model is missing spec-required ACMS fields. Issue #4432 is older and covers the same root cause. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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.

Dependencies

No dependencies set.

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