UAT: agents actor context list missing optional [<REGEX>] filter parameter #3126

Open
opened 2026-04-05 06:37:41 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/actor-context-list/regex-filter
  • Commit Message: fix(cli): add optional REGEX filter argument to agents actor context list command
  • Milestone: (none — backlog)
  • Parent Epic: #396

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

What was tested

The agents actor context list command was tested against the specification in docs/specification.md.

Expected behavior (from spec)

Per docs/specification.md, the agents actor context list command signature is:

agents actor context list [<REGEX>]

With argument:

  • [REGEX]: Optional regex filter for context names.

The command should accept an optional positional regex argument to filter the list of named contexts displayed.

Actual behavior (from code analysis)

The implementation in src/cleveragents/cli/commands/context.py (context_list function) does not accept a [<REGEX>] argument. The current function signature is:

@app.command("list")
def context_list(
    context_dir: Annotated[
        Path | None,
        typer.Option(
            "--context-dir",
            help="Directory where contexts are stored",
            resolve_path=True,
        ),
    ] = None,
) -> None:

The only parameter is --context-dir (an option, not a positional argument). There is no regex filter parameter at all.

Code location

  • File: src/cleveragents/cli/commands/context.py
  • Function: context_list
  • The command is registered as agents actor context list via main.py which adds context.app to actor.app under the name "context"

Steps to reproduce

  1. Run agents actor context list --help
  2. Observe that there is no [REGEX] positional argument listed
  3. Try agents actor context list "docs.*" — this will fail or be silently ignored

Impact

Users cannot filter the list of named contexts using a regex pattern, which is a spec-required feature for the agents actor context list command. This affects usability when users have many named contexts.

Subtasks

  • Add optional regex: str | None positional argument to context_list in src/cleveragents/cli/commands/context.py
  • Apply re.search(regex, name) filtering logic when regex is provided (filter out non-matching context names)
  • Add typer.Argument annotation with appropriate help text (e.g., "Optional regex to filter context names")
  • Write BDD Gherkin scenarios in features/ covering: no filter (all contexts listed), matching regex (only matching contexts listed), non-matching regex (empty list), invalid regex (graceful error)
  • Update Robot Framework integration tests in robot/ to cover the [REGEX] argument
  • Verify agents actor context list --help output shows the [REGEX] argument
  • Ensure all type annotations are explicit and pass nox -e typecheck

Definition of Done

  • agents actor context list [<REGEX>] accepts an optional positional regex argument
  • When REGEX is provided, only context names matching the pattern are displayed
  • When REGEX is omitted, all contexts are displayed (existing behaviour preserved)
  • Invalid regex patterns produce a clear, user-friendly error message
  • All BDD scenarios pass (nox -e unit_tests)
  • Integration tests pass (nox -e integration_tests)
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/actor-context-list/regex-filter` - **Commit Message**: `fix(cli): add optional REGEX filter argument to agents actor context list command` - **Milestone**: *(none — backlog)* - **Parent Epic**: #396 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.4.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## What was tested The `agents actor context list` command was tested against the specification in `docs/specification.md`. ## Expected behavior (from spec) Per `docs/specification.md`, the `agents actor context list` command signature is: ``` agents actor context list [<REGEX>] ``` With argument: - `[REGEX]`: Optional regex filter for context names. The command should accept an optional positional regex argument to filter the list of named contexts displayed. ## Actual behavior (from code analysis) The implementation in `src/cleveragents/cli/commands/context.py` (`context_list` function) does **not** accept a `[<REGEX>]` argument. The current function signature is: ```python @app.command("list") def context_list( context_dir: Annotated[ Path | None, typer.Option( "--context-dir", help="Directory where contexts are stored", resolve_path=True, ), ] = None, ) -> None: ``` The only parameter is `--context-dir` (an option, not a positional argument). There is no regex filter parameter at all. ## Code location - **File**: `src/cleveragents/cli/commands/context.py` - **Function**: `context_list` - The command is registered as `agents actor context list` via `main.py` which adds `context.app` to `actor.app` under the name `"context"` ## Steps to reproduce 1. Run `agents actor context list --help` 2. Observe that there is no `[REGEX]` positional argument listed 3. Try `agents actor context list "docs.*"` — this will fail or be silently ignored ## Impact Users cannot filter the list of named contexts using a regex pattern, which is a spec-required feature for the `agents actor context list` command. This affects usability when users have many named contexts. ## Subtasks - [ ] Add optional `regex: str | None` positional argument to `context_list` in `src/cleveragents/cli/commands/context.py` - [ ] Apply `re.search(regex, name)` filtering logic when `regex` is provided (filter out non-matching context names) - [ ] Add `typer.Argument` annotation with appropriate help text (e.g., `"Optional regex to filter context names"`) - [ ] Write BDD Gherkin scenarios in `features/` covering: no filter (all contexts listed), matching regex (only matching contexts listed), non-matching regex (empty list), invalid regex (graceful error) - [ ] Update Robot Framework integration tests in `robot/` to cover the `[REGEX]` argument - [ ] Verify `agents actor context list --help` output shows the `[REGEX]` argument - [ ] Ensure all type annotations are explicit and pass `nox -e typecheck` ## Definition of Done - [ ] `agents actor context list [<REGEX>]` accepts an optional positional regex argument - [ ] When `REGEX` is provided, only context names matching the pattern are displayed - [ ] When `REGEX` is omitted, all contexts are displayed (existing behaviour preserved) - [ ] Invalid regex patterns produce a clear, user-friendly error message - [ ] All BDD scenarios pass (`nox -e unit_tests`) - [ ] Integration tests pass (`nox -e integration_tests`) - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.6.0 milestone 2026-04-05 06:42:55 +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.

Blocks
#396 Epic: ACMS Context Pipeline
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3126
No description provided.