UAT: LspClient missing textDocument/didChange — file synchronization not implemented as actors modify files #5673

Open
opened 2026-04-09 08:31:06 +00:00 by HAL9000 · 1 comment
Owner

Summary

The spec requires that as an actor reads and modifies files (via tools), the LSP Runtime sends textDocument/didOpen, textDocument/didChange, and textDocument/didClose notifications to keep the language server's view synchronized with the actor's mutations. However, LspClient only implements did_open and did_closetextDocument/didChange is completely absent.

Expected Behavior (from spec §LSP Integration — File Synchronization)

File Synchronization — As the actor reads and modifies files (via tools), the LSP Runtime sends textDocument/didOpen, textDocument/didChange, and textDocument/didClose notifications to keep the language server's view synchronized with the actor's mutations.

Actual Behavior

LspClient in src/cleveragents/lsp/client.py only has:

  • did_open(uri, language_id, version, text)
  • did_close(uri)
  • textDocument/didChange ✗ — missing

The LspRuntime also has no update_document() or did_change() method.

Without textDocument/didChange, the LSP server's view of a file becomes stale the moment an actor modifies it. Subsequent get_diagnostics() calls will return diagnostics for the original file content, not the modified content. This makes LSP-based validation during the Execute phase unreliable.

Code Location

  • src/cleveragents/lsp/client.py — missing did_change() method
  • src/cleveragents/lsp/runtime.py — missing update_document() method that calls did_change()

Impact

LSP diagnostics during the Execute phase will be stale — they reflect the original file content, not the actor's modifications. The spec's requirement that "Apply-phase validations invoke lsp/diagnostics on all modified files to ensure no regressions before merge" cannot be satisfied without file synchronization.


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

## Summary The spec requires that as an actor reads and modifies files (via tools), the LSP Runtime sends `textDocument/didOpen`, `textDocument/didChange`, and `textDocument/didClose` notifications to keep the language server's view synchronized with the actor's mutations. However, `LspClient` only implements `did_open` and `did_close` — `textDocument/didChange` is completely absent. ## Expected Behavior (from spec §LSP Integration — File Synchronization) > **File Synchronization** — As the actor reads and modifies files (via tools), the LSP Runtime sends `textDocument/didOpen`, `textDocument/didChange`, and `textDocument/didClose` notifications to keep the language server's view synchronized with the actor's mutations. ## Actual Behavior `LspClient` in `src/cleveragents/lsp/client.py` only has: - `did_open(uri, language_id, version, text)` ✓ - `did_close(uri)` ✓ - `textDocument/didChange` ✗ — **missing** The `LspRuntime` also has no `update_document()` or `did_change()` method. Without `textDocument/didChange`, the LSP server's view of a file becomes stale the moment an actor modifies it. Subsequent `get_diagnostics()` calls will return diagnostics for the **original** file content, not the modified content. This makes LSP-based validation during the Execute phase unreliable. ## Code Location - `src/cleveragents/lsp/client.py` — missing `did_change()` method - `src/cleveragents/lsp/runtime.py` — missing `update_document()` method that calls `did_change()` ## Impact LSP diagnostics during the Execute phase will be stale — they reflect the original file content, not the actor's modifications. The spec's requirement that "Apply-phase validations invoke `lsp/diagnostics` on all modified files to ensure no regressions before merge" cannot be satisfied without file synchronization. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.6.0 milestone 2026-04-09 10:13:06 +00:00
Author
Owner

Milestone compliance fix applied:

  • Assigned to milestone: v3.6.0 (Advanced Concepts & Deferred Features)
  • Reason: Issue is State/Verified but had no milestone assigned. LSP integration features belong to v3.6.0 scope per milestone description.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Milestone compliance fix applied: - Assigned to milestone: **v3.6.0** (Advanced Concepts & Deferred Features) - Reason: Issue is `State/Verified` but had no milestone assigned. LSP integration features belong to v3.6.0 scope per milestone description. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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#5673
No description provided.