Skip to content

Clean up private unused helpers in CLI and database reader code #3671

@Widthdom

Description

@Widthdom

Found while dogfooding the locally built cdidx on branch codex/search-audit-issues-20260619.

Duplicate check: no open issue found for private unused helpers QueryCommandRunner DbReader DbSymbolReader IndexLock cleanup stale dead code.

Evidence from cdidx unused --json --exclude-tests --visibility private:

  • src/CodeIndex/Cli/IndexLock.cs:209 EscapeValue
  • src/CodeIndex/Cli/QueryCommandRunner.cs:53 BatchJsonDocumentOptions
  • src/CodeIndex/Cli/QueryCommandRunner.cs:10879 IsCSharpMetadataTargetOnlyReadinessDegraded
  • src/CodeIndex/Database/DbReader.CSharpResolution.cs:902 TakeFirstCSharpBaseListEntry
  • src/CodeIndex/Database/DbReader.References.cs:455 NormalizeRustMacroQuery
  • src/CodeIndex/Database/DbReader.cs:166 ImpactAnchorReferenceKindsSql
  • src/CodeIndex/Database/DbSymbolReader.cs:1755 HasExactDefinitionMatch

Problem:
These private helpers appear to have zero indexed references and are outside the previously filed dry-run/checkpoint cleanup issue.

Acceptance criteria:

  • Confirm each candidate is truly unused, including partial-class and test-only call paths.
  • Remove stale helpers or wire them intentionally.
  • Add or update tests if behavior changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions