UAT: agents resource type add rich output uses single combined panel instead of spec-required separate panels, and --update flag not implemented #1945

Open
opened 2026-04-03 00:20:05 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/resource-type-add-rich-output-panels-and-update-flag
  • Commit Message: fix(cli): correct agents resource type add rich output to use four separate panels and implement --update flag
  • Milestone: v3.5.0
  • Parent Epic: #936

Background and Context

UAT testing of the agents resource type add command revealed two spec compliance failures in src/cleveragents/cli/commands/resource.py:

  1. The rich output format renders a single combined panel instead of the four separate panels required by the specification.
  2. The --update flag is not implemented — when a type already exists and --update is passed, the command aborts with an unsupported message instead of overwriting the existing type.

These failures mean the command does not conform to the specification's defined output contract, breaking the Output Rendering Pipeline Integration effort tracked by the parent Epic.

What Was Tested

The agents resource type add command's rich output format and --update flag behavior in src/cleveragents/cli/commands/resource.py.

Expected Behavior (from spec)

Per docs/specification.md lines 9880–9990 (agents resource type add section), the rich output should show four separate panels:

╭─ Resource Type ────────────────────╮
│ Name: local/svn                    │
│ Physical/Virtual: physical         │
│ User Addable: yes                  │
│ Registered: 2026-02-09 10:15       │
╰────────────────────────────────────╯

╭─ CLI Arguments ────────────────────────╮
│ Argument      Required  Description    │
│ ────────────  ────────  ─────────────  │
│ --url         yes       Repository URL │
│ --checkout    no        Local checkout │
╰────────────────────────────────────────╯

╭─ Child Types ──────────────────────────╮
│ Auto-discover: svn-revision, svn-file  │
│ Manual link: fs-mount                  │
╰────────────────────────────────────────╯

╭─ Sandbox ──────────────────────╮
│ Strategy: copy_on_write        │
│ Handler: SVNHandler (custom)   │
╰────────────────────────────────╯

✓ OK Resource type registered
ℹ New subcommand available: agents resource add local/svn

For --update: The spec says "If the type name already exists, overwrite it."

Actual Behavior (from code)

In src/cleveragents/cli/commands/resource.py:

  1. Output format: Shows Registered resource type: <name> followed by a single combined panel via _print_type_panel() that includes all info in one panel with different field names (e.g., "Inheritance Chain", "Built-in", "User-addable") — not the four separate spec-required panels.
  2. --update flag: Not implemented — when --update is passed and the type already exists, shows "Resource type already exists. Update mode is not yet fully supported." and aborts (lines 207–214).
  3. Missing: "✓ OK Resource type registered" status message.
  4. Missing: "ℹ New subcommand available: agents resource add <name>" info message.

Code Location

src/cleveragents/cli/commands/resource.py:

  • type_add() function, lines 200–240
  • _print_type_panel() function, lines 413–480

Spec References

  • docs/specification.md lines 9880–9990 (agents resource type add section)
  • Lines 9897–9930: Rich output example with four separate panels

Acceptance Criteria

  • agents resource type add rich output renders exactly four separate panels: Resource Type, CLI Arguments, Child Types, and Sandbox — matching the spec layout
  • Each panel uses the correct field names and structure as defined in the spec
  • "✓ OK Resource type registered" status message is displayed after the panels
  • "ℹ New subcommand available: agents resource add <name>" info message is displayed
  • --update flag is fully implemented: when the type already exists and --update is passed, the existing type is overwritten without error
  • --update flag without an existing type behaves identically to a normal add
  • All other output formats (plain, json, yaml, color, table) are unaffected

