Skip to content

fix(code-intel): make trace follow type-qualified call edges - #744

Merged
ajianaz merged 1 commit into
developfrom
fix/trace-typed-edges
Nov 16, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/trace-typed-edges

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • cora trace Type::name follows only calls made through that type, in both directions, and every hop continues from the type of the node it reached (the qualifier of a call, the impl type of the calling method). Nodes report the type they were reached as, and --strict drops calls whose type is unknown once a node has one. Bare-name traces behave as before.
  • Repairs the graph test module: a block of tests (the call helper, the exact-match caller tests and the type-qualified tests added with the call graph change) had ended up inside the raw-string fixture of the cross-crate dead-code test, so none of them was compiled or run. They now sit after that test and run. Two of them used an old store_edges argument order and one new test reused identical rows, so both were corrected.

Why

trace walked the bare-name edges table, so same-named methods of different types were still merged after the callers and impact change. Closes #743.

Testing

  • New tests: typed incoming trace, typed outgoing trace, and --strict; on a fixture, trace WebSearchTool::from_env --direction incoming lists 2 callers, WebFetchTool::from_env 1, and the bare name 3.
  • The revived tests pass (7 graph tests now run that did not before, including the type-qualified callers and typed impact tests).
  • cargo fmt --all -- --check, cargo clippy --all-targets --features tree-sitter -- -D warnings, cargo test --features tree-sitter, cora review --base origin/develop: no issues.

trace walked the bare-name edges table, so every same-named method of a
workspace merged into one node. trace Type::name now follows only calls made
through that type in both directions, and every hop continues from the type of
the node it reached (the qualifier of a call, the impl type of the calling
method). Nodes report the type they were reached as, --strict drops calls whose
type is unknown once a node has one, and bare-name traces behave as before.

Also repairs the graph test module: a block of tests (the call helper, the
exact-match caller tests and the type-qualified tests added with the call
graph change) had ended up inside the raw-string fixture of the cross-crate
dead-code test, so none of them was compiled or run. They sit after that test
now, run, and the two that still used an old store_edges argument order were
updated.
@ajianaz
ajianaz merged commit b9642a4 into develop Nov 16, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(code-intel): trace still merges same-named methods; follow type-qualified call edges

1 participant