Skip to content

feat(graph): unique-method-name call edges + Parent::child qualifiers#454

Merged
rs545837 merged 2 commits into
mainfrom
feat/method-edges-and-qualifiers
Jul 3, 2026
Merged

feat(graph): unique-method-name call edges + Parent::child qualifiers#454
rs545837 merged 2 commits into
mainfrom
feat/method-edges-and-qualifiers

Conversation

@rs545837

@rs545837 rs545837 commented Jul 3, 2026

Copy link
Copy Markdown
Member

Both from a live agent debrief on a SWE-bench pair (xarray reset_index):

Dynamic-dispatch blind spot: sem impact keep_levels --dependents said 'No dependents' while Dataset.reset_index calls it via index.keep_levels(...) — receiver type unknown, no edge. Now, when a method name has exactly one definition repo-wide and that definition is a member (has a parent entity), the attribute call resolves to it. One candidate = one edge; any ambiguity = no edge, so this cannot manufacture false callers. Restricted to members so attribute calls never bind to same-named free functions, and gated on cross-file resolution.

Qualifier ergonomics: the benchmark agent burned 4 of its 9 sem calls on ambiguity retries, trying DataVariables::__len__-style names. Parent::child is now accepted everywhere Parent.child is (graph-path and SQLite-cached lookups).

Verified on the live repo: keep_levels shows its real dependent; Dataset::set_index --tests resolves without --file. Full suite green except the two pre-existing cwd_resolution failures (present on clean main).

Measured effect on the benchmark task (agent-reported, 3-run medians): graph-selected verify loop 0.59s vs 2.90s whole-file runs (4.9x per iteration); 999 bytes of sem test-selection output replaced scanning a 489KB test corpus.

Attribute calls on unknown-type receivers resolve when the method name
is repo-unique and a member (index.keep_levels -> PandasMultiIndex.
keep_levels), surfacing dependents and affected tests that dynamic
dispatch hid. Class::method accepted alongside Class.method in graph
and cached entity lookups.

@inspect-review inspect-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect review

Triage: 4 entities analyzed | 0 critical, 0 high, 4 medium, 0 low
Verdict: standard_review

Findings (0)


Reviewed by inspect | Entity-level triage found 0 high-risk changes

…gelog

TS/Swift shadow-intent tests (local binding shadows imported class,
instance-property receivers) must keep their no-edge semantics; the
recall win is Python/Ruby where receiver types are statically
unknowable.

@inspect-review inspect-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect review

Triage: 4 entities analyzed | 0 critical, 0 high, 4 medium, 0 low
Verdict: standard_review

Findings (0)


Reviewed by inspect | Entity-level triage found 0 high-risk changes

@rs545837 rs545837 merged commit 488c5e2 into main Jul 3, 2026
3 checks passed
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.

1 participant