Commit 815bb67
jgstern-agent
fix(go): resolve import paths correctly for multi-file symbol disambiguation
INV-007: When multiple Go files define the same symbol (e.g., generated
protobuf files copied across services), the analyzer now correctly uses
import paths to disambiguate.
Changes:
- ListNameResolver.lookup() now tries progressively shorter path suffixes
(e.g., "zzz_correct/genproto" → "genproto") to find unique matches
- Falls back to deterministic (sorted by path) ordering when ambiguous
- Fixes flaky test failures on Python 3.13 due to dict ordering changes
The fix ensures call edges point to the correct target file based on
the import statement, not arbitrary file traversal order.
Signed-off-by: jgstern-agent <josh-agent@iterabloom.com>1 parent d8f1b5e commit 815bb67
3 files changed
Lines changed: 46 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
180 | 194 | | |
181 | 195 | | |
182 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
591 | 600 | | |
592 | | - | |
| 601 | + | |
593 | 602 | | |
594 | 603 | | |
595 | 604 | | |
596 | 605 | | |
597 | 606 | | |
598 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
599 | 620 | | |
600 | | - | |
| 621 | + | |
601 | 622 | | |
602 | 623 | | |
603 | 624 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
980 | 983 | | |
981 | 984 | | |
982 | 985 | | |
| |||
0 commit comments