UAT: DEFAULT_SKELETON_RATIO default value is inconsistent across modules — spec requires 0.15 #2909

Closed
opened 2026-04-05 02:47:01 +00:00 by freemo · 4 comments
Owner

Metadata

  • Branch: fix/acms-skeleton-ratio-default
  • Commit Message: fix(acms): unify DEFAULT_SKELETON_RATIO to spec-required 0.15
  • Milestone: v3.4.0
  • Parent Epic: #933

Background and Context

The skeleton_ratio default value is inconsistent across the codebase and does not match the specification.

Spec-required default (docs/specification.md line 35294):

"skeleton_ratio": {
  "default": 0.15,
  "description": "Fraction of the context budget reserved for inherited plan skeleton context."
}

The spec also states (line 25602): "The skeleton typically consumes 5–15% of the child's token budget (controlled by skeleton_ratio)."

Current Behavior

Three different default values are used across three modules, none of which match the spec's required default of 0.15:

  1. src/cleveragents/application/services/skeleton_compressor.py line 50:

    DEFAULT_SKELETON_RATIO: float = 0.3  # WRONG — should be 0.15
    
  2. src/cleveragents/application/services/depth_breadth_projection.py line 51:

    DEFAULT_SKELETON_RATIO: float = 0.2  # WRONG — should be 0.15
    
  3. src/cleveragents/cli/commands/project_context.py line 68:

    _DEFAULT_SKELETON_RATIO = 0.2  # WRONG — should be 0.15
    

This means:

  • Child plans receive 2× to 3× more skeleton context than the spec intends
  • The CLI and the service layer use different defaults, causing inconsistent behaviour depending on how skeleton compression is invoked
  • SkeletonCompressorService (0.3) and DepthBreadthProjectionConfig (0.2) will produce different results for the same input

Expected Behavior

All three modules use DEFAULT_SKELETON_RATIO = 0.15 (or _DEFAULT_SKELETON_RATIO = 0.15 for the CLI module), matching the specification.

Steps to Reproduce

  1. Read src/cleveragents/application/services/skeleton_compressor.py line 50
  2. Read src/cleveragents/application/services/depth_breadth_projection.py line 51
  3. Read src/cleveragents/cli/commands/project_context.py line 68
  4. Compare all three with docs/specification.md line 35294 (default: 0.15)

Subtasks

  • Update DEFAULT_SKELETON_RATIO in skeleton_compressor.py (line 50) from 0.3 to 0.15
  • Update DEFAULT_SKELETON_RATIO in depth_breadth_projection.py (line 51) from 0.2 to 0.15
  • Update _DEFAULT_SKELETON_RATIO in project_context.py (line 68) from 0.2 to 0.15
  • Update or add Behave unit tests to assert the correct default value of 0.15 for all three modules
  • Verify no other modules define a divergent skeleton_ratio default (grep codebase)
  • Ensure all nox stages pass after the fix

Definition of Done

  • All three DEFAULT_SKELETON_RATIO / _DEFAULT_SKELETON_RATIO constants are set to 0.15
  • No other module in the codebase defines a divergent skeleton ratio default
  • Behave unit tests assert the 0.15 default for each affected module
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/acms-skeleton-ratio-default` - **Commit Message**: `fix(acms): unify DEFAULT_SKELETON_RATIO to spec-required 0.15` - **Milestone**: v3.4.0 - **Parent Epic**: #933 ## Background and Context The `skeleton_ratio` default value is inconsistent across the codebase and does not match the specification. **Spec-required default** (`docs/specification.md` line 35294): ```json "skeleton_ratio": { "default": 0.15, "description": "Fraction of the context budget reserved for inherited plan skeleton context." } ``` The spec also states (line 25602): *"The skeleton typically consumes 5–15% of the child's token budget (controlled by `skeleton_ratio`)."* ## Current Behavior Three different default values are used across three modules, none of which match the spec's required default of `0.15`: 1. `src/cleveragents/application/services/skeleton_compressor.py` line 50: ```python DEFAULT_SKELETON_RATIO: float = 0.3 # WRONG — should be 0.15 ``` 2. `src/cleveragents/application/services/depth_breadth_projection.py` line 51: ```python DEFAULT_SKELETON_RATIO: float = 0.2 # WRONG — should be 0.15 ``` 3. `src/cleveragents/cli/commands/project_context.py` line 68: ```python _DEFAULT_SKELETON_RATIO = 0.2 # WRONG — should be 0.15 ``` This means: - Child plans receive 2× to 3× more skeleton context than the spec intends - The CLI and the service layer use different defaults, causing inconsistent behaviour depending on how skeleton compression is invoked - `SkeletonCompressorService` (0.3) and `DepthBreadthProjectionConfig` (0.2) will produce different results for the same input ## Expected Behavior All three modules use `DEFAULT_SKELETON_RATIO = 0.15` (or `_DEFAULT_SKELETON_RATIO = 0.15` for the CLI module), matching the specification. ## Steps to Reproduce 1. Read `src/cleveragents/application/services/skeleton_compressor.py` line 50 2. Read `src/cleveragents/application/services/depth_breadth_projection.py` line 51 3. Read `src/cleveragents/cli/commands/project_context.py` line 68 4. Compare all three with `docs/specification.md` line 35294 (default: `0.15`) ## Subtasks - [ ] Update `DEFAULT_SKELETON_RATIO` in `skeleton_compressor.py` (line 50) from `0.3` to `0.15` - [ ] Update `DEFAULT_SKELETON_RATIO` in `depth_breadth_projection.py` (line 51) from `0.2` to `0.15` - [ ] Update `_DEFAULT_SKELETON_RATIO` in `project_context.py` (line 68) from `0.2` to `0.15` - [ ] Update or add Behave unit tests to assert the correct default value of `0.15` for all three modules - [ ] Verify no other modules define a divergent `skeleton_ratio` default (grep codebase) - [ ] Ensure all nox stages pass after the fix ## Definition of Done - [ ] All three `DEFAULT_SKELETON_RATIO` / `_DEFAULT_SKELETON_RATIO` constants are set to `0.15` - [ ] No other module in the codebase defines a divergent skeleton ratio default - [ ] Behave unit tests assert the `0.15` default for each affected module - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.4.0 milestone 2026-04-05 02:47:06 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High (confirmed)
  • MoSCoW: Should Have — inconsistent default value across modules

