UAT: agents project clean is an unimplemented stub — outputs "not yet implemented" and aborts instead of cleaning project cache #2082

Open
opened 2026-04-03 03:54:39 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/project-clean-stub-implementation
  • Commit Message: fix(cli): implement agents project clean command — remove stub and add cache/temp file cleanup
  • Milestone: v3.7.0
  • Parent Epic: #936

Bug Report

What Was Tested

Code analysis of src/cleveragents/cli/commands/project.py — the clean function at approximately lines 519–526.

Expected Behavior (from spec)

agents project clean [--yes/-y] should clean project cache and temporary files. The --yes/-y flag should skip the confirmation prompt before performing the clean operation.

Actual Behavior

The command immediately outputs:

Project cleaning not yet implemented.

And then aborts with a non-zero exit code. The --yes flag is accepted by the argument parser but has no effect since the command aborts immediately.

Code Location

src/cleveragents/cli/commands/project.pyclean function (approximately lines 519–526):

@app.command(name="clean")
def clean(
    confirm: Annotated[
        bool, typer.Option("--yes", "-y", help="Skip confirmation")
    ] = False,
) -> None:
    """Clean project cache and temporary files."""
    console.print("[yellow]Project cleaning not yet implemented.[/yellow]")
    raise typer.Abort()

Steps to Reproduce

  1. Initialize a project: agents project init myproject --yes
  2. Run: agents project clean --yes
  3. Expected: Project cache and temporary files are cleaned
  4. Actual: Prints "Project cleaning not yet implemented." and aborts

Severity

Medium — the command is advertised in help text but completely non-functional, which is misleading to users.

Subtasks

  • Remove the stub body (console.print + raise typer.Abort()) from the clean function in src/cleveragents/cli/commands/project.py
  • Implement project cache and temporary file discovery logic (identify what constitutes "cache" and "temp files" per the spec)
  • Implement the confirmation prompt flow (prompt user unless --yes/-y is passed)
  • Implement the actual deletion/cleanup of discovered cache and temporary files
  • Emit appropriate success/failure output via the OutputSession framework (spec §Output Rendering Framework)
  • Write BDD unit test scenarios in features/ covering: clean with --yes, clean with confirmation accepted, clean with confirmation declined, clean on a project with no cache
  • Write Robot Framework integration test in robot/ covering the end-to-end agents project clean flow
  • Verify nox -e typecheck passes (Pyright, no # type: ignore)
  • Verify nox -e lint passes
  • Verify nox -e unit_tests passes
  • Verify nox -e coverage_report shows coverage ≥ 97%

Definition of Done

  • agents project clean successfully cleans project cache and temporary files
  • agents project clean --yes (and -y) skips the confirmation prompt
  • agents project clean without --yes prompts for confirmation before cleaning
  • Command output conforms to the spec output envelope {command, status, exit_code, data, timing, messages}
  • No stub text ("not yet implemented") remains in the implementation
  • BDD unit test scenarios written and passing in features/
  • Robot Framework integration test written and passing in robot/
  • All nox stages pass (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e integration_tests, nox -e coverage_report)
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/project-clean-stub-implementation` - **Commit Message**: `fix(cli): implement agents project clean command — remove stub and add cache/temp file cleanup` - **Milestone**: v3.7.0 - **Parent Epic**: #936 ## Bug Report ### What Was Tested Code analysis of `src/cleveragents/cli/commands/project.py` — the `clean` function at approximately lines 519–526. ### Expected Behavior (from spec) `agents project clean [--yes/-y]` should clean project cache and temporary files. The `--yes/-y` flag should skip the confirmation prompt before performing the clean operation. ### Actual Behavior The command immediately outputs: ``` Project cleaning not yet implemented. ``` And then aborts with a non-zero exit code. The `--yes` flag is accepted by the argument parser but has no effect since the command aborts immediately. ### Code Location `src/cleveragents/cli/commands/project.py` — `clean` function (approximately lines 519–526): ```python @app.command(name="clean") def clean( confirm: Annotated[ bool, typer.Option("--yes", "-y", help="Skip confirmation") ] = False, ) -> None: """Clean project cache and temporary files.""" console.print("[yellow]Project cleaning not yet implemented.[/yellow]") raise typer.Abort() ``` ### Steps to Reproduce 1. Initialize a project: `agents project init myproject --yes` 2. Run: `agents project clean --yes` 3. **Expected**: Project cache and temporary files are cleaned 4. **Actual**: Prints `"Project cleaning not yet implemented."` and aborts ### Severity Medium — the command is advertised in help text but completely non-functional, which is misleading to users. ## Subtasks - [ ] Remove the stub body (`console.print` + `raise typer.Abort()`) from the `clean` function in `src/cleveragents/cli/commands/project.py` - [ ] Implement project cache and temporary file discovery logic (identify what constitutes "cache" and "temp files" per the spec) - [ ] Implement the confirmation prompt flow (prompt user unless `--yes/-y` is passed) - [ ] Implement the actual deletion/cleanup of discovered cache and temporary files - [ ] Emit appropriate success/failure output via the OutputSession framework (spec §Output Rendering Framework) - [ ] Write BDD unit test scenarios in `features/` covering: clean with `--yes`, clean with confirmation accepted, clean with confirmation declined, clean on a project with no cache - [ ] Write Robot Framework integration test in `robot/` covering the end-to-end `agents project clean` flow - [ ] Verify `nox -e typecheck` passes (Pyright, no `# type: ignore`) - [ ] Verify `nox -e lint` passes - [ ] Verify `nox -e unit_tests` passes - [ ] Verify `nox -e coverage_report` shows coverage ≥ 97% ## Definition of Done - [ ] `agents project clean` successfully cleans project cache and temporary files - [ ] `agents project clean --yes` (and `-y`) skips the confirmation prompt - [ ] `agents project clean` without `--yes` prompts for confirmation before cleaning - [ ] Command output conforms to the spec output envelope `{command, status, exit_code, data, timing, messages}` - [ ] No stub text ("not yet implemented") remains in the implementation - [ ] BDD unit test scenarios written and passing in `features/` - [ ] Robot Framework integration test written and passing in `robot/` - [ ] All nox stages pass (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e integration_tests`, `nox -e coverage_report`) - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.7.0 milestone 2026-04-03 03:54:43 +00:00
freemo self-assigned this 2026-04-03 16:58:09 +00:00
Author
Owner

MoSCoW classification: Should Have

Rationale: This issue addresses a spec requirement or important quality improvement. It should be included in the milestone if possible.


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

MoSCoW classification: **Should Have** Rationale: This issue addresses a spec requirement or important quality improvement. It should be included in the milestone if possible. --- **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#2082
No description provided.