feat(acms): implement budget enforcement for max_file_size and max_total_size constraints #9583

Open
opened 2026-04-14 23:36:44 +00:00 by HAL9000 · 3 comments
Owner

Metadata

  • Commit message: feat(acms): implement budget enforcement for max_file_size and max_total_size constraints
  • Branch name: feat/v3.4.0-acms-budget-enforcement

Background and Context

The assembled context must not exceed configured budget limits. Files exceeding max_file_size are excluded or truncated. Total assembled context must not exceed max_total_size. Without budget enforcement, actors risk exceeding LLM token limits or including oversized files that degrade context quality and increase API costs. Clear error/warning messages are required so users can diagnose and resolve budget violations.

Expected Behavior

When this issue is complete:

  • max_file_size constraint is enforced (files exceeding limit are excluded or truncated)
  • max_total_size constraint is enforced (total context does not exceed budget)
  • Budget violation produces clear error/warning messages
  • Unit tests pass with coverage >= 97%

Acceptance Criteria

  • max_file_size constraint enforced (files exceeding limit excluded or truncated)
  • max_total_size constraint enforced (total context does not exceed budget)
  • Budget violation produces clear error/warning messages
  • Unit tests pass with coverage >= 97%

Subtasks

  • Implement per-file size check with exclusion/truncation strategy
  • Implement cumulative budget tracking with graceful cutoff
  • Implement budget violation reporting
  • Write unit tests for both constraint types
  • Verify coverage >= 97%

Definition of Done

This issue is closed when:

  1. Per-file size check with exclusion/truncation strategy is implemented
  2. Cumulative budget tracking with graceful cutoff is implemented
  3. Budget violation reporting produces clear error/warning messages
  4. Unit tests cover both max_file_size and max_total_size constraint scenarios
  5. All unit tests pass
  6. Test coverage >= 97% for all code introduced in this issue
  7. Code is reviewed and merged into the target branch

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor [AUTO-EPIC-3]

## Metadata - **Commit message**: `feat(acms): implement budget enforcement for max_file_size and max_total_size constraints` - **Branch name**: `feat/v3.4.0-acms-budget-enforcement` ## Background and Context The assembled context must not exceed configured budget limits. Files exceeding max_file_size are excluded or truncated. Total assembled context must not exceed max_total_size. Without budget enforcement, actors risk exceeding LLM token limits or including oversized files that degrade context quality and increase API costs. Clear error/warning messages are required so users can diagnose and resolve budget violations. ## Expected Behavior When this issue is complete: - max_file_size constraint is enforced (files exceeding limit are excluded or truncated) - max_total_size constraint is enforced (total context does not exceed budget) - Budget violation produces clear error/warning messages - Unit tests pass with coverage >= 97% ## Acceptance Criteria - [ ] max_file_size constraint enforced (files exceeding limit excluded or truncated) - [ ] max_total_size constraint enforced (total context does not exceed budget) - [ ] Budget violation produces clear error/warning messages - [ ] Unit tests pass with coverage >= 97% ## Subtasks - [ ] Implement per-file size check with exclusion/truncation strategy - [ ] Implement cumulative budget tracking with graceful cutoff - [ ] Implement budget violation reporting - [ ] Write unit tests for both constraint types - [ ] Verify coverage >= 97% ## Definition of Done This issue is closed when: 1. Per-file size check with exclusion/truncation strategy is implemented 2. Cumulative budget tracking with graceful cutoff is implemented 3. Budget violation reporting produces clear error/warning messages 4. Unit tests cover both max_file_size and max_total_size constraint scenarios 5. All unit tests pass 6. Test coverage >= 97% for all code introduced in this issue 7. Code is reviewed and merged into the target branch --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor [AUTO-EPIC-3]
Author
Owner

[AUTO-OWNR-1] Triage Decision: Verified — MoSCoW/Must Have

Core ACMS v1 (Advanced Context Management System) feature for v3.4.0 (M5: ACMS v1 + Context Scaling). Must Have for milestone completion.

Milestone: v3.4.0
Priority: High


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


Automated by CleverAgents Bot
Agent: automation-tracking-manager

[AUTO-OWNR-1] **Triage Decision: Verified — MoSCoW/Must Have** Core ACMS v1 (Advanced Context Management System) feature for v3.4.0 (M5: ACMS v1 + Context Scaling). Must Have for milestone completion. **Milestone:** v3.4.0 **Priority:** High --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor --- **Automated by CleverAgents Bot** Agent: automation-tracking-manager
HAL9000 added this to the v3.4.0 milestone 2026-04-15 01:20:42 +00:00
Author
Owner

🏷️ Triage Decision — [AUTO-OWNR-1]\n\nStatus: Verified\n\nIssue Type: Feature (v3.4.0) \nMoSCoW: Must Have — Budget enforcement is a v3.4.0 acceptance criterion \nPriority: High\n\nRationale: The v3.4.0 milestone requires 'Budget enforcement works (max_file_size, max_total_size constraints)'. This is a Must Have for milestone completion.\n\nNote: Possible duplicate of #9673. If so, consider closing as duplicate.\n\nLabels to apply: State/Verified, MoSCoW/Must have, Priority/High, Type/Feature\n\n---\nAutomated by CleverAgents Bot\nSupervisor: Project Owner | Agent: project-owner-pool-supervisor

## 🏷️ Triage Decision — [AUTO-OWNR-1]\n\n**Status:** ✅ Verified\n\n**Issue Type:** Feature (v3.4.0) \n**MoSCoW:** Must Have — Budget enforcement is a v3.4.0 acceptance criterion \n**Priority:** High\n\n**Rationale:** The v3.4.0 milestone requires 'Budget enforcement works (max_file_size, max_total_size constraints)'. This is a Must Have for milestone completion.\n\n**Note:** Possible duplicate of #9673. If so, consider closing as duplicate.\n\n**Labels to apply:** State/Verified, MoSCoW/Must have, Priority/High, Type/Feature\n\n---\n**Automated by CleverAgents Bot**\nSupervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

[AUTO-OWNR-1] Triage complete.

Verified — Valid feature. Budget enforcement for max_file_size and max_total_size is a v3.4.0 acceptance criterion ("Budget enforcement works").

  • Type: Feature
  • Priority: High
  • MoSCoW: Must Have — budget enforcement is a v3.4.0 acceptance criterion
  • Milestone: v3.4.0 — ACMS budget enforcement

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

[AUTO-OWNR-1] Triage complete. **Verified** ✅ — Valid feature. Budget enforcement for `max_file_size` and `max_total_size` is a v3.4.0 acceptance criterion ("Budget enforcement works"). - **Type**: Feature - **Priority**: High - **MoSCoW**: Must Have — budget enforcement is a v3.4.0 acceptance criterion - **Milestone**: v3.4.0 — ACMS budget enforcement --- **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#9583
No description provided.