UAT: agents actor context clear missing --all/-a flag — spec requires (--all|-a|<NAME>) but implementation only accepts optional [NAME] #6503

Open
opened 2026-04-09 21:11:15 +00:00 by HAL9000 · 0 comments
Owner

Summary

The spec defines agents actor context clear [--yes|-y] (--all|-a|<NAME>) where either --all/-a or a <NAME> is required. The implementation only accepts an optional [NAME] argument with no --all/-a flag. Users cannot clear all contexts at once using --all.

Spec Reference

docs/specification.md line 288:

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

docs/specification.md lines 6256–6267:

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

Purpose: Clear all files from a context but keep the context itself.

Arguments:
- <NAME>: Context name (positional argument). Use --all/-a to target all contexts.
- --all, -a: Target all contexts instead of a named one.
- --yes, -y: Skip confirmation.

Code Location

src/cleveragents/cli/commands/context.py, lines 730–800 (context_clear):

@app.command("clear")
def context_clear(
    name: Annotated[
        str | None,
        typer.Argument(help="Name of the context to clear"),
    ] = None,
    yes: Annotated[bool, typer.Option("--yes", "-y", ...)] = False,
    context_dir: Annotated[Path | None, typer.Option("--context-dir", ...)] = None,
) -> None:
    """Clear all files from a named context or the current plan's context."""
    # No --all/-a flag

The --all/-a flag is completely absent.

Steps to Reproduce

agents actor context clear --help
# Shows: [NAME] argument, --yes/-y, --context-dir
# Missing: --all/-a flag

agents actor context clear --all
# Error: Got unexpected extra argument (--all)

agents actor context clear -a
# Error: Got unexpected extra argument (-a)

Expected vs Actual

Expected Actual
Signature clear [--yes|-y] (--all|-a|\<NAME\>) clear [OPTIONS] [NAME]
--all/-a flag Clears all contexts Missing — error
<NAME> required Either --all or <NAME> must be provided <NAME> is optional (no enforcement)

Impact

Users cannot clear all contexts at once. The spec-required --all/-a flag is missing. The command also doesn't enforce that at least one of --all or <NAME> is provided, so agents actor context clear with no arguments silently does nothing or clears the current project context (wrong behavior).


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

## Summary The spec defines `agents actor context clear [--yes|-y] (--all|-a|<NAME>)` where either `--all/-a` or a `<NAME>` is required. The implementation only accepts an optional `[NAME]` argument with no `--all/-a` flag. Users cannot clear all contexts at once using `--all`. ## Spec Reference `docs/specification.md` line 288: ``` agents actor context clear [--yes|-y] (--all|-a|<NAME>) ``` `docs/specification.md` lines 6256–6267: ``` agents actor context clear [--yes|-y] (--all|-a|<NAME>) Purpose: Clear all files from a context but keep the context itself. Arguments: - <NAME>: Context name (positional argument). Use --all/-a to target all contexts. - --all, -a: Target all contexts instead of a named one. - --yes, -y: Skip confirmation. ``` ## Code Location `src/cleveragents/cli/commands/context.py`, lines 730–800 (`context_clear`): ```python @app.command("clear") def context_clear( name: Annotated[ str | None, typer.Argument(help="Name of the context to clear"), ] = None, yes: Annotated[bool, typer.Option("--yes", "-y", ...)] = False, context_dir: Annotated[Path | None, typer.Option("--context-dir", ...)] = None, ) -> None: """Clear all files from a named context or the current plan's context.""" # No --all/-a flag ``` The `--all/-a` flag is completely absent. ## Steps to Reproduce ```bash agents actor context clear --help # Shows: [NAME] argument, --yes/-y, --context-dir # Missing: --all/-a flag agents actor context clear --all # Error: Got unexpected extra argument (--all) agents actor context clear -a # Error: Got unexpected extra argument (-a) ``` ## Expected vs Actual | | Expected | Actual | |---|---|---| | Signature | `clear [--yes\|-y] (--all\|-a\|\<NAME\>)` | `clear [OPTIONS] [NAME]` | | `--all/-a` flag | Clears all contexts | Missing — error | | `<NAME>` required | Either `--all` or `<NAME>` must be provided | `<NAME>` is optional (no enforcement) | ## Impact Users cannot clear all contexts at once. The spec-required `--all/-a` flag is missing. The command also doesn't enforce that at least one of `--all` or `<NAME>` is provided, so `agents actor context clear` with no arguments silently does nothing or clears the current project context (wrong behavior). --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: 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.

Dependencies

No dependencies set.

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