UAT: agents actor context list, show, and clear subcommands missing from actor_context.py #3794

Open
opened 2026-04-06 06:22:46 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/actor-context-list-show-clear-commands
  • Commit Message: feat(cli): implement actor context list, show, and clear subcommands in actor_context.py
  • Milestone: (none — see backlog note below)
  • Parent Epic: #392

Backlog note: This issue was discovered during autonomous operation
on milestone v3.6.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Background

The specification defines three subcommands for agents actor context that are not implemented in src/cleveragents/cli/commands/actor_context.py:

  1. agents actor context list [<REGEX>] — List files stored in an actor context
  2. agents actor context show <NAME> — Show content of a file in an actor context
  3. agents actor context clear [--yes|-y] (--all|-a|<NAME>) — Clear context data

What Was Tested

Code-level analysis of src/cleveragents/cli/commands/actor_context.py

Expected Behavior (from spec)

The actor_context.py module should define @app.command("list"), @app.command("show"), and @app.command("clear") commands per specification sections:

  • §agents actor context list (line 5863)
  • §agents actor context show (line 5978)
  • §agents actor context clear (line 6256)

The spec also shows these in the command summary at lines 284–288:

agents actor context list [<REGEX>]
agents actor context show <NAME>
agents actor context clear [--yes|-y] (--all|-a|<NAME>)

Actual Behavior

actor_context.py only defines three commands:

  • @app.command("remove") (line 99)
  • @app.command("export") (line 234)
  • @app.command("import") (line 333)

The list, show, and clear commands are completely absent.

Code Location

src/cleveragents/cli/commands/actor_context.py

Steps to Reproduce

  1. Run agents actor context list → command not found
  2. Run agents actor context show <name> → command not found
  3. Run agents actor context clear <name> → command not found

Note on Legacy Module

The legacy context.py module has list, show, and clear commands but these are for the deprecated top-level agents context command group, not for agents actor context. The new actor_context.py module must implement these independently.

Subtasks

  • Implement @app.command("list") in actor_context.py — accepts optional <REGEX> argument to filter listed files; outputs a table of files stored in the actor context
  • Implement @app.command("show") in actor_context.py — accepts required <NAME> argument; outputs the content of the named file in the actor context
  • Implement @app.command("clear") in actor_context.py — accepts --yes/-y flag and mutually exclusive --all/-a or <NAME> argument; prompts for confirmation unless --yes is passed
  • Wire all three commands through the appropriate service/repository layer (consistent with existing remove, export, import commands)
  • Add Behave (BDD) unit test scenarios for each new command covering: happy path, missing actor, invalid name, regex filtering (for list), confirmation prompt bypass (for clear)
  • Add Robot Framework integration tests for agents actor context list, show, and clear
  • Run nox -e typecheck — must pass with zero Pyright errors
  • Run nox -e unit_tests — must pass
  • Run nox (all default sessions) — must pass
  • Verify coverage ≥ 97% via nox -e coverage_report

Definition of Done

  • agents actor context list [<REGEX>] is implemented and lists files in the actor context, with optional regex filtering
  • agents actor context show <NAME> is implemented and displays the content of the named context file
  • agents actor context clear [--yes|-y] (--all|-a|<NAME>) is implemented and clears context data with confirmation guard
  • All three commands are covered by Behave unit tests and Robot Framework integration tests
  • nox -e typecheck passes with zero errors (no # type: ignore suppressions)
  • All nox stages pass
  • Coverage ≥ 97%
  • 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 details
  • 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

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

## Metadata - **Branch**: `fix/actor-context-list-show-clear-commands` - **Commit Message**: `feat(cli): implement actor context list, show, and clear subcommands in actor_context.py` - **Milestone**: *(none — see backlog note below)* - **Parent Epic**: #392 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.6.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Background The specification defines three subcommands for `agents actor context` that are **not implemented** in `src/cleveragents/cli/commands/actor_context.py`: 1. `agents actor context list [<REGEX>]` — List files stored in an actor context 2. `agents actor context show <NAME>` — Show content of a file in an actor context 3. `agents actor context clear [--yes|-y] (--all|-a|<NAME>)` — Clear context data ## What Was Tested Code-level analysis of `src/cleveragents/cli/commands/actor_context.py` ## Expected Behavior (from spec) The `actor_context.py` module should define `@app.command("list")`, `@app.command("show")`, and `@app.command("clear")` commands per specification sections: - §agents actor context list (line 5863) - §agents actor context show (line 5978) - §agents actor context clear (line 6256) The spec also shows these in the command summary at lines 284–288: ``` agents actor context list [<REGEX>] agents actor context show <NAME> agents actor context clear [--yes|-y] (--all|-a|<NAME>) ``` ## Actual Behavior `actor_context.py` only defines three commands: - `@app.command("remove")` (line 99) - `@app.command("export")` (line 234) - `@app.command("import")` (line 333) The `list`, `show`, and `clear` commands are completely absent. ## Code Location `src/cleveragents/cli/commands/actor_context.py` ## Steps to Reproduce 1. Run `agents actor context list` → command not found 2. Run `agents actor context show <name>` → command not found 3. Run `agents actor context clear <name>` → command not found ## Note on Legacy Module The legacy `context.py` module has `list`, `show`, and `clear` commands but these are for the deprecated top-level `agents context` command group, not for `agents actor context`. The new `actor_context.py` module must implement these independently. ## Subtasks - [ ] Implement `@app.command("list")` in `actor_context.py` — accepts optional `<REGEX>` argument to filter listed files; outputs a table of files stored in the actor context - [ ] Implement `@app.command("show")` in `actor_context.py` — accepts required `<NAME>` argument; outputs the content of the named file in the actor context - [ ] Implement `@app.command("clear")` in `actor_context.py` — accepts `--yes/-y` flag and mutually exclusive `--all/-a` or `<NAME>` argument; prompts for confirmation unless `--yes` is passed - [ ] Wire all three commands through the appropriate service/repository layer (consistent with existing `remove`, `export`, `import` commands) - [ ] Add Behave (BDD) unit test scenarios for each new command covering: happy path, missing actor, invalid name, regex filtering (for `list`), confirmation prompt bypass (for `clear`) - [ ] Add Robot Framework integration tests for `agents actor context list`, `show`, and `clear` - [ ] Run `nox -e typecheck` — must pass with zero Pyright errors - [ ] Run `nox -e unit_tests` — must pass - [ ] Run `nox` (all default sessions) — must pass - [ ] Verify coverage ≥ 97% via `nox -e coverage_report` ## Definition of Done - [ ] `agents actor context list [<REGEX>]` is implemented and lists files in the actor context, with optional regex filtering - [ ] `agents actor context show <NAME>` is implemented and displays the content of the named context file - [ ] `agents actor context clear [--yes|-y] (--all|-a|<NAME>)` is implemented and clears context data with confirmation guard - [ ] All three commands are covered by Behave unit tests and Robot Framework integration tests - [ ] `nox -e typecheck` passes with zero errors (no `# type: ignore` suppressions) - [ ] All nox stages pass - [ ] Coverage ≥ 97% - [ ] 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 details - [ ] 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 --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
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.

Blocks
#392 Epic: Actor YAML & Compiler
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3794
No description provided.