Repository navigation
fix(tools): count every error entry and set truncated in errors_list - #114
Merged
Merged
Conversation
…list TotalCount and the per-severity counts now cover the whole Error List instead of only the returned items, so they are no longer capped by maxResults or zeroed by the severity filter. Truncated is set when more entries matched than maxResults allowed. When nothing matches, Items is empty instead of holding a placeholder message.
This was referenced Oct 1, 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.
Summary
errors_listreported counts that were capped bymaxResults, zeroed by the severity filter, and it never setTruncated. This fixes all three.maxResults.TotalCount,ErrorCount,WarningCountandMessageCountare counted for every entry, whatever the severity filter. With 250 errors and the defaultmaxResults = 100, the result is nowTotalCount: 250,ErrorCount: 250,Truncated: true.Truncatedis set. It istruewhen more entries matched thanmaxResultsallowed.Itemsis empty with correct counts. The "build to populate the Error List" hint moved into the tool description, which now also explains what the counts andTruncatedmean.The counting and capping logic is now in
VisualStudioService.CollectErrorListEntries, a pure method, so it can be unit tested without Visual Studio.Notes
errors_list#111 adds moreerrors_listfilters and will change the same method, so whichever PR merges second will need a rebase.symbol_workspaceandfind_referencessetTruncatedwith slightly different logic (one compares the unfiltered symbol count, the other uses>=). They are not changed here.Testing
dotnet build src/CodingWithCalvin.MCPServer.slnx: 0 warnings, 0 errorsdotnet test: 90 passed, including 11 new tests inErrorListTests.cscovering capped counts, counts under a severity filter, theTruncatedboundary, empty results, entries that cannot be read, and reading details only for returned entries