UAT: agents actor add declares --config as optional (Path | None) but raises BadParameter when omitted — misleading CLI signature #6104

Open
opened 2026-04-09 14:43:09 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: Actor Registration (agents actor add)
Milestone Scope: v3.2.0
Severity: Non-critical (UX/usability issue)


What Was Tested

The agents actor add CLI command signature and behavior when --config is omitted.

Expected Behavior (from spec)

The agents actor add command requires a YAML/JSON config file to register an actor. The --config option should be declared as a required option in the CLI signature, making it clear to users that it cannot be omitted.

Actual Behavior

In src/cleveragents/cli/commands/actor.py, the add command declares --config as:

config: Annotated[
    Path | None,
    typer.Option("--config", "-c", help="Path to JSON/YAML actor config"),
] = None,

This declares --config as optional (defaults to None). However, the function body immediately raises BadParameter when config is None:

if config is None:
    raise typer.BadParameter("Config file is required for actor add")

This creates a misleading CLI experience:

  1. agents actor add --help shows --config as optional (no [required] marker)
  2. Running agents actor add local/my-actor (without --config) produces a confusing BadParameter error instead of a clear "required option missing" message from Typer

Steps to Reproduce

agents actor add local/my-actor
# Expected: "Error: Missing option '--config' / '-c'."
# Actual: "Error: Invalid value for '--config' / '-c': Config file is required for actor add"

Code Location

src/cleveragents/cli/commands/actor.pyadd() function, lines declaring config parameter and the if config is None guard.

Fix

Change the config parameter declaration to use typer.Option(..., required=True) or remove the | None type and = None default:

config: Annotated[
    Path,
    typer.Option("--config", "-c", help="Path to JSON/YAML actor config"),
],

This will make Typer automatically enforce the requirement and produce a standard "Missing option" error message.


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

## Bug Report **Feature Area**: Actor Registration (`agents actor add`) **Milestone Scope**: v3.2.0 **Severity**: Non-critical (UX/usability issue) --- ## What Was Tested The `agents actor add` CLI command signature and behavior when `--config` is omitted. ## Expected Behavior (from spec) The `agents actor add` command requires a YAML/JSON config file to register an actor. The `--config` option should be declared as a **required** option in the CLI signature, making it clear to users that it cannot be omitted. ## Actual Behavior In `src/cleveragents/cli/commands/actor.py`, the `add` command declares `--config` as: ```python config: Annotated[ Path | None, typer.Option("--config", "-c", help="Path to JSON/YAML actor config"), ] = None, ``` This declares `--config` as **optional** (defaults to `None`). However, the function body immediately raises `BadParameter` when `config is None`: ```python if config is None: raise typer.BadParameter("Config file is required for actor add") ``` This creates a misleading CLI experience: 1. `agents actor add --help` shows `--config` as optional (no `[required]` marker) 2. Running `agents actor add local/my-actor` (without `--config`) produces a confusing `BadParameter` error instead of a clear "required option missing" message from Typer ## Steps to Reproduce ```bash agents actor add local/my-actor # Expected: "Error: Missing option '--config' / '-c'." # Actual: "Error: Invalid value for '--config' / '-c': Config file is required for actor add" ``` ## Code Location `src/cleveragents/cli/commands/actor.py` — `add()` function, lines declaring `config` parameter and the `if config is None` guard. ## Fix Change the `config` parameter declaration to use `typer.Option(..., required=True)` or remove the `| None` type and `= None` default: ```python config: Annotated[ Path, typer.Option("--config", "-c", help="Path to JSON/YAML actor config"), ], ``` This will make Typer automatically enforce the requirement and produce a standard "Missing option" error message. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 21:18:57 +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#6104
No description provided.