UAT: LSP resource handlers referenced in registry but not implemented — cleveragents.resource.handlers.lsp module missing #2913

Open
opened 2026-04-05 02:47:25 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: fix/lsp-resource-handler-module-missing
  • Commit Message: fix(resource): implement missing LSP resource handler module
  • Milestone: v3.6.0
  • Parent Epic: #824

Background

During UAT testing of the LSP Integration feature area, it was discovered that the LSP resource type definitions in src/cleveragents/application/services/_resource_registry_lsp.py reference three handler classes that do not exist:

  • cleveragents.resource.handlers.lsp:LSPServerHandler
  • cleveragents.resource.handlers.lsp:LSPWorkspaceHandler
  • cleveragents.resource.handlers.lsp:LSPDocumentHandler

The src/cleveragents/resource/handlers/ directory contains: __init__.py, _base.py, _devcontainer_internals.py, cloud.py, database.py, devcontainer.py, devcontainer_cleanup.py, devcontainer_health.py, devcontainer_lifecycle.py, discovery.py, fs_directory.py, git_checkout.py, protocol.py, resolver.py — but no lsp.py.

Any attempt to load or use the lsp-server, lsp-workspace, or lsp-document resource types will fail with an ImportError or ModuleNotFoundError at runtime, rendering the entire LSP resource type system non-functional.

Steps to Reproduce

  1. Import or use any of the three LSP resource types from the resource registry.
  2. The handler class resolution will fail with:
    ImportError: cannot import name 'LSPServerHandler' from 'cleveragents.resource.handlers.lsp'
    

Affected Code

Role Path
References (broken) src/cleveragents/application/services/_resource_registry_lsp.py
Missing implementation src/cleveragents/resource/handlers/lsp.py (does not exist)

Subtasks

  • Write a failing Behave scenario that demonstrates the ImportError when loading any of the three LSP resource types (TDD — test first)
  • Create src/cleveragents/resource/handlers/lsp.py with fully statically-typed implementations of LSPServerHandler, LSPWorkspaceHandler, and LSPDocumentHandler, each extending the appropriate base handler class
  • Implement LSPServerHandler: lifecycle management (start/stop/restart) bridging the resource system to the LSP runtime
  • Implement LSPWorkspaceHandler: workspace root registration and synchronisation with the LSP server
  • Implement LSPDocumentHandler: document open/close/change notifications forwarded to the LSP server
  • Export all three handler classes from src/cleveragents/resource/handlers/__init__.py
  • Verify _resource_registry_lsp.py handler references resolve correctly after the module is created
  • Add/update Robot Framework integration tests covering LSP resource type loading and handler dispatch
  • Ensure all three handler classes pass nox -e typecheck (Pyright) with no suppressions

