Skip to content

Choose canonical C# partial declaration representatives - #5042

Merged
Widthdom merged 74 commits into
mainfrom
fix-issue4914
Aug 3, 2026
Merged

Choose canonical C# partial declaration representatives#5042
Widthdom merged 74 commits into
mainfrom
fix-issue4914

Conversation

@Widthdom

@Widthdom Widthdom commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Choose one deterministic canonical representative for grouped C# partial classes, records, and methods, preferring implementations, non-generated source, and richer declaration evidence.
  • Preserve logical family identity across nested and file-local types, generic arity, project boundaries, hook mutations, nullable callable spellings, and persisted databases opened on another operating system.
  • Use the canonical family consistently in grouped search, goto, impact traversal, hotspot/reporting, diff output, and readiness validation while retaining access to every physical declaration.
  • Document the structured family fields and compatibility contract, with a bilingual changelog fragment.

Root cause

Partial declarations were stored as separate physical symbols, while grouping and representative selection reconstructed identity from incomplete signature, container, and path evidence. That could merge unrelated declarations, split valid families, or choose an unstable navigation target, especially around file-local/nested types, nullable custom types, hooks, and project boundaries.

User impact

Grouped C# queries now return a stable, explainable representative and bounded family members. Navigation defaults to that representative, goto --all still returns all physical locations, and impact traversal includes callers attached to either declaration site.

Validation

  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false — passed with 0 warnings and 0 errors
  • Issue Choose a canonical representative for partial declaration families #4914 tests, net8.0 — 57 passed, 0 failed
  • Issue Choose a canonical representative for partial declaration families #4914 tests, net9.0 — 53 passed, 4 skipped, 0 failed
  • Full net8.0 Debug suite — 11,154 passed, 7 skipped, 0 failed
  • Full Release suites — net8.0: 11,152 passed / 7 skipped; net9.0: 10,675 passed / 423 skipped
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore — passed
  • dotnet run --project tools/CodeIndex.Changelog -- check — 109 fragments valid
  • git diff --check — passed
  • Codex adversarial review — No blocking/actionable issues found.

Documentation and changelog

Updated USER_GUIDE.md, TESTING_GUIDE.md, and COMPATIBILITY.md. Added bilingual changelog.d/unreleased/4914.changed.md.

Fixes #4914

Widthdom added 30 commits August 1, 2026 10:25
Widthdom added 27 commits August 2, 2026 22:25
@Widthdom
Widthdom marked this pull request as ready for review August 3, 2026 20:49
@Widthdom
Widthdom merged commit cf699ab into main Aug 3, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4914 branch August 3, 2026 20:49
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.

Choose a canonical representative for partial declaration families

1 participant