Fix duplicate diagnostics in LSP server#2977
Merged
miparnisari merged 1 commit intoauthzed:mainfrom Mar 20, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (73.51%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2977 +/- ##
==========================================
- Coverage 74.79% 73.51% -1.27%
==========================================
Files 498 499 +1
Lines 61058 61060 +2
==========================================
- Hits 45660 44881 -779
- Misses 12198 12986 +788
+ Partials 3200 3193 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
miparnisari
previously approved these changes
Mar 20, 2026
016ff13 to
98b0565
Compare
98b0565 to
1916af4
Compare
miparnisari
approved these changes
Mar 20, 2026
…gnostics Correct ClientCapabilities struct to match LSP spec, detecting pull diagnostics support via textDocument.diagnostic presence. Fixes authzed/spicedb-vscode#41
auto-merge was automatically disabled
March 20, 2026 18:26
Head branch was pushed to by a user without write access
1916af4 to
1a7d9bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes authzed/spicedb-vscode#41
The LSP server's
ClientCapabilitiesstruct mapped diagnostics at a non-standard JSON path, so pull diagnostics support was never detected. The server always pushedpublishDiagnosticseven when the client was already pulling viatextDocument/diagnostic, causing duplicate errors.Fixed by restructuring
ClientCapabilitiesto match the LSP spec and detecting pull support viatextDocument.diagnosticpresence.Tested manually — confirmed duplicates in VS Code before the fix and single errors after.