UAT: agents resource type add --update is not implemented (silently aborts instead of updating) #4548

Open
opened 2026-04-08 14:23:39 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: Resource management — agents resource type add --update

Expected Behavior (from spec)

The spec (section agents resource type add, line ~10583) defines --update as a flag that allows re-registering an existing resource type:

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

When --update is provided and the type already exists, the command should update the existing type definition with the new configuration.

Actual Behavior (from code)

In src/cleveragents/cli/commands/resource.py, the type_add command has a comment indicating --update is not fully implemented:

# Lines ~240-245 in resource.py
if update:
    try:
        spec = service.register_type(config)
    except ValidationError as exc:
        if "already exists" in str(exc):
            console.print(
                "[yellow]Resource type already exists. "
                "Update mode is not yet fully supported.[/yellow]"
            )
            raise typer.Abort() from exc
        raise

When --update is passed and the type already exists, the command:

  1. Prints a yellow warning: "Resource type already exists. Update mode is not yet fully supported."
  2. Raises typer.Abort() — silently exits without updating

Impact

  • Users cannot update existing custom resource type definitions
  • The --update flag is documented in the spec but does nothing useful
  • This prevents iterative development of custom resource types (users must remove then add instead)
  • The same issue exists for resource add --update which also directly manipulates the DB

Code Location

  • src/cleveragents/cli/commands/resource.pytype_add() function (lines ~230-250)
  • src/cleveragents/application/services/resource_registry_service.pyregister_type() method (missing update logic)

Steps to Reproduce (Code Analysis)

  1. Open src/cleveragents/cli/commands/resource.py
  2. Find the type_add function
  3. Observe the if update: branch — it catches ValidationError with "already exists" and aborts
  4. The --update flag is effectively a no-op when the type exists

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

## Bug Report **Feature Area:** Resource management — `agents resource type add --update` ### Expected Behavior (from spec) The spec (section `agents resource type add`, line ~10583) defines `--update` as a flag that allows re-registering an existing resource type: ``` agents resource type add --config|-c <FILE> [--update] ``` When `--update` is provided and the type already exists, the command should update the existing type definition with the new configuration. ### Actual Behavior (from code) In `src/cleveragents/cli/commands/resource.py`, the `type_add` command has a comment indicating `--update` is not fully implemented: ```python # Lines ~240-245 in resource.py if update: try: spec = service.register_type(config) except ValidationError as exc: if "already exists" in str(exc): console.print( "[yellow]Resource type already exists. " "Update mode is not yet fully supported.[/yellow]" ) raise typer.Abort() from exc raise ``` When `--update` is passed and the type already exists, the command: 1. Prints a yellow warning: "Resource type already exists. Update mode is not yet fully supported." 2. Raises `typer.Abort()` — silently exits without updating ### Impact - Users cannot update existing custom resource type definitions - The `--update` flag is documented in the spec but does nothing useful - This prevents iterative development of custom resource types (users must `remove` then `add` instead) - The same issue exists for `resource add --update` which also directly manipulates the DB ### Code Location - `src/cleveragents/cli/commands/resource.py` — `type_add()` function (lines ~230-250) - `src/cleveragents/application/services/resource_registry_service.py` — `register_type()` method (missing update logic) ### Steps to Reproduce (Code Analysis) 1. Open `src/cleveragents/cli/commands/resource.py` 2. Find the `type_add` function 3. Observe the `if update:` branch — it catches `ValidationError` with "already exists" and aborts 4. The `--update` flag is effectively a no-op when the type exists --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 17:41:43 +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#4548
No description provided.