Add timeout and LSP sentinel errors for lint error classification#418
Merged
Add timeout and LSP sentinel errors for lint error classification#418
Conversation
Lint errors were all classified as "unknown" in telemetry because none of the errors from the lint path wrapped a recognized sentinel. This adds ErrTimeout and ErrLSP sentinels so that timeouts and LSP protocol failures are properly categorized.
jmsanders
approved these changes
Mar 11, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I saw an unhandled error from
rwx lintget reported in our telemetry, but we're missing any actionable information. The error cases that can happen when linting that are most important to have visibility into are exceeding the 30-second timeout and any issues with the language server, so this PR categorizes those better.Other error cases that can occur when linting are up to the user to resolve (i.e. no rwx directory, etc) and don't need to be granularly reported to us for now.
Summary
ErrTimeoutandErrLSPsentinel errors so that lint errors are no longer all classified as"unknown"in telemetryErrLSPat both the jsonrpc and check layersErrTimeoutin the jsonrpc request pathtimeoutandlsp_errorcases toclassifyErrorin the CLI entry pointTest plan
TestJSONRPC_RequestTimeoutto assertErrTimeoutsentinelTestJSONRPC_RequestLSPErrorto assertErrLSPsentinel on LSP error responses