Repository navigation
Resolve Rust self.method() calls across files - #3602
ayushcodes10 wants to merge 9 commits into
Conversation
Prep for resolving a self dot method call across files: extract_rust already tracks which impl block a function body belongs to via parent_impl_nid, but not the block's own bare type name, which is what self is typed as syntactically inside that block. No behavior change yet, this just carries the name down to where a call expression is walked. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Detect when a member call's receiver is literally self (a distinct tree sitter node type, not an identifier) and, when the enclosing impl block's bare type name is known, carry it on the raw_call as rust_self_type. Nothing consumes this yet, so the extracted edges are unchanged; it is the signal the next commit's resolver needs. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Fixes issue 2234. Pools methods by the bare type name across every node that carries it, rather than requiring the name to resolve to exactly one node like the Kotlin and Swift equivalents: Rust routinely splits an impl block for one type across as many files as it likes, and rust.py mints a separate graph node per file and type name pair rather than merging them, so requiring a single node would refuse the exact split impl block shape this issue is about. A call resolves only when exactly one method across the whole pool matches the callee name, so two impl blocks defining the same method name still bail, a real ambiguity rather than a false one. Verified end to end: a self call in one file now reaches a method defined in a different impl block of the same type in another file, the same file control case is unaffected, an ambiguous type name shared by two unrelated structs with a colliding method name yields no edge, and a call to a genuinely undefined method yields no edge. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Covers the issue's own shape (impl Foo split across two files, a self call in one block reaching a method defined in the other) and a same file negative control proving the pre existing bare name resolution is unaffected. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Two different structs sharing a bare type name with a colliding method name must yield no edge rather than a guess, and a self call to a method that genuinely does not exist anywhere in the corpus must not fabricate a target. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 2 advisory finding(s) below merit a look before merge.
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
Adds cross-file resolution for Rust self.method() calls, which previously got no calls edge whenever a hub method was reached only through self in a separate impl block. extract_rust now types the self receiver from its enclosing impl Foo<T> block (recorded as the generics-stripped rust_self_type on each self-call), and the new _resolve_rust_self_member_calls pass pools methods across every node carrying that bare type name — accommodating impl blocks split across files — and only draws an edge when exactly one method in the pool matches the callee, bailing on ambiguity and non-self receivers.
Worth a look
- method_index overwrites entries for duplicate (type-node, method) pairs, potentially masking ambiguity —
graphify/extract.py· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Rust self-call resolver suppresses calls when any other edge already exists —
graphify/extract.py:4784· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2228 functions depend on the 473 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 639 callers, 45 callees - new:
_rebuild_code()— 123 callers, 53 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 125 callees - new:
_get_extractor()— 26 callers, 6 callees - new:
extract_rust()— 19 callers, 6 callees - new:
run_pipeline()— 8 callers, 13 callees - …and 32 more — each is listed as a finding
Verification — 2228 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 2053 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
284 of 284 test file(s) selected (100%) via static blast radius.
Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.
tests/test_affected_cli.py— full-run-safetytests/test_affected_member_seed.py— full-run-safetytests/test_agents_platform.py— full-run-safetytests/test_analyze.py— full-run-safetytests/test_anthropic_custom_endpoint.py— full-run-safetytests/test_antigravity_install.py— full-run-safetytests/test_apm_fallback_version.py— full-run-safetytests/test_architecture_doc.py— full-run-safetytests/test_astro_extraction.py— impact, full-run-safetytests/test_astro_import_ids.py— impact, full-run-safetytests/test_atomic_canvas_export.py— full-run-safetytests/test_atomic_version_stamp.py— full-run-safetytests/test_atomic_writes.py— full-run-safetytests/test_backend_env_isolation.py— full-run-safetytests/test_backend_extras.py— full-run-safetytests/test_benchmark.py— full-run-safetytests/test_benchmark_raw_graph.py— full-run-safetytests/test_build.py— impact, full-run-safetytests/test_build_merge_dedup_scope.py— full-run-safetytests/test_build_merge_hyperedges_and_prune.py— full-run-safetytests/test_build_merge_shrink_guard.py— full-run-safetytests/test_builtin_global_type_refs.py— impact, full-run-safetytests/test_cache.py— full-run-safetytests/test_callflow_html.py— full-run-safetytests/test_cargo_introspect.py— full-run-safetytests/test_carried_hyperedge_remap.py— full-run-safetytests/test_case_sensitive_resolution.py— impact, full-run-safetytests/test_charmap_encoding.py— full-run-safetytests/test_chunking.py— full-run-safetytests/test_cjs_module_extension.py— impact, full-run-safetytests/test_claude_cli_backend.py— full-run-safetytests/test_claude_md.py— full-run-safetytests/test_cli_broken_pipe.py— full-run-safetytests/test_cli_export.py— full-run-safetytests/test_cli_help.py— full-run-safetytests/test_cluster.py— full-run-safetytests/test_codebuddy.py— full-run-safetytests/test_community_hub_labels.py— full-run-safetytests/test_community_labels_skill.py— full-run-safetytests/test_confidence.py— full-run-safetytests/test_corrupt_graph_json.py— full-run-safetytests/test_cpp_nested_and_cli.py— impact, full-run-safetytests/test_cpp_objc_cross_file_calls.py— impact, full-run-safetytests/test_cpp_preprocess.py— full-run-safetytests/test_cross_extension_reexport_self_cycle.py— impact, full-run-safetytests/test_cross_language_call_resolution.py— impact, full-run-safetytests/test_cross_repo_external_call_guards.py— impact, full-run-safetytests/test_cross_repo_member_calls.py— impact, full-run-safetytests/test_cross_repo_shared_types.py— full-run-safetytests/test_csharp_call_site_generic_args.py— impact, full-run-safety- … and 234 more
non-code file(s) changed (
CHANGELOG.md) → running the full suite for safety (a code graph can't see config/fixture/data deps)
changed code file(s) with no mapped test (
CHANGELOG.md) — a coverage gap or a missing link — running the full suite rather than only the selected tests
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
Could not verify: Could not verify extract\_rust.
The verifier did not have enough to check extract\_rust, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: parameter `path` is annotated `Path` — outside the synthesizable primitive/collection set
· 1 grounded finding(s) anchored inline below; 39 more finding(s) on lines outside this diff (see the check run).
| add_edge(func_nid, tgt, "references", line, context=ctx) | ||
|
|
||
| def walk(node, parent_impl_nid: str | None = None) -> None: | ||
| def walk(node, parent_impl_nid: str | None = None, parent_impl_type: str | None = None) -> None: |
There was a problem hiding this comment.
walk()
fans out to 8 callees (efferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
The check against a pair already having an edge matched on ANY relation, so a caller that already had, say, a references edge to the exact same target (from also naming the type elsewhere) silently suppressed a real call to it. The two relations are not mutually exclusive and an existing non calls edge says nothing about whether a call was resolved. Scoped the check to calls edges only, matching an existing precedent elsewhere in this module for the identical class of mistake. Co-Authored-By: Claude Sonnet 5 <[email protected]>
A plain dict assignment silently overwrote an earlier target whenever two method nodes shared both a source impl node and a stripped label, which would have kept whichever one was seen last instead of surfacing the case as the ambiguity it is. The index now keeps a set per key and folds every match into the candidate set before the exactly one candidate check runs, so a genuine duplicate still bails instead of guessing. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Both findings confirmed real, pushed fixes for both:
Added two direct unit tests against the resolver (constructing the node/edge shapes directly, since the natural end-to-end extraction path doesn't organically produce a pre-existing non- Full suite (5599 passed, no regressions) and |
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
Adds a dedicated cross-file resolver for Rust self.method() calls, which the shared member-call pass drops because a bare method name has no import evidence. _resolve_rust_self_member_calls types the receiver from the enclosing impl Foo { .. } block (now threaded through walk/walk_calls and recorded as rust_self_type on each self-call), pools methods across every node sharing that type's bare label to tolerate Rust splitting one impl across many files, and emits an EXTRACTED calls edge only when exactly one method across the pool matches — bailing on zero or ambiguous matches. Skips non-self receivers, which would need local type inference this pass doesn't attempt.
Worth a look
- Rust self-call resolver can link across unrelated types with the same bare name —
graphify/extract.py:4786· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2232 functions depend on the 477 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 639 callers, 45 callees - new:
_rebuild_code()— 123 callers, 53 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 125 callees - new:
_get_extractor()— 26 callers, 6 callees - new:
extract_rust()— 19 callers, 6 callees - new:
run_pipeline()— 8 callers, 13 callees - …and 32 more — each is listed as a finding
Verification — 2232 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 2057 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
284 of 284 test file(s) selected (100%) via static blast radius.
Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.
tests/test_affected_cli.py— full-run-safetytests/test_affected_member_seed.py— full-run-safetytests/test_agents_platform.py— full-run-safetytests/test_analyze.py— full-run-safetytests/test_anthropic_custom_endpoint.py— full-run-safetytests/test_antigravity_install.py— full-run-safetytests/test_apm_fallback_version.py— full-run-safetytests/test_architecture_doc.py— full-run-safetytests/test_astro_extraction.py— impact, full-run-safetytests/test_astro_import_ids.py— impact, full-run-safetytests/test_atomic_canvas_export.py— full-run-safetytests/test_atomic_version_stamp.py— full-run-safetytests/test_atomic_writes.py— full-run-safetytests/test_backend_env_isolation.py— full-run-safetytests/test_backend_extras.py— full-run-safetytests/test_benchmark.py— full-run-safetytests/test_benchmark_raw_graph.py— full-run-safetytests/test_build.py— impact, full-run-safetytests/test_build_merge_dedup_scope.py— full-run-safetytests/test_build_merge_hyperedges_and_prune.py— full-run-safetytests/test_build_merge_shrink_guard.py— full-run-safetytests/test_builtin_global_type_refs.py— impact, full-run-safetytests/test_cache.py— full-run-safetytests/test_callflow_html.py— full-run-safetytests/test_cargo_introspect.py— full-run-safetytests/test_carried_hyperedge_remap.py— full-run-safetytests/test_case_sensitive_resolution.py— impact, full-run-safetytests/test_charmap_encoding.py— full-run-safetytests/test_chunking.py— full-run-safetytests/test_cjs_module_extension.py— impact, full-run-safetytests/test_claude_cli_backend.py— full-run-safetytests/test_claude_md.py— full-run-safetytests/test_cli_broken_pipe.py— full-run-safetytests/test_cli_export.py— full-run-safetytests/test_cli_help.py— full-run-safetytests/test_cluster.py— full-run-safetytests/test_codebuddy.py— full-run-safetytests/test_community_hub_labels.py— full-run-safetytests/test_community_labels_skill.py— full-run-safetytests/test_confidence.py— full-run-safetytests/test_corrupt_graph_json.py— full-run-safetytests/test_cpp_nested_and_cli.py— impact, full-run-safetytests/test_cpp_objc_cross_file_calls.py— impact, full-run-safetytests/test_cpp_preprocess.py— full-run-safetytests/test_cross_extension_reexport_self_cycle.py— impact, full-run-safetytests/test_cross_language_call_resolution.py— impact, full-run-safetytests/test_cross_repo_external_call_guards.py— impact, full-run-safetytests/test_cross_repo_member_calls.py— impact, full-run-safetytests/test_cross_repo_shared_types.py— full-run-safetytests/test_csharp_call_site_generic_args.py— impact, full-run-safety- … and 234 more
non-code file(s) changed (
CHANGELOG.md) → running the full suite for safety (a code graph can't see config/fixture/data deps)
changed code file(s) with no mapped test (
CHANGELOG.md) — a coverage gap or a missing link — running the full suite rather than only the selected tests
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
Could not verify: Could not verify extract\_rust.
The verifier did not have enough to check extract\_rust, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: parameter `path` is annotated `Path` — outside the synthesizable primitive/collection set
· 1 grounded finding(s) anchored inline below; 39 more finding(s) on lines outside this diff (see the check run).
| add_edge(func_nid, tgt, "references", line, context=ctx) | ||
|
|
||
| def walk(node, parent_impl_nid: str | None = None) -> None: | ||
| def walk(node, parent_impl_nid: str | None = None, parent_impl_type: str | None = None) -> None: |
There was a problem hiding this comment.
walk()
fans out to 8 callees (efferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
Pooling methods across every node sharing a type's bare label is what makes a split impl block work, but it is only safe when every one of those nodes really is an impl block for the SAME type. Two unrelated structs that happen to share a bare name, each with its own different methods, could still link a caller to a method that only exists on the wrong one, most concretely when one type overrides a trait default the other relies on and so never gets an explicit method node for it. A struct, enum, or trait declaration gets a contains edge from its file; an impl block never does. So the type name itself is now treated as ambiguous, and pooling skipped entirely, whenever two or more nodes sharing the bare label are real declarations rather than impl blocks. A single declaration with any number of impl blocks spread across files, the shape this pass exists for, is unaffected. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Re: "Rust self-call resolver can link across unrelated types with the same bare name" — confirmed real, and worse than advisory: reproduced it directly. Two unrelated structs both named `Config` in different files, each with its own methods and no name collision between them — a call to a method that exists on one but not the caller's own `Config` incorrectly linked to the unrelated one's method. This can happen in real, compiling Rust: one type overrides a trait default method while an unrelated same-named type relies on the default, so only the override gets an explicit method node, and the pooling mechanism that makes a split impl block work had no way to tell "same type split across files" apart from "different types that happen to share a name." Fixed by using a signal already in the graph: a struct/enum/trait declaration gets a `contains` edge from its file; an impl block never does. So the type name itself is now treated as ambiguous — pooling skipped entirely — whenever 2+ nodes sharing the bare label are real declarations rather than impl blocks. A single declaration with any number of impl blocks spread across files (the shape this pass exists for) is unaffected; verified with a new test that the wrong-link repro above now correctly yields no edge, and the existing split-impl-block test still resolves. Full suite (5600 passed, no regressions) and `skillgen --check` both green. |
There was a problem hiding this comment.
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
Adds a cross-file resolver for Rust self.method() calls so a method reached only through self in a separate impl block gets a calls edge. _resolve_rust_self_member_calls types the receiver from the enclosing impl Foo (recorded as rust_self_type on each self-call, with generics stripped to the bare name) and pools methods across every node sharing that bare label — matching Rust's habit of splitting one type's impls across files — resolving only when exactly one method matches. It bails when 2+ real type declarations share the bare name (detected via contains edges), when the method name is ambiguous across the pool, or when an edge already exists.
No blocking issues surfaced. 2 lower-confidence candidates did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2234 functions depend on the 479 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 639 callers, 45 callees - new:
_rebuild_code()— 123 callers, 53 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 125 callees - new:
_get_extractor()— 26 callers, 6 callees - new:
extract_rust()— 19 callers, 6 callees - new:
run_pipeline()— 8 callers, 13 callees - …and 32 more — each is listed as a finding
Verification — 2234 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 2059 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
284 of 284 test file(s) selected (100%) via static blast radius.
Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.
tests/test_affected_cli.py— full-run-safetytests/test_affected_member_seed.py— full-run-safetytests/test_agents_platform.py— full-run-safetytests/test_analyze.py— full-run-safetytests/test_anthropic_custom_endpoint.py— full-run-safetytests/test_antigravity_install.py— full-run-safetytests/test_apm_fallback_version.py— full-run-safetytests/test_architecture_doc.py— full-run-safetytests/test_astro_extraction.py— impact, full-run-safetytests/test_astro_import_ids.py— impact, full-run-safetytests/test_atomic_canvas_export.py— full-run-safetytests/test_atomic_version_stamp.py— full-run-safetytests/test_atomic_writes.py— full-run-safetytests/test_backend_env_isolation.py— full-run-safetytests/test_backend_extras.py— full-run-safetytests/test_benchmark.py— full-run-safetytests/test_benchmark_raw_graph.py— full-run-safetytests/test_build.py— impact, full-run-safetytests/test_build_merge_dedup_scope.py— full-run-safetytests/test_build_merge_hyperedges_and_prune.py— full-run-safetytests/test_build_merge_shrink_guard.py— full-run-safetytests/test_builtin_global_type_refs.py— impact, full-run-safetytests/test_cache.py— full-run-safetytests/test_callflow_html.py— full-run-safetytests/test_cargo_introspect.py— full-run-safetytests/test_carried_hyperedge_remap.py— full-run-safetytests/test_case_sensitive_resolution.py— impact, full-run-safetytests/test_charmap_encoding.py— full-run-safetytests/test_chunking.py— full-run-safetytests/test_cjs_module_extension.py— impact, full-run-safetytests/test_claude_cli_backend.py— full-run-safetytests/test_claude_md.py— full-run-safetytests/test_cli_broken_pipe.py— full-run-safetytests/test_cli_export.py— full-run-safetytests/test_cli_help.py— full-run-safetytests/test_cluster.py— full-run-safetytests/test_codebuddy.py— full-run-safetytests/test_community_hub_labels.py— full-run-safetytests/test_community_labels_skill.py— full-run-safetytests/test_confidence.py— full-run-safetytests/test_corrupt_graph_json.py— full-run-safetytests/test_cpp_nested_and_cli.py— impact, full-run-safetytests/test_cpp_objc_cross_file_calls.py— impact, full-run-safetytests/test_cpp_preprocess.py— full-run-safetytests/test_cross_extension_reexport_self_cycle.py— impact, full-run-safetytests/test_cross_language_call_resolution.py— impact, full-run-safetytests/test_cross_repo_external_call_guards.py— impact, full-run-safetytests/test_cross_repo_member_calls.py— impact, full-run-safetytests/test_cross_repo_shared_types.py— full-run-safetytests/test_csharp_call_site_generic_args.py— impact, full-run-safety- … and 234 more
non-code file(s) changed (
CHANGELOG.md) → running the full suite for safety (a code graph can't see config/fixture/data deps)
changed code file(s) with no mapped test (
CHANGELOG.md) — a coverage gap or a missing link — running the full suite rather than only the selected tests
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
Could not verify: Could not verify extract\_rust.
The verifier did not have enough to check extract\_rust, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: parameter `path` is annotated `Path` — outside the synthesizable primitive/collection set
· 1 grounded finding(s) anchored inline below; 39 more finding(s) on lines outside this diff (see the check run).
| add_edge(func_nid, tgt, "references", line, context=ctx) | ||
|
|
||
| def walk(node, parent_impl_nid: str | None = None) -> None: | ||
| def walk(node, parent_impl_nid: str | None = None, parent_impl_type: str | None = None) -> None: |
There was a problem hiding this comment.
walk()
fans out to 8 callees (efferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
|
Shipped in v0.9.63 (on PyPI). Cherry-picked with authorship preserved. Nicely scoped — pooling methods across every |
Summary
Fixes #2234.
Rust receiver-method calls (
self.method(),receiver.method()) never produced a cross-filecallsedge. Rust is the only major supported language with no_resolve_*_member_callspass, so its member calls were dropped by the shared "member calls have no import evidence" guard (#543/#1219) with nothing behind it to recover them — unlike Swift, Python, TypeScript, C++, C#, Java, and Objective-C, each of which has a dedicated resolver.This lands the narrow, high-confidence slice the issue itself suggested:
self.method()insideimpl Foo { .. }. The receiver's type is known syntactically at the call site — no inference needed — and this alone covers the hub-method blind spot the issue measured on a real 533-file Rust tree.Design note: why this differs from the Kotlin/Swift resolvers
Kotlin and Swift's resolvers require a type name to resolve to exactly one node before proceeding. A literal port of that rule to Rust would have refused the issue's own motivating case: Rust routinely splits
impl Foo { .. }across as many files as it likes, andrust.pymints a separate graph node per(file, type name)pair rather than merging them into one canonical type node. Requiring a single node would bail on every split impl block — exactly backwards for this issue.Instead, every node carrying the type's bare label pools its methods together, and a call resolves only when exactly one method across the whole pool matches the callee name. Two impl blocks (however many files apart) defining the same method name still bail — a real ambiguity, not a false one. Verified both directions: a split impl block resolves correctly, and two unrelated structs sharing a bare name with a colliding method name correctly yield no edge.
Test plan
tests/test_rust_self_member_calls.py: the issue's own split-impl-block shape now resolves (EXTRACTED); the pre-existing same-file case is unaffected; two differently-defined structs sharing a name and a colliding method yield no edge; a call to a genuinely undefined method yields no edge.python3 -m tools.skillgen --check: OK.🤖 Generated with Claude Code