UAT: agents actor add requires spurious positional NAME argument — spec defines config-only registration #6781

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

Background

The spec defines agents actor add as a config-file-only registration command where the actor name is determined entirely by the name field inside the YAML config file.

What Was Tested

Code analysis of src/cleveragents/cli/commands/actor.py — specifically the add() command function signature.

Expected Behavior (from spec)

The spec (Command Synopsis and section agents actor add) specifies:

agents actor add --config|-c <FILE> [--update]

The spec text explicitly states (Arguments section):

--config/-c FILE: Actor config file (required). The file must fully define the actor, including the name field which determines the actor's registered name.

There is no positional NAME argument in the spec. The name must come exclusively from the config file.

Actual Behavior

The implementation at src/cleveragents/cli/commands/actor.py defines a required positional NAME argument:

@app.command()
def add(
    name: Annotated[
        str,
        typer.Argument(
            help="Namespaced actor name (e.g. local/my-actor)",
            metavar="NAME",
        ),
    ],
    config: Annotated[
        Path | None,
        typer.Option("--config", "-c", help="Path to JSON/YAML actor config"),
    ] = None,
    ...
)

The docstring also explicitly states: "The positional NAME takes precedence over any name field in the config file." This means:

  1. Users must supply a NAME positional arg that the spec does not define
  2. The CLI name overrides the config file's name field
  3. The command signature agents actor add <NAME> --config <FILE> does not match spec

Steps to Reproduce

# Spec-compliant usage (no NAME arg) — fails with current implementation:
agents actor add --config ./actors/reviewer.yaml
# Error: Missing argument 'NAME'

# Non-spec usage required by current implementation:
agents actor add local/reviewer --config ./actors/reviewer.yaml

Note: Issue #6752 captures related unexpected override behavior but the core spec violation is that the positional NAME argument should not exist at all — the spec mandates config-file-only registration.

Acceptance Criteria

  • agents actor add accepts only --config|-c <FILE> as the required argument (no positional NAME)
  • The actor name is determined exclusively by the name field in the YAML config file
  • Running agents actor add --config ./actors/reviewer.yaml works without a positional NAME argument

Subtasks

  • Remove the positional NAME argument from add() in src/cleveragents/cli/commands/actor.py
  • Update command to read actor name from config blob name field only
  • Update tests to match new spec-compliant signature
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when all subtasks are checked off, the implementation matches the spec signature, and a PR is reviewed and merged.


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

## Background The spec defines `agents actor add` as a config-file-only registration command where the actor name is determined entirely by the `name` field inside the YAML config file. ## What Was Tested Code analysis of `src/cleveragents/cli/commands/actor.py` — specifically the `add()` command function signature. ## Expected Behavior (from spec) The spec (Command Synopsis and section `agents actor add`) specifies: ``` agents actor add --config|-c <FILE> [--update] ``` The spec text explicitly states (Arguments section): > **--config/-c FILE**: Actor config file (required). The file must fully define the actor, including the `name` field which determines the actor's registered name. There is **no positional NAME argument** in the spec. The name must come exclusively from the config file. ## Actual Behavior The implementation at `src/cleveragents/cli/commands/actor.py` defines a required positional `NAME` argument: ```python @app.command() def add( name: Annotated[ str, typer.Argument( help="Namespaced actor name (e.g. local/my-actor)", metavar="NAME", ), ], config: Annotated[ Path | None, typer.Option("--config", "-c", help="Path to JSON/YAML actor config"), ] = None, ... ) ``` The docstring also explicitly states: "The positional NAME takes precedence over any name field in the config file." This means: 1. Users must supply a NAME positional arg that the spec does not define 2. The CLI name overrides the config file's name field 3. The command signature `agents actor add <NAME> --config <FILE>` does not match spec ## Steps to Reproduce ```bash # Spec-compliant usage (no NAME arg) — fails with current implementation: agents actor add --config ./actors/reviewer.yaml # Error: Missing argument 'NAME' # Non-spec usage required by current implementation: agents actor add local/reviewer --config ./actors/reviewer.yaml ``` Note: Issue #6752 captures related unexpected override behavior but the core spec violation is that the positional NAME argument should not exist at all — the spec mandates config-file-only registration. ## Acceptance Criteria - [ ] `agents actor add` accepts only `--config|-c <FILE>` as the required argument (no positional NAME) - [ ] The actor name is determined exclusively by the `name` field in the YAML config file - [ ] Running `agents actor add --config ./actors/reviewer.yaml` works without a positional NAME argument ## Subtasks - [ ] Remove the positional `NAME` argument from `add()` in `src/cleveragents/cli/commands/actor.py` - [ ] Update command to read actor name from config blob `name` field only - [ ] Update tests to match new spec-compliant signature - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when all subtasks are checked off, the implementation matches the spec signature, and a PR is reviewed and merged. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-10 02:05:49 +00:00
HAL9000 self-assigned this 2026-04-10 06:07:15 +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#6781
No description provided.