Preserve live LSP document-symbol hierarchy - #4948
Merged
Merged
Conversation
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
Root cause
Full-document changes were read from the live document store, but
textDocument/documentSymbolcontinued to serve the flattened indexed symbol rows. Re-extracting without the indexed language, version safeguards, or a materialization bound also introduced correctness and resource risks, so the fix keeps those contracts explicit.Validation
dotnet build CodeIndex.sln -c Release --no-restore— succeeded with 0 warnings and 0 errors.dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Debug --no-restore --filter 'FullyQualifiedName~LspServer'— 120/120 passed on both net8.0 and net9.0 after the latest-main lifecycle integration.dotnet test CodeIndex.sln -c Release --no-build --no-restore— net8.0: 10,638 passed, 7 skipped, 1 existing load-sensitive failure; net9.0: 10,165 passed, 419 skipped, 1 existing load-sensitive failure. The two failures were the existing MCP batch-initialize regression test and the CI performance smoke while both full suites ran concurrently.dotnet run --project tools/CodeIndex.Changelog --configuration Release --no-build -- check— validated 26 fragments.dotnet build CodeIndex.sln -c Debug --no-restore— succeeded with 0 warnings and 0 errors.Adversarial review
Two required review rounds were completed and all actionable findings were addressed:
Documentation and changelog
README.md,USER_GUIDE.md, andDEVELOPER_GUIDE.md.changelog.d/unreleased/4851.fixed.md.Follow-up candidates
None.
Fixes #4851