Skip to content

Choose a canonical representative for partial declaration families #4914

Description

@Widthdom

Summary

--group-partials can choose an alphabetically early split file instead of the primary declaration, and goto offers no documented canonical-family choice.

Audit IDs: Q-20. Reproduced with locally built cdidx v1.40.3 at 404db09489c305f17d94f37026e00564d3ac527a.

Existing issue relationship

No exact existing issue was found.

Expected behavior and PR scope

Define a deterministic canonical representative and return selection reason/family members. Keep this to partial-family grouping/ranking, not constructor navigation.

Implementation guide for Codex 5.6 sol xhigh

  • Specify ordered signals such as explicit primary/body declaration, non-generated source, attributes/base list/docs, path stability, and source position.
  • Use canonical symbol/family IDs before path/name tie-breaks and keep the result stable across index order.
  • Expose representative reason and optional family members in structured output.
  • Cover partial classes/records/methods across files, generated/designer files, equal candidates, renames, and old DB metadata.
  • Add focused regression/contract tests as appropriate, run the full net8.0 and net9.0 suite, and add the required bilingual changelog.d/unreleased/ fragment.

Acceptance criteria

  • The representative follows the documented semantic rule, not arbitrary alphabetical order.
  • Selection is deterministic across rebuilds.
  • Clients can intentionally navigate the representative or full family.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codeenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions