fix(go): retain interface method signature references - #3737
oleksii-tumanov wants to merge 2 commits into
Conversation
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).
Graphify review — findings
Emits references edges from Go interface method nodes to their parameter and return types by calling emit_go_method_refs on each method_elem, so interface signatures now carry the same type references as their concrete implementations. Registers case-only method-name collisions in case_groups during _scan_declarations so distinct interface methods differing only by case keep separate signature owners with stable IDs regardless of declaration order. Adds tests covering signature type references on both interfaces and structs, warm-extraction stability, case-collision owner separation, and preservation of exported method IDs when a private sibling is removed.
No blocking issues surfaced. 2 lower-confidence candidates did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 48 functions depend on the 31 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract_go()— 19 callers, 7 callees - new:
walk()— 1 callers, 8 callees
Verification — 48 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: 48 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
3 of 290 test file(s) selected (1%) via static blast radius.
tests/test_go_interface_methods.py— impact, changed-testtests/test_languages.py— impacttests/test_multilang.py— impact
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.
· 2 more finding(s) on lines outside this diff (see the check run).
|
Shipped in v0.9.66 (on PyPI). Cherry-picked with authorship preserved so it shows under your GitHub contributions. Thanks @oleksii-tumanov! |
What does this PR do?
Fixes #3736.
Use the existing Go signature-reference helper for interface methods, so their
parameter and result types get the same links as concrete methods.
Include named interface methods in the existing case-collision scan. This keeps
signatures such as
Run(InputA)andrun(InputB)attached to distinct methods,using the current ID policy rather than introducing a new one.
No changes to embedding, type constraints, call resolution, top-level type
identity, or the helper's existing variadic-parameter behavior.
Type of change
How was this tested?
Tests cover named/unnamed parameters, pointer and grouped results, builtin
filtering, concrete-method parity, source ownership, and cold/warm extraction.
Case-only method tests also check declaration-order independence, owner isolation,
and stable exported IDs when a private sibling is removed.
Ruff, all five skillgen checks, and
graphify update . --no-clusterpassed.Graphify-specific checklist