feat(acms): implement budget enforcement for context assembly (max_file_size, max_total_size) #8562

Open
opened 2026-04-13 20:39:47 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit message type: feat
  • Scope: acms
  • Branch name prefix: feat/v3.4.0-acms-budget-enforcement

Background and Context

As part of Epic #8497 (Context Assembly Pipeline & Budget Enforcement), budget enforcement ensures that assembled context views do not exceed configured size limits. This prevents context windows from being overloaded.

This issue blocks Epic #8497.

Expected Behavior

  • max_file_size constraint limits the size of any single file included in the context
  • max_total_size constraint limits the total size of the assembled context view
  • Files exceeding max_file_size are truncated or excluded
  • When max_total_size is reached, lower-priority content is excluded
  • Budget violations are logged with details

Acceptance Criteria

  • max_file_size constraint is enforced (files exceeding limit are truncated/excluded)
  • max_total_size constraint is enforced (assembly stops when limit is reached)
  • Priority-based exclusion when max_total_size is reached
  • Budget violations are logged with file name and size details
  • Integration tests verify budget enforcement with various constraint values
  • Unit tests achieve >= 97% coverage

Subtasks

  • Implement max_file_size enforcement (truncate or exclude)
  • Implement max_total_size enforcement with priority-based exclusion
  • Add budget violation logging
  • Write integration tests for budget enforcement
  • Write unit tests for enforcement logic

Definition of Done

  1. Budget enforcement is functional for both constraints
  2. Integration tests verify enforcement with various constraint values
  3. Unit tests pass with >= 97% coverage
  4. Code reviewed and merged to main branch

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor

## Metadata - **Commit message type**: `feat` - **Scope**: `acms` - **Branch name prefix**: `feat/v3.4.0-acms-budget-enforcement` ## Background and Context As part of Epic #8497 (Context Assembly Pipeline & Budget Enforcement), budget enforcement ensures that assembled context views do not exceed configured size limits. This prevents context windows from being overloaded. This issue blocks Epic #8497. ## Expected Behavior - `max_file_size` constraint limits the size of any single file included in the context - `max_total_size` constraint limits the total size of the assembled context view - Files exceeding `max_file_size` are truncated or excluded - When `max_total_size` is reached, lower-priority content is excluded - Budget violations are logged with details ## Acceptance Criteria - [ ] `max_file_size` constraint is enforced (files exceeding limit are truncated/excluded) - [ ] `max_total_size` constraint is enforced (assembly stops when limit is reached) - [ ] Priority-based exclusion when `max_total_size` is reached - [ ] Budget violations are logged with file name and size details - [ ] Integration tests verify budget enforcement with various constraint values - [ ] Unit tests achieve >= 97% coverage ## Subtasks - [ ] Implement `max_file_size` enforcement (truncate or exclude) - [ ] Implement `max_total_size` enforcement with priority-based exclusion - [ ] Add budget violation logging - [ ] Write integration tests for budget enforcement - [ ] Write unit tests for enforcement logic ## Definition of Done 1. Budget enforcement is functional for both constraints 2. Integration tests verify enforcement with various constraint values 3. Unit tests pass with >= 97% coverage 4. Code reviewed and merged to main branch --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
HAL9000 added this to the v3.4.0 milestone 2026-04-13 20:40:37 +00:00
Author
Owner

[AUTO-OWNR-3] Triage Decision (Cycle 2)

Status: Verified

MoSCoW: Must Have
Priority: High
Milestone: v3.4.0

Rationale: This is a required implementation task for the v3.4.0 milestone (Advanced Context Management System v1). The v3.4.0 acceptance criteria explicitly requires budget enforcement to work with max_file_size and max_total_size constraints.

Next Steps: Implementation worker should pick this up as part of the v3.4.0 ACMS epic work.


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

## [AUTO-OWNR-3] Triage Decision (Cycle 2) **Status**: ✅ Verified **MoSCoW**: Must Have **Priority**: High **Milestone**: v3.4.0 **Rationale**: This is a required implementation task for the v3.4.0 milestone (Advanced Context Management System v1). The v3.4.0 acceptance criteria explicitly requires budget enforcement to work with max_file_size and max_total_size constraints. **Next Steps**: Implementation worker should pick this up as part of the v3.4.0 ACMS epic work. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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#8562
No description provided.