Skip to content

chore(graph_builder): remove shadowed and orphaned method definitions #1604

Closed

Description

@Shashankss1205

Split out of #1595 (reports 2 and 6b of 9) — filed by @rrodriguesNutrium, credit to them. Related to #1538.

graph_builder.py carries several shadowed method definitions, left behind when the file was split into indexing/persistence/writer.py and indexing/resolution/.

At least three independently shadowed names:

  • add_file_to_graph — defined twice; the later definition wins
  • _create_all_function_calls — separately shadowed by a later definition
  • add_repository_to_graph — also defined twice

Plus two orphaned methods whose live equivalents now live elsewhere:

  • _resolve_inheritance_link — zero call sites in src/; live equivalent is the free function at indexing/resolution/inheritance.py:9
  • _create_csharp_inheritance_and_interfaces — zero call sites here; the live one is on GraphWriter (writer.py:891)

Why this is more than tidiness: the dead add_file_to_graph's item_mappings has drifted from the live one — the live list handles objects, mixins, extensions, modules and enum_members; the dead one handles none of them. Anyone reading the file top-to-bottom to learn which node types reach the graph gets a wrong answer, and nothing in the file signals which copy wins.

The reporter verified that deleting the unreachable region is behaviour-preserving (unit suite byte-identical before and after, every removed name traced to a live equivalent or zero call sites).

Activity

  1. github-actions commented on Aug 13, 2026

    @github-actions
    Contributor

    Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ

  2. moved this from Backlog tasks to In progress in CGC Progress Boardon Aug 18, 2026
  3. moved this from In progress to Done in CGC Progress Boardon Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions