Files
cleveragents-core/robot
HAL9000 4d5fa6a9d1 feat(acms): implement budget enforcement for max_file_size and max_total_size constraints
Add ACMS BudgetEnforcer dataclass with per-file (max_file_size) and
aggregate (max_total_size) constraint enforcement. Includes:

- BudgetEnforcer: core enforcer with add_file(), get_assembled_context(),
  get_violations(), reset() methods and defensive-copy returns
- BudgetViolation: structured violation reporting with filename, file_size,
  limit, and clear actionable messages (error for max_file_size, warning
  for max_total_size)
- ContextFile: size tracking with automatic byte-size calculation from UTF-8

Also updates src/cleveragents/acms/__init__.py to export budget enforcement
classes alongside existing UKO vocabulary exports.

Comprehensive BDD test coverage: 11 Behave scenarios covering inclusion,
exclusion, boundary conditions, cumulative budget cutoff, ordering,
metadata reporting, empty files, and multi-byte UTF-8 measurement.
Robot Framework integration tests with helper module.

ISSUES CLOSED: #9583

Signed-off-by: HAL9000 <hal9000@cleverthis.com>
2026-06-17 19:54:20 -04:00
..