Skip to content

Fix exact file identity in LSP navigation - #5384

Merged
Widthdom merged 1 commit into
mainfrom
fix-issue5373
Sep 16, 2026
Merged

Widthdom merged 1 commit into
mainfrom
fix-issue5373

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

LSP definition/declaration and reference navigation could select a declaration from a case-colliding indexed file and interpret its position against the requested document. Select local candidates by binary-equal indexed path before SQL limits, and reject foreign paths during position matching. Apply the same exact identity to local reference fallbacks while preserving authoritative cross-file targets and overload behavior.

Reuse the existing audit-partition equality scope, with nested/exception restoration coverage. Regression fixtures cover case collisions without a case-sensitive filesystem, literal glob/SQL path characters, directory-prefix decoys, the 50-candidate boundary, unresolved local fallbacks and cross-file navigation.

Fixes #5373

Validation

  • After rebasing onto cfcb723e5, Release LSP/audit recovery tests plus Honor token-boundary mode in named-query search count summaries #5376: 182 passed on each of net8.0/net9.0.
  • Full suite before the rebase, dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false: net8.0 12,617 passed / 9 skipped; net9.0 12,123 passed / 435 skipped; zero failures. Rebase resolution changed only the placement of the bilingual testing-guide additions; the issue's code/test patch is unchanged.
  • Real Release stdio LSP process: the issue's fixture returns B.Leaf at line 2, characters 13–17, and its reference at line 8, characters 10–14 (zero-based).
  • dotnet run --project tools/CodeIndex.Changelog -- check.
  • git diff --check.
  • Codex adversarial review of origin/main..HEAD, including a second round after the rebase: no blocking/actionable issues found.

Documentation and changelog

  • Updated both language sections in USER_GUIDE.md, DEVELOPER_GUIDE.md and TESTING_GUIDE.md.
  • Bilingual fragment: changelog.d/unreleased/5373.fixed.md.
  • No schema migration or reindex is required.

Follow-up

@Widthdom
Widthdom merged commit e36c14d into main Sep 16, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue5373 branch September 16, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use exact file identity for LSP definition position matching

1 participant