UAT: agents lsp remove does not show or track broken actor references — spec requires warning about actors with lsp: bindings to the removed server #6835

Open
opened 2026-04-10 02:42:51 +00:00 by HAL9000 · 0 comments
Owner

Background and Context

UAT code analysis of src/cleveragents/cli/commands/lsp.py against docs/specification.md §agents lsp remove (lines ~8796–8898) reveals that agents lsp remove silently removes the LSP server without detecting or reporting actors that are bound to it via lsp: configuration.

Current Behavior

agents lsp remove local/pyright --yes simply calls registry.remove(name) and prints "LSP server removed". There is:

  • No lookup of actors that reference this LSP server
  • No warning panel shown in rich/plain output
  • No broken_references field in JSON output
  • The LspRegistry has no cross-reference tracking between LSP servers and actors

Expected Behavior (from spec §8800–8898)

The spec marks this as a Destructive Operation:

Running LSP server processes bound to the removed entry are terminated. Actor configurations referencing this server by name will fail at activation until resolved.

The rich output must show a "References" warning panel:

╭─ References ──────────────────────────────────────────────────────╮
│ Warning: This LSP server is referenced by:                       │
│ - Actor: local/code-reviewer (lsp: [local/pyright])              │
│ - Actor: local/refactor-agent (lsp: [local/pyright])             │
│ These actor LSP bindings will fail until resolved.               │
╰──────────────────────────────────────────────────────────────────╯

The JSON output must include a broken_references list under data:

{
  "data": {
    "lsp_server_removed": { "name": "local/pyright", "languages": ["python"] },
    "broken_references": [
      { "type": "actor", "name": "local/code-reviewer" },
      { "type": "actor", "name": "local/refactor-agent" }
    ]
  },
  "messages": [
    "LSP server removed",
    "Warning: This LSP server is referenced by 2 actors. These actor LSP bindings will fail until resolved."
  ]
}

Affected Code

  • src/cleveragents/cli/commands/lsp.py: remove() function — no actor reference lookup, no warning output
  • src/cleveragents/lsp/registry.py: LspRegistry — no mechanism to enumerate actors bound to a given server

Steps to Reproduce

  1. Register an LSP server: agents lsp add --config lsp/pyright.yaml
  2. Register an actor that uses lsp: [local/pyright] in its YAML
  3. Run: agents lsp remove local/pyright --yes
  4. Observe: no warning shown about the actor that will be broken

Acceptance Criteria

  • agents lsp remove queries the actor registry for actors with lsp: bindings referencing the named server
  • When bound actors exist, a "References" warning panel/section is shown in rich/plain output
  • JSON output data.broken_references lists each affected actor
  • JSON messages includes the warning text describing the count of affected actors
  • When no actors reference the server, no warning panel is shown

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

## Background and Context UAT code analysis of `src/cleveragents/cli/commands/lsp.py` against `docs/specification.md` §agents lsp remove (lines ~8796–8898) reveals that `agents lsp remove` silently removes the LSP server without detecting or reporting actors that are bound to it via `lsp:` configuration. ## Current Behavior `agents lsp remove local/pyright --yes` simply calls `registry.remove(name)` and prints "LSP server removed". There is: - No lookup of actors that reference this LSP server - No warning panel shown in rich/plain output - No `broken_references` field in JSON output - The `LspRegistry` has no cross-reference tracking between LSP servers and actors ## Expected Behavior (from spec §8800–8898) The spec marks this as a **Destructive Operation**: > Running LSP server processes bound to the removed entry are terminated. Actor configurations referencing this server by name will fail at activation until resolved. The rich output must show a "References" warning panel: ``` ╭─ References ──────────────────────────────────────────────────────╮ │ Warning: This LSP server is referenced by: │ │ - Actor: local/code-reviewer (lsp: [local/pyright]) │ │ - Actor: local/refactor-agent (lsp: [local/pyright]) │ │ These actor LSP bindings will fail until resolved. │ ╰──────────────────────────────────────────────────────────────────╯ ``` The JSON output must include a `broken_references` list under `data`: ```json { "data": { "lsp_server_removed": { "name": "local/pyright", "languages": ["python"] }, "broken_references": [ { "type": "actor", "name": "local/code-reviewer" }, { "type": "actor", "name": "local/refactor-agent" } ] }, "messages": [ "LSP server removed", "Warning: This LSP server is referenced by 2 actors. These actor LSP bindings will fail until resolved." ] } ``` ## Affected Code - `src/cleveragents/cli/commands/lsp.py`: `remove()` function — no actor reference lookup, no warning output - `src/cleveragents/lsp/registry.py`: `LspRegistry` — no mechanism to enumerate actors bound to a given server ## Steps to Reproduce 1. Register an LSP server: `agents lsp add --config lsp/pyright.yaml` 2. Register an actor that uses `lsp: [local/pyright]` in its YAML 3. Run: `agents lsp remove local/pyright --yes` 4. Observe: no warning shown about the actor that will be broken ## Acceptance Criteria - `agents lsp remove` queries the actor registry for actors with `lsp:` bindings referencing the named server - When bound actors exist, a "References" warning panel/section is shown in rich/plain output - JSON output `data.broken_references` lists each affected actor - JSON `messages` includes the warning text describing the count of affected actors - When no actors reference the server, no warning panel is shown --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-10 02:43:24 +00:00
HAL9000 self-assigned this 2026-04-10 06:07:49 +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.

Dependencies

No dependencies set.

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