Limit LSP request id echo size - #3298
Merged
Merged
Conversation
Widthdom
marked this pull request as ready for review
June 5, 2026 11:10
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
idtoken withUtf8JsonReaderbefore parsing retained response id state, so oversized ids are rejected withid: nullinstead of being echoed.Validation
dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-restore --filter "FullyQualifiedName~LspServerTests"dotnet run --no-restore --project tools/CodeIndex.Changelog -- checkdotnet format CodeIndex.sln --verify-no-changesdotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check5928ca5: Changelog Fragments, CodeQL, and Build and Test all passed. Build and Test passed across ubuntu/macos/windows for net8.0/net9.0.codex exec review --base origin/mainsubcommand was attempted with and without--ignore-rules, but this environment rejected its internal shell calls; a tool-free Codex review of the final change summary completed and found no actionable findings.A full
dotnet testrun was also attempted after a movingorigin/mainrefresh; it reported an unrelatedMcpServerTests.ProcessLineAsync_CapsTelemetryArgumentKeyCount_Issue3237failure and then stalled. The exact failing test passed when rerun directly.A local rerun of the new
LspServerRequestIdTestsregression test was attempted after moving to latestmain, but the tool call timed out before returning a result. The updated PR head passed the GitHub Actions matrix listed above.The earlier CI-only failure in
McpAuditLogTests.ToolsCall_TruncatesAuditRequestId_Issue3237is tracked by #3308 and is already resolved on currentmain; this PR no longer carries an additional #3308 diff.Documentation and changelog
changelog.d/unreleased/3113.security.md.Follow-up candidates
Fixes #3113
Refs #3308