textDocument/didChange now applies ranged content changes instead of
requiring the whole buffer per keystroke. New pure sync::apply_changes
applies each change against the document as the previous ones left it
(fresh line table per change), clamping inherited from convert.rs and a
backwards range read as a pure insertion — the one rule that cannot lose
text. One notification stays one reparse / one generation bump / one
publish. Full-sync clients (rangeless changes) keep byte-identical
behavior; save advertises includeText: false and didSave still honours
text when sent.
35 tests added (28 unit incl. a 400-sequence randomized cross-check
against an independent reference model and QA's surrogate/CRLF/final-
newline attacks, 6 server-level, 1 e2e pinning the wire capability
shape). QA's one finding — CRLF split across two same-position inserts
in one batch lands \n\r — is pre-existing convert.rs behavior, pinned
by test, unreachable by real clients; see the feature README.
docs/features/incremental-sync/README.md
Co-Authored-By: Claude Fable 5 <[email protected]>
The three top findings of the LSP 3.18 audit (TODO.md §9), one round of
dev (Opus) + QA (Sonnet) + lead review:
- executeCommand now pushes its WorkspaceEdit as workspace/applyEdit and
reads the client's verdict; the old return-the-edit behavior stays as
the documented fallback for clients without the capability. This fixes
the three port commands doing nothing in stock clients — the returned
edit was dropped by vscode-languageclient and Neovim alike.
docs/features/apply-edit/README.md
- textDocument/diagnostic + workspace/diagnostic (LSP 3.17), served from
the same parse+lint pass the push model publishes, with resultId /
unchanged caching on one generation counter; a pulling client is pushed
nothing, a pushing client is unchanged. QA's exhaustive input trace
found no stale-unchanged path. docs/features/pull-diagnostics/README.md
- textDocument/selectionRange: chains from token spans, the tolerant
parse's item/statement spans and the scope-pair matcher, filtered to
strict nesting; the invariant swept over all 860 corpus files (6,880
positions, held everywhere). docs/features/selection-range/README.md
43 tests added across unit/e2e (server 557 -> 594+ unit, 29 -> 32 e2e);
fmt/clippy/test/smoke all clean, re-verified independently by QA and by
the lead.
Co-Authored-By: Claude Fable 5 <[email protected]>