Skip to content

Make caller ranking precedence explicit and reproducible #4881

Description

@Widthdom

Summary

callers --rank-by count can rank a one-reference production caller above a 284-reference test caller because an undocumented source/test preference overrides the requested ranking.

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

Existing issue relationship

No exact existing issue was found.

Expected behavior and PR scope

Either count is the true primary key for --rank-by count, or the product exposes an explicit composite ranking mode. Structured query context must state the applied rule/tie-breakers.

Implementation guide for Codex 5.6 sol xhigh

  • Represent rank dimensions and precedence explicitly rather than layering hidden post-sort preferences.
  • Define stable tie-breakers and deterministic source/test behavior.
  • Cover large count differences, ties, include/exclude tests, multiple paths, JSON/human output, and pagination stability.
  • Update help/docs with the exact ordering contract.
  • Add focused regression/contract tests, run the full net8.0 and net9.0 suite, and add the required bilingual changelog.d/unreleased/ fragment.

Acceptance criteria

  • Requested count ranking behaves as documented.
  • Query context exposes the active ranking recipe.
  • Pages preserve the same deterministic order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codebugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions