Skip to content

fix(graph): retain Rust implementation method identities - #438

Open
DivyamTalwar wants to merge 1 commit into
activeloopai:mainfrom
DivyamTalwar:fix/graph-preserve-rust-impl-method-ownership
Open

DivyamTalwar wants to merge 1 commit into
activeloopai:mainfrom
DivyamTalwar:fix/graph-preserve-rust-impl-method-ownership

Conversation

@DivyamTalwar

Copy link
Copy Markdown

Summary

Fixes #437.

The Rust call pass chooses an enclosing function by name rather than its declaration, so same-named methods on different types can share the wrong caller. Owner edges also assume a class-shaped plain impl type, missing generic and enum ownership and collapsing same-named trait methods.

Track each represented callable by source position, preserve complete implementation type spelling in method IDs, and distinguish trait implementations with a type-and-trait-qualified identity. Resolve method ownership to locally declared structs/enums after declaration collection. Preserve constant-generic literal bytes and reject speculative owner links for unsupported scoped/reference types.

Version Bump

No release requested. Package versions, dependencies, lockfiles and release workflows are unchanged.

Test plan

  • Repository-native regressions against unchanged production source: 14 failed, 16 controls passed, zero skipped.
  • Corrected focused suites: 30 passed, zero failed or skipped, plus local typechecking.
  • Exact submitted commit 6a9a1942f80f23b17899b8143510e478971b1ba7: independent Node 22/Linux full suite with coverage, 5,864 passed, zero failed, zero skipped. The same job passes typecheck, production build, duplication guard, critical-only bundle audit and diff checks.

Exact checkout, commands, full-suite results and retained logs. Each branch was validated independently. Tests use synthetic code/transcripts and isolated filesystem fixtures, not live model calls or user data.

Compatibility and limits

Type aliases, Self, imported/cross-file owners and semantic type equivalence are not resolved. Existing inline-module item IDs remain flattened, so this is not a complete module-identity redesign. Trait method IDs intentionally change to distinguish implementation histories; inherent nongeneric IDs remain unchanged. Calls inside unrepresented closures are left unresolved rather than credited to the outer function. Textual type spelling is preserved, not normalized by a Rust type checker.

The current open-PR file inventory and issue titles were checked before submission. A clean full macOS suite or native Windows execution is not claimed. The independent gate does not replace upstream CI or maintainer review.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: activeloopai/hivemind/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 78a20fd8-904b-4acf-98b6-290578ed5ff7

📥 Commits

Reviewing files that changed from the base of the PR and between ce30de7 and 6a9a194.

📒 Files selected for processing (2)
  • src/graph/extract/rust.ts
  • tests/shared/graph/rust.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

Rust implementation methods can lose owner links or attribute calls to another method

1 participant