UAT: Automation guard definitions never enforce tool limits #6990

Open
opened 2026-04-10 06:11:36 +00:00 by HAL9000 · 0 comments
Owner

What was tested

  • Evaluated automation guard enforcement against docs/specification.md (lines 28520-28560) on commit 51aab18411.

Expected behavior

  • Guard settings attached to an automation profile (denylist, allowlist, max_tool_calls_per_step, max_total_cost, write/apply approval flags) should run automatically before every tool invocation.
  • Runtime should follow the documented order (denylist → allowlist → tool call limit → budget cap → write approval → apply approval) and block or require approval when a guard trips.

Actual behavior

  • Guard evaluation is never wired into plan or tool execution. AutomationProfile.check_guard(...) is only referenced by the helper service; nothing calls AutomationProfileService.evaluate_guard(...).
  • ToolRuntime.execute and PlanExecutor execute tools without invoking the guard APIs, so denylist, budget, and call-limit values are ignored.

Steps to reproduce

  1. From the repo root, run:
    python3 - <<'PY'
    import pathlib
    root = pathlib.Path('src/cleveragents')
    uses = [str(p.relative_to(root)) for p in root.rglob('*.py')
            if p.name != 'automation_profile.py' and 'check_guard(' in p.read_text(encoding='utf-8')]
    print('check_guard references:', uses)
    PY
    
  2. Output shows check_guard only appears in application/services/automation_profile_service.py. A similar search for evaluate_guard( returns an empty list.
  3. Inspect src/cleveragents/tool/lifecycle.py and src/cleveragents/application/services/plan_executor.py; neither calls the guard helper, so guard configuration never executes.

Code location

  • src/cleveragents/domain/models/core/automation_profile.py
  • src/cleveragents/application/services/automation_profile_service.py
  • src/cleveragents/tool/lifecycle.py
  • src/cleveragents/application/services/plan_executor.py
## What was tested - Evaluated automation guard enforcement against docs/specification.md (lines 28520-28560) on commit 51aab184112728471a44d5a91c334663cf8cd016. ## Expected behavior - Guard settings attached to an automation profile (denylist, allowlist, max_tool_calls_per_step, max_total_cost, write/apply approval flags) should run automatically before every tool invocation. - Runtime should follow the documented order (denylist → allowlist → tool call limit → budget cap → write approval → apply approval) and block or require approval when a guard trips. ## Actual behavior - Guard evaluation is never wired into plan or tool execution. `AutomationProfile.check_guard(...)` is only referenced by the helper service; nothing calls `AutomationProfileService.evaluate_guard(...)`. - `ToolRuntime.execute` and `PlanExecutor` execute tools without invoking the guard APIs, so denylist, budget, and call-limit values are ignored. ## Steps to reproduce 1. From the repo root, run: ```bash python3 - <<'PY' import pathlib root = pathlib.Path('src/cleveragents') uses = [str(p.relative_to(root)) for p in root.rglob('*.py') if p.name != 'automation_profile.py' and 'check_guard(' in p.read_text(encoding='utf-8')] print('check_guard references:', uses) PY ``` 2. Output shows `check_guard` only appears in `application/services/automation_profile_service.py`. A similar search for `evaluate_guard(` returns an empty list. 3. Inspect `src/cleveragents/tool/lifecycle.py` and `src/cleveragents/application/services/plan_executor.py`; neither calls the guard helper, so guard configuration never executes. ## Code location - `src/cleveragents/domain/models/core/automation_profile.py` - `src/cleveragents/application/services/automation_profile_service.py` - `src/cleveragents/tool/lifecycle.py` - `src/cleveragents/application/services/plan_executor.py`
HAL9000 self-assigned this 2026-04-10 06:21:46 +00:00
HAL9000 added this to the v3.6.0 milestone 2026-04-10 06:21:46 +00:00
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#6990
No description provided.