Skip to content

fix(code-intel): calls resolve by bare function name; Type::method and use paths are not resolved (callers, impact, trace, affected inflate or miss) #714

Closed

Description

@ajianaz

Cora version

0.20.0

Which command?

cora index, then cora callers, cora impact, cora trace, cora query, cora affected.

What happened?

The call graph is keyed by the bare function or method name, not by the type or module path. On a Rust workspace of about 124,600 lines (tole, 8c05cd1, 5,562 symbols from 307 files):

  • cora callers from_env reports 16 callers and cora impact from_env reports "507 affected", because every from_env in the workspace (a dozen different types) is merged into one node.
  • cora callers WebFetchTool and cora impact WebSearchTool report "No callers found" / "No impact found", although crates/tole-cli/src/tool_roster.rs:360-368 calls WebBackendFetchTool::from_env(), WebFetchTool::default() and WebSearchTool::from_env(). A type name is not a call target, and the Type::method form is not resolved.
  • cora trace from_lookup --direction incoming --depth 3 returns 121 nodes, inflated the same way.
  • cora query "WebFetchTool -> *" returns nothing.

The result is both wrong ways at once: far too many results for a common method name, and no results for a type-qualified name.

What did you expect to happen?

A call WebSearchTool::from_env() is an edge to WebSearchTool::from_env, resolved from the path (and from use imports and the receiver type where it is statically obvious), so that:

  • callers WebSearchTool::from_env lists only its real callers (here tool_roster.rs:368), and
  • impact and trace follow type-resolved edges.

Where the receiver type is unknown (a method call on an untyped value), keep the bare-name edge but mark it as ambiguous and let --strict hide ambiguous edges.

Steps to reproduce

git clone https://github.com/codecoradev/tole && cd tole && git checkout 8c05cd1
cora index
cora callers from_env | head -3        # many unrelated types
cora callers WebFetchTool              # none, but tool_roster.rs:364 uses it
cora impact from_env | head -1         # 507 affected

Logs / output

Callers of 'from_env' (16): ...
No callers found for 'WebFetchTool'.
Impact of changing 'from_env' (507 affected):

Config (if relevant)

Default. Tracking issue with the full measured table: codecoradev/tole#669.

Before submitting

  • I searched existing issues and didn't find a duplicate

Activity

  1. added
    bug
    scope:code-intel
    epic:code-intelligence
    on Nov 13, 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

    bugepic:code-intelligencepriority:highscope:code-intel

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions