feat(graph): unique-method-name call edges + Parent::child qualifiers#454
Merged
Conversation
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both from a live agent debrief on a SWE-bench pair (xarray reset_index):
Dynamic-dispatch blind spot:
sem impact keep_levels --dependentssaid 'No dependents' whileDataset.reset_indexcalls it viaindex.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::childis now accepted everywhereParent.childis (graph-path and SQLite-cached lookups).Verified on the live repo:
keep_levelsshows its real dependent;Dataset::set_index --testsresolves 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.