Definition of Done

  • All subtasks above are completed
  • A failing Behave scenario existed before implementation (TDD)
  • LSPServerHandler, LSPWorkspaceHandler, and LSPDocumentHandler are fully implemented in src/cleveragents/resource/handlers/lsp.py
  • All handler classes are statically typed; no # type: ignore suppressions present
  • _resource_registry_lsp.py handler references resolve without ImportError at runtime
  • A commit is created with the exact first-line message: fix(resource): implement missing LSP resource handler module
  • The commit is pushed to branch fix/lsp-resource-handler-module-missing
  • A pull request is submitted, reviewed (≥2 approvals), and merged
  • All nox stages pass (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e integration_tests)
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/lsp-resource-handler-module-missing` - **Commit Message**: `fix(resource): implement missing LSP resource handler module` - **Milestone**: v3.6.0 - **Parent Epic**: #824 ## Background During UAT testing of the LSP Integration feature area, it was discovered that the LSP resource type definitions in `src/cleveragents/application/services/_resource_registry_lsp.py` reference three handler classes that do not exist: - `cleveragents.resource.handlers.lsp:LSPServerHandler` - `cleveragents.resource.handlers.lsp:LSPWorkspaceHandler` - `cleveragents.resource.handlers.lsp:LSPDocumentHandler` The `src/cleveragents/resource/handlers/` directory contains: `__init__.py`, `_base.py`, `_devcontainer_internals.py`, `cloud.py`, `database.py`, `devcontainer.py`, `devcontainer_cleanup.py`, `devcontainer_health.py`, `devcontainer_lifecycle.py`, `discovery.py`, `fs_directory.py`, `git_checkout.py`, `protocol.py`, `resolver.py` — but **no `lsp.py`**. Any attempt to load or use the `lsp-server`, `lsp-workspace`, or `lsp-document` resource types will fail with an `ImportError` or `ModuleNotFoundError` at runtime, rendering the entire LSP resource type system non-functional. ## Steps to Reproduce 1. Import or use any of the three LSP resource types from the resource registry. 2. The handler class resolution will fail with: ``` ImportError: cannot import name 'LSPServerHandler' from 'cleveragents.resource.handlers.lsp' ``` ## Affected Code | Role | Path | |------|------| | References (broken) | `src/cleveragents/application/services/_resource_registry_lsp.py` | | Missing implementation | `src/cleveragents/resource/handlers/lsp.py` *(does not exist)* | ## Subtasks - [ ] Write a failing Behave scenario that demonstrates the `ImportError` when loading any of the three LSP resource types (TDD — test first) - [ ] Create `src/cleveragents/resource/handlers/lsp.py` with fully statically-typed implementations of `LSPServerHandler`, `LSPWorkspaceHandler`, and `LSPDocumentHandler`, each extending the appropriate base handler class - [ ] Implement `LSPServerHandler`: lifecycle management (start/stop/restart) bridging the resource system to the LSP runtime - [ ] Implement `LSPWorkspaceHandler`: workspace root registration and synchronisation with the LSP server - [ ] Implement `LSPDocumentHandler`: document open/close/change notifications forwarded to the LSP server - [ ] Export all three handler classes from `src/cleveragents/resource/handlers/__init__.py` - [ ] Verify `_resource_registry_lsp.py` handler references resolve correctly after the module is created - [ ] Add/update Robot Framework integration tests covering LSP resource type loading and handler dispatch - [ ] Ensure all three handler classes pass `nox -e typecheck` (Pyright) with no suppressions ## Definition of Done - [ ] All subtasks above are completed - [ ] A failing Behave scenario existed before implementation (TDD) - [ ] `LSPServerHandler`, `LSPWorkspaceHandler`, and `LSPDocumentHandler` are fully implemented in `src/cleveragents/resource/handlers/lsp.py` - [ ] All handler classes are statically typed; no `# type: ignore` suppressions present - [ ] `_resource_registry_lsp.py` handler references resolve without `ImportError` at runtime - [ ] A commit is created with the exact first-line message: `fix(resource): implement missing LSP resource handler module` - [ ] The commit is pushed to branch `fix/lsp-resource-handler-module-missing` - [ ] A pull request is submitted, reviewed (≥2 approvals), and merged - [ ] All nox stages pass (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e integration_tests`) - [ ] 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 02:47:35 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High (confirmed)
  • MoSCoW: Should Have — LSP resource handlers referenced but not implemented

Valid UAT finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: High (confirmed) - **MoSCoW**: Should Have — LSP resource handlers referenced but not implemented Valid UAT finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Starting implementation on branch fix/lsp-resource-handler-module-missing.

Plan:

  1. Write failing Behave scenario (TDD — test first) demonstrating the ImportError
  2. Create src/cleveragents/resource/handlers/lsp.py with LSPServerHandler, LSPWorkspaceHandler, LSPDocumentHandler
  3. Export all three from __init__.py
  4. Add Robot Framework integration tests
  5. Run all quality gates

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

Starting implementation on branch `fix/lsp-resource-handler-module-missing`. **Plan:** 1. Write failing Behave scenario (TDD — test first) demonstrating the `ImportError` 2. Create `src/cleveragents/resource/handlers/lsp.py` with `LSPServerHandler`, `LSPWorkspaceHandler`, `LSPDocumentHandler` 3. Export all three from `__init__.py` 4. Add Robot Framework integration tests 5. Run all quality gates --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
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#2913
No description provided.