Valid UAT finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: High (confirmed) - **MoSCoW**: Should Have — inconsistent default value across modules Valid UAT finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Starting implementation on branch fix/acms-skeleton-ratio-default.

Analysis: Found 3 files with incorrect DEFAULT_SKELETON_RATIO / _DEFAULT_SKELETON_RATIO values:

  • skeleton_compressor.py: 0.3 → 0.15
  • depth_breadth_projection.py: 0.2 → 0.15
  • project_context.py: 0.2 → 0.15

TDD approach: Updated feature tests to expect 0.15 first (red), then fixed the constants (green). All Python assertions pass. Lint passes. Dead code check passes.


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

Starting implementation on branch `fix/acms-skeleton-ratio-default`. **Analysis**: Found 3 files with incorrect `DEFAULT_SKELETON_RATIO` / `_DEFAULT_SKELETON_RATIO` values: - `skeleton_compressor.py`: 0.3 → 0.15 - `depth_breadth_projection.py`: 0.2 → 0.15 - `project_context.py`: 0.2 → 0.15 **TDD approach**: Updated feature tests to expect 0.15 first (red), then fixed the constants (green). All Python assertions pass. Lint passes. Dead code check passes. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

All subtasks complete. Quality gates passed. PR #3246 created on branch fix/acms-skeleton-ratio-default. PR review and merge handled by continuous review stream.

Implementation summary:

  • DEFAULT_SKELETON_RATIO in skeleton_compressor.py: 0.3 → 0.15
  • DEFAULT_SKELETON_RATIO in depth_breadth_projection.py: 0.2 → 0.15
  • _DEFAULT_SKELETON_RATIO in project_context.py: 0.2 → 0.15
  • Behave feature tests updated to assert 0.15 default
  • New scenario added to project_context_cov3.feature for CLI default
  • No other divergent skeleton_ratio defaults found in codebase
  • Lint passes (nox -s lint)
  • Dead code check passes (nox -s dead_code)

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

All subtasks complete. Quality gates passed. PR #3246 created on branch `fix/acms-skeleton-ratio-default`. PR review and merge handled by continuous review stream. **Implementation summary:** - ✅ `DEFAULT_SKELETON_RATIO` in `skeleton_compressor.py`: 0.3 → 0.15 - ✅ `DEFAULT_SKELETON_RATIO` in `depth_breadth_projection.py`: 0.2 → 0.15 - ✅ `_DEFAULT_SKELETON_RATIO` in `project_context.py`: 0.2 → 0.15 - ✅ Behave feature tests updated to assert 0.15 default - ✅ New scenario added to `project_context_cov3.feature` for CLI default - ✅ No other divergent skeleton_ratio defaults found in codebase - ✅ Lint passes (`nox -s lint`) - ✅ Dead code check passes (`nox -s dead_code`) --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
freemo removed this from the v3.4.0 milestone 2026-04-06 21:01:42 +00:00
Owner

State label reconciliation:

  • Previous state: State/In Review
  • Corrected to: State/Completed
  • Reason: Issue is closed but had a non-terminal state label. CONTRIBUTING.md requires closed issues to have State/Completed or State/Wont Do.

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

State label reconciliation: - Previous state: `State/In Review` - Corrected to: `State/Completed` - Reason: Issue is closed but had a non-terminal state label. CONTRIBUTING.md requires closed issues to have `State/Completed` or `State/Wont Do`. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#2909
No description provided.