Commit 7ef79a2
committed
fix(parity): resolve C# same-class static bare calls in WASM and native (closes #1416)
Both WASM and native engines were missing call edges for bare static method
calls within the same C# class — e.g. `IsValidEmail()` inside
`Validators.ValidateUser` should resolve to `Validators.IsValidEmail`, but
neither engine had a same-class fallback for no-receiver calls.
Three-part fix:
1. WASM (`build-edges.ts`): after the `this.method()` same-class fallback,
add a parallel fallback for no-receiver calls: when `targets` is empty
and the call has no receiver, try `CallerClass.callName` in the same file.
Only fires after the global exact lookup already failed, so module-level
functions always win.
2. Native Rust (`edge_builder.rs`): mirror the WASM fallback in step 5
of `resolve_call_targets` — when `call.receiver.is_none()` and the
global exact lookup returns nothing, try `CallerClass.callName` scoped
to the same file.
3. Role parity (`native-orchestrator.ts`): the Rust pipeline classifies
roles before JS CHA/this-dispatch post-passes add edges, giving stale
fan-out medians. When those post-passes insert new edges, run a full
role re-classification so the final roles see the complete graph.
Result: C# same-file static recall improves from 0/2 (0%) to 2/2 (100%).
Build-parity test: 8/8 pass (nodes, edges, roles, ast_nodes identical).
docs check acknowledged1 parent a2f35d1 commit 7ef79a2
3 files changed
Lines changed: 59 additions & 0 deletions
File tree
- crates/codegraph-core/src
- src/domain/graph/builder/stages
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
506 | 526 | | |
507 | 527 | | |
508 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
1264 | 1283 | | |
1265 | 1284 | | |
1266 | 1285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
1663 | 1683 | | |
1664 | 1684 | | |
1665 | 1685 | | |
| |||
0 commit comments