Subtasks

  • Refactor _print_type_panel() (or replace it) to render four separate panels: Resource Type, CLI Arguments, Child Types, Sandbox — matching spec layout and field names
  • Add "✓ OK Resource type registered" status message output after panels
  • Add "ℹ New subcommand available: agents resource add <name>" info message output
  • Implement --update flag logic in type_add(): if type exists and --update is set, overwrite; if type exists and --update is not set, error; if type does not exist, proceed normally
  • Tests (Behave): Add/update scenarios for agents resource type add rich output with four separate panels
  • Tests (Behave): Add scenarios for --update flag — existing type overwrite, missing type with --update, duplicate without --update
  • Tests (Robot): Add/update integration tests for agents resource type add output format and --update behaviour
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • agents resource type add rich output renders four separate panels exactly matching the spec (lines 9897–9930).
  • The --update flag correctly overwrites an existing resource type.
  • Both missing status/info messages are present in rich output.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/resource-type-add-rich-output-panels-and-update-flag` - **Commit Message**: `fix(cli): correct agents resource type add rich output to use four separate panels and implement --update flag` - **Milestone**: v3.5.0 - **Parent Epic**: #936 ## Background and Context UAT testing of the `agents resource type add` command revealed two spec compliance failures in `src/cleveragents/cli/commands/resource.py`: 1. The rich output format renders a single combined panel instead of the four separate panels required by the specification. 2. The `--update` flag is not implemented — when a type already exists and `--update` is passed, the command aborts with an unsupported message instead of overwriting the existing type. These failures mean the command does not conform to the specification's defined output contract, breaking the Output Rendering Pipeline Integration effort tracked by the parent Epic. ## What Was Tested The `agents resource type add` command's rich output format and `--update` flag behavior in `src/cleveragents/cli/commands/resource.py`. ## Expected Behavior (from spec) Per `docs/specification.md` lines 9880–9990 (agents resource type add section), the rich output should show **four separate panels**: ``` ╭─ Resource Type ────────────────────╮ │ Name: local/svn │ │ Physical/Virtual: physical │ │ User Addable: yes │ │ Registered: 2026-02-09 10:15 │ ╰────────────────────────────────────╯ ╭─ CLI Arguments ────────────────────────╮ │ Argument Required Description │ │ ──────────── ──────── ───────────── │ │ --url yes Repository URL │ │ --checkout no Local checkout │ ╰────────────────────────────────────────╯ ╭─ Child Types ──────────────────────────╮ │ Auto-discover: svn-revision, svn-file │ │ Manual link: fs-mount │ ╰────────────────────────────────────────╯ ╭─ Sandbox ──────────────────────╮ │ Strategy: copy_on_write │ │ Handler: SVNHandler (custom) │ ╰────────────────────────────────╯ ✓ OK Resource type registered ℹ New subcommand available: agents resource add local/svn ``` For `--update`: The spec says "If the type name already exists, overwrite it." ## Actual Behavior (from code) In `src/cleveragents/cli/commands/resource.py`: 1. **Output format**: Shows `Registered resource type: <name>` followed by a single combined panel via `_print_type_panel()` that includes all info in one panel with different field names (e.g., "Inheritance Chain", "Built-in", "User-addable") — not the four separate spec-required panels. 2. **`--update` flag**: Not implemented — when `--update` is passed and the type already exists, shows "Resource type already exists. Update mode is not yet fully supported." and aborts (lines 207–214). 3. **Missing**: "✓ OK Resource type registered" status message. 4. **Missing**: "ℹ New subcommand available: agents resource add \<name\>" info message. ## Code Location `src/cleveragents/cli/commands/resource.py`: - `type_add()` function, lines 200–240 - `_print_type_panel()` function, lines 413–480 ## Spec References - `docs/specification.md` lines 9880–9990 (agents resource type add section) - Lines 9897–9930: Rich output example with four separate panels ## Acceptance Criteria - [ ] `agents resource type add` rich output renders exactly four separate panels: **Resource Type**, **CLI Arguments**, **Child Types**, and **Sandbox** — matching the spec layout - [ ] Each panel uses the correct field names and structure as defined in the spec - [ ] "✓ OK Resource type registered" status message is displayed after the panels - [ ] "ℹ New subcommand available: agents resource add \<name\>" info message is displayed - [ ] `--update` flag is fully implemented: when the type already exists and `--update` is passed, the existing type is overwritten without error - [ ] `--update` flag without an existing type behaves identically to a normal add - [ ] All other output formats (plain, json, yaml, color, table) are unaffected ## Subtasks - [ ] Refactor `_print_type_panel()` (or replace it) to render four separate panels: Resource Type, CLI Arguments, Child Types, Sandbox — matching spec layout and field names - [ ] Add "✓ OK Resource type registered" status message output after panels - [ ] Add "ℹ New subcommand available: agents resource add \<name\>" info message output - [ ] Implement `--update` flag logic in `type_add()`: if type exists and `--update` is set, overwrite; if type exists and `--update` is not set, error; if type does not exist, proceed normally - [ ] Tests (Behave): Add/update scenarios for `agents resource type add` rich output with four separate panels - [ ] Tests (Behave): Add scenarios for `--update` flag — existing type overwrite, missing type with `--update`, duplicate without `--update` - [ ] Tests (Robot): Add/update integration tests for `agents resource type add` output format and `--update` behaviour - [ ] Verify coverage >=97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - `agents resource type add` rich output renders four separate panels exactly matching the spec (lines 9897–9930). - The `--update` flag correctly overwrites an existing resource type. - Both missing status/info messages are present in rich output. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.5.0 milestone 2026-04-03 00:20:32 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: MoSCoW/Should Have — bug or error handling improvement.

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: MoSCoW/Should Have — bug or error handling improvement. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-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.

Reference
cleveragents/cleveragents-core#1945
No description provided.