Skip to content

Reject invalid LSP coordinates as InvalidParams - #4967

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue4869
Jul 29, 2026
Merged

Reject invalid LSP coordinates as InvalidParams#4967
Widthdom merged 2 commits into
mainfrom
fix-issue4869

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Centralize LSP Position and Range structural validation before document, live-text, and index access.
  • Return JSON-RPC -32602 for malformed, negative, overflowing, missing, or reversed request coordinates while preserving valid UTF-16 and EOF behavior.
  • Reject invalid ranged didChange notifications before they can mutate accepted live text.

Validation

  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false — passed with 0 warnings and 0 errors.
  • Issue Reject negative LSP positions as InvalidParams #4869 regression tests on net8.0 and net9.0 — 3 passed on each target.
  • Full net8.0 suite — 10,777 passed, 7 expected skips, 0 failed.
  • Full net9.0 suite — 10,302 passed, 420 expected skips; one unrelated watcher timeout is tracked in Investigate net9 ancestor .gitignore watcher reconciliation timeout #4966.
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore — passed.
  • dotnet run --project tools/CodeIndex.Changelog -- check — validated all 41 fragments.
  • Commit-aware index refresh and status --check --json — fresh, clean, and matched to HEAD.
  • Codex adversarial review of origin/main..HEADNo blocking/actionable issues found.

Documentation and changelog

  • Updated the English and Japanese LSP contracts in DEVELOPER_GUIDE.md.
  • Updated the English and Japanese regression-test guidance in TESTING_GUIDE.md.
  • Added changelog.d/unreleased/4869.fixed.md.

Follow-up candidates

Fixes #4869

@Widthdom
Widthdom merged commit 6c1c247 into main Jul 29, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4869 branch July 29, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reject negative LSP positions as InvalidParams

1 participant