UAT: agents plan list --phase applied fails despite being listed as valid in error message #6797

Open
opened 2026-04-10 02:07:02 +00:00 by HAL9000 · 0 comments
Owner

What Was Tested

The --phase filter on agents plan list, specifically whether --phase applied works to list plans that have reached the applied terminal state.

Expected Behavior (from Spec / Code Error Message)

The error message in src/cleveragents/cli/commands/plan.py (line 2953-2954) explicitly states that "applied" is a valid phase value:

console.print(
    f"[red]Invalid phase:[/red] {phase}. "
    "Valid values: strategize, execute, apply, applied"  # <-- "applied" listed
)

Additionally, the --phase option help text (line 2881) lists "Filter by phase (strategize, execute, apply, applied)"

Actual Behavior

The --phase applied filter immediately raises a ValueError because PlanPhase("applied") fails -- the PlanPhase enum (defined in src/cleveragents/domain/models/core/plan.py) only contains: action, strategize, execute, apply.

$ agents plan list --phase applied
[red]Invalid phase:[/red] applied. Valid values: strategize, execute, apply, applied

The error message itself is self-contradictory: it says "applied" is invalid, while simultaneously listing it as a valid value.

Steps to Reproduce

  1. Run: agents plan list --phase applied
  2. Result: Error message says "Invalid phase: applied. Valid values: strategize, execute, apply, applied"
  3. The error message lists "applied" as valid but then rejects it

Root Cause

PlanPhase enum has only: action, strategize, execute, apply. The string "applied" is a ProcessingState value, not a PlanPhase value. The code should either: (a) remove "applied" from the valid values help text and error message, or (b) implement special-case handling for "applied" to filter plans with phase=apply AND state=applied.

Impact

Users who try agents plan list --phase applied to see all successfully applied plans receive a confusing, self-contradictory error. The ability to filter applied plans by phase is documented but broken.


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

## What Was Tested The `--phase` filter on `agents plan list`, specifically whether `--phase applied` works to list plans that have reached the applied terminal state. ## Expected Behavior (from Spec / Code Error Message) The error message in `src/cleveragents/cli/commands/plan.py` (line 2953-2954) explicitly states that "applied" is a valid phase value: ```python console.print( f"[red]Invalid phase:[/red] {phase}. " "Valid values: strategize, execute, apply, applied" # <-- "applied" listed ) ``` Additionally, the `--phase` option help text (line 2881) lists "Filter by phase (strategize, execute, apply, applied)" ## Actual Behavior The `--phase applied` filter immediately raises a `ValueError` because `PlanPhase("applied")` fails -- the `PlanPhase` enum (defined in `src/cleveragents/domain/models/core/plan.py`) only contains: `action`, `strategize`, `execute`, `apply`. ``` $ agents plan list --phase applied [red]Invalid phase:[/red] applied. Valid values: strategize, execute, apply, applied ``` The error message itself is self-contradictory: it says "applied" is invalid, while simultaneously listing it as a valid value. ## Steps to Reproduce 1. Run: `agents plan list --phase applied` 2. **Result**: Error message says "Invalid phase: applied. Valid values: strategize, execute, apply, applied" 3. The error message lists "applied" as valid but then rejects it ## Root Cause `PlanPhase` enum has only: `action`, `strategize`, `execute`, `apply`. The string "applied" is a `ProcessingState` value, not a `PlanPhase` value. The code should either: (a) remove "applied" from the valid values help text and error message, or (b) implement special-case handling for "applied" to filter plans with `phase=apply AND state=applied`. ## Impact Users who try `agents plan list --phase applied` to see all successfully applied plans receive a confusing, self-contradictory error. The ability to filter applied plans by phase is documented but broken. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-10 02:07:02 +00:00
HAL9000 self-assigned this 2026-04-10 06:06:48 +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#6797
No description provided.