UAT: agents lsp remove does not warn about actors referencing the removed LSP server — spec requires warning with actor list #2513

Open
opened 2026-04-03 18:42:53 +00:00 by freemo · 1 comment
Owner

Summary

The agents lsp remove command does not check whether any registered actors reference the LSP server being removed, and does not display the spec-required warning listing affected actors. The spec explicitly requires this warning so users know which actor configurations will break after removal.

What Was Tested

  • Code analysis of src/cleveragents/cli/commands/lsp.py
  • Specification review of agents lsp remove output requirements

Expected Behavior (from spec)

Per docs/specification.md (lines 8822-8825, 8843-8846):

The spec shows the expected rich output for agents lsp remove when actors are bound:

╭─ LSP Server Removed ─────────────────────╮
│ Name: local/pyright                       │
│ Warning: This LSP server is referenced by:│
│   - actor1                                │
│   - actor2                                │
│ These actor LSP bindings will fail until  │
│ resolved.                                 │
╰───────────────────────────────────────────╯
✓ OK LSP server removed

The warning must:

  1. List all actors that reference the removed server by name
  2. Explain that their LSP bindings will fail at activation
  3. Be shown in all output formats (rich, plain, JSON, YAML)

Actual Behavior

In src/cleveragents/cli/commands/lsp.py (lines 195-237), the remove command:

@app.command("remove")
def remove(name, yes, fmt):
    registry = _get_registry()
    config = registry.get(name)
    if config is None:
        console.print(f"[red]LSP server not found:[/red] {name}")
        raise typer.Abort()
    # ... confirmation prompt ...
    registry.remove(name)
    # ← No actor reference check, no warning
    console.print(Panel(f"[bold]Name:[/bold] {name}", title="LSP Server Removed", expand=False))
    console.print("[green]OK[/green] LSP server removed")

No actor reference check is performed. No warning is shown.

Code Location

src/cleveragents/cli/commands/lsp.py lines 195-237: remove command — no actor reference check

Impact

Users who remove an LSP server that is referenced by actors will not be warned. Their actors will silently fail at activation with cryptic errors about missing LSP servers, with no indication of which actors are affected.

Metadata

  • Branch: fix/lsp-remove-actor-warning
  • Commit Message: fix(lsp): warn about actors referencing removed LSP server in agents lsp remove
  • Milestone: v3.6.0
  • Parent Epic: #824

Subtasks

  • Query the Actor Registry for actors that reference the LSP server being removed (by checking lsp binding fields in actor configs)
  • If any actors reference the server, display the warning panel listing affected actor names
  • Include the warning in all output formats (rich panel, plain text, JSON warnings field, YAML)
  • Add BDD test for the warning behavior when actors are bound
  • Add BDD test for the no-warning case when no actors are bound
  • Verify all CI checks pass

Definition of Done

  • agents lsp remove <name> shows a warning listing all actors that reference the removed server
  • Warning is shown in all output formats
  • BDD tests cover both the warning and no-warning cases
  • All CI checks pass
  • All nox stages pass
  • Coverage >= 97%

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

## Summary The `agents lsp remove` command does not check whether any registered actors reference the LSP server being removed, and does not display the spec-required warning listing affected actors. The spec explicitly requires this warning so users know which actor configurations will break after removal. ## What Was Tested - Code analysis of `src/cleveragents/cli/commands/lsp.py` - Specification review of `agents lsp remove` output requirements ## Expected Behavior (from spec) Per `docs/specification.md` (lines 8822-8825, 8843-8846): The spec shows the expected rich output for `agents lsp remove` when actors are bound: ``` ╭─ LSP Server Removed ─────────────────────╮ │ Name: local/pyright │ │ Warning: This LSP server is referenced by:│ │ - actor1 │ │ - actor2 │ │ These actor LSP bindings will fail until │ │ resolved. │ ╰───────────────────────────────────────────╯ ✓ OK LSP server removed ``` The warning must: 1. List all actors that reference the removed server by name 2. Explain that their LSP bindings will fail at activation 3. Be shown in all output formats (rich, plain, JSON, YAML) ## Actual Behavior In `src/cleveragents/cli/commands/lsp.py` (lines 195-237), the `remove` command: ```python @app.command("remove") def remove(name, yes, fmt): registry = _get_registry() config = registry.get(name) if config is None: console.print(f"[red]LSP server not found:[/red] {name}") raise typer.Abort() # ... confirmation prompt ... registry.remove(name) # ← No actor reference check, no warning console.print(Panel(f"[bold]Name:[/bold] {name}", title="LSP Server Removed", expand=False)) console.print("[green]OK[/green] LSP server removed") ``` No actor reference check is performed. No warning is shown. ## Code Location `src/cleveragents/cli/commands/lsp.py` lines 195-237: `remove` command — no actor reference check ## Impact Users who remove an LSP server that is referenced by actors will not be warned. Their actors will silently fail at activation with cryptic errors about missing LSP servers, with no indication of which actors are affected. ## Metadata - **Branch**: `fix/lsp-remove-actor-warning` - **Commit Message**: `fix(lsp): warn about actors referencing removed LSP server in agents lsp remove` - **Milestone**: v3.6.0 - **Parent Epic**: #824 ## Subtasks - [ ] Query the Actor Registry for actors that reference the LSP server being removed (by checking `lsp` binding fields in actor configs) - [ ] If any actors reference the server, display the warning panel listing affected actor names - [ ] Include the warning in all output formats (rich panel, plain text, JSON `warnings` field, YAML) - [ ] Add BDD test for the warning behavior when actors are bound - [ ] Add BDD test for the no-warning case when no actors are bound - [ ] Verify all CI checks pass ## Definition of Done - [ ] `agents lsp remove <name>` shows a warning listing all actors that reference the removed server - [ ] Warning is shown in all output formats - [ ] BDD tests cover both the warning and no-warning cases - [ ] All CI checks pass - [ ] 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-03 18:42:58 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have — Spec compliance or quality improvement that should be included in the milestone.

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have — Spec compliance or quality improvement that should be included in the milestone. --- **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.

Blocks
#824 Epic: LSP Functional Runtime
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2513
No description provided.