UAT: agents plan use rejects custom (namespaced) automation profiles #5023

Open
opened 2026-04-09 00:48:57 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Plan Lifecycle — agents plan use

Summary

agents plan use --automation-profile <name> only accepts built-in profile names. Custom namespaced profiles (e.g., local/careful-auto, acme/strict) are rejected with an error, even though the spec explicitly requires them to be accepted.

Expected Behavior (from spec)

Per docs/specification.md §Glossary (Automation Profile):

Custom profiles namespaced as [[server:]namespace/]name.

Per §CLI Commands (agents plan use):

--automation-profile PROFILE: Automation profile name (e.g., trusted, auto, local/careful-auto). Overrides the profile inherited from the action, project, or global config.

The spec explicitly shows local/careful-auto as a valid example value for --automation-profile.

Per §Core Config (core.automation-profile):

Accepts any built-in profile name (manual, review, supervised, cautious, trusted, auto, ci, full-auto) or a custom profile name in <namespace>/<name> format.

Actual Behavior

In src/cleveragents/cli/commands/plan.py lines 1745–1755:

if automation_profile:
    from cleveragents.domain.models.core.automation_profile import (
        BUILTIN_PROFILES,
    )

    if automation_profile not in BUILTIN_PROFILES:
        console.print(
            f"[red]Invalid automation profile:[/red] {automation_profile}. "
            f"Available: {', '.join(sorted(BUILTIN_PROFILES))}"
        )
        raise typer.Abort()

This check only allows the 8 built-in profiles. Any custom profile (e.g., local/careful-auto) is rejected with an error, even if it exists in the automation profile registry.

Steps to Reproduce

  1. Create a custom automation profile: agents automation-profile add --config my-profile.yaml
  2. Attempt to use it: agents plan use local/my-action local/my-project --automation-profile local/my-profile
  3. Observe: Error "Invalid automation profile: local/my-profile. Available: auto, cautious, ci, full-auto, manual, review, supervised, trusted"

Code Location

src/cleveragents/cli/commands/plan.py, lines 1745–1755

Fix Direction

The validation should look up the profile in the automation profile registry (not just BUILTIN_PROFILES). If the profile name is namespaced (contains /), it should be looked up via the service. If it doesn't exist in either built-ins or the registry, then reject it.


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

## Bug Report **Feature Area:** Plan Lifecycle — `agents plan use` ### Summary `agents plan use --automation-profile <name>` only accepts built-in profile names. Custom namespaced profiles (e.g., `local/careful-auto`, `acme/strict`) are rejected with an error, even though the spec explicitly requires them to be accepted. ### Expected Behavior (from spec) Per `docs/specification.md` §Glossary (Automation Profile): > Custom profiles namespaced as `[[server:]namespace/]name`. Per §CLI Commands (`agents plan use`): > `--automation-profile PROFILE`: Automation profile name (e.g., `trusted`, `auto`, `local/careful-auto`). Overrides the profile inherited from the action, project, or global config. The spec explicitly shows `local/careful-auto` as a valid example value for `--automation-profile`. Per §Core Config (`core.automation-profile`): > Accepts any built-in profile name (`manual`, `review`, `supervised`, `cautious`, `trusted`, `auto`, `ci`, `full-auto`) or a custom profile name in `<namespace>/<name>` format. ### Actual Behavior In `src/cleveragents/cli/commands/plan.py` lines 1745–1755: ```python if automation_profile: from cleveragents.domain.models.core.automation_profile import ( BUILTIN_PROFILES, ) if automation_profile not in BUILTIN_PROFILES: console.print( f"[red]Invalid automation profile:[/red] {automation_profile}. " f"Available: {', '.join(sorted(BUILTIN_PROFILES))}" ) raise typer.Abort() ``` This check only allows the 8 built-in profiles. Any custom profile (e.g., `local/careful-auto`) is rejected with an error, even if it exists in the automation profile registry. ### Steps to Reproduce 1. Create a custom automation profile: `agents automation-profile add --config my-profile.yaml` 2. Attempt to use it: `agents plan use local/my-action local/my-project --automation-profile local/my-profile` 3. Observe: Error "Invalid automation profile: local/my-profile. Available: auto, cautious, ci, full-auto, manual, review, supervised, trusted" ### Code Location `src/cleveragents/cli/commands/plan.py`, lines 1745–1755 ### Fix Direction The validation should look up the profile in the automation profile registry (not just `BUILTIN_PROFILES`). If the profile name is namespaced (contains `/`), it should be looked up via the service. If it doesn't exist in either built-ins or the registry, then reject it. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 01:01:28 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — Spec compliance bug that breaks documented behavior
  • Milestone: v3.2.0
  • Story Points: 3 — M
  • MoSCoW: Must Have — Spec compliance is required

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

Issue triaged by project owner: - **State**: Verified - **Priority**: High — Spec compliance bug that breaks documented behavior - **Milestone**: v3.2.0 - **Story Points**: 3 — M - **MoSCoW**: Must Have — Spec compliance is required --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
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#5023
No description provided.