Repository navigation
call resolver: an explicit receiver no longer defaults to the caller's own class (#3837) - #4134
Merged
Merged
Conversation
…r's own class (#3837) An untyped receiver whose only own-file candidate is the caller's own class is ambiguous when another visible class defines the name. Java '->' (lambda arrow) is no longer read as a member-access qualifier. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
…lines, golden re-bless, docs - unit tests: an explicit non-this receiver is ambiguous when another visible class (import or package directory) defines the name; this/self and the nothing-else-visible case keep their answer; java '->' is a lambda arrow, not a qualifier separator (PHP/C keep it). The fix tests fail on main. - java baseline vs scip-java 0.12.3 (gson): confident precision 99.4 -> 99.7, strict 91.9 -> 92.8, recall 63.3 -> 64.9, resolution recall 64.9 -> 66.6; python baseline vs pyan3 2.8.1: precision 99.8 -> 99.9, recall unchanged. - golden masters (both modes): 430 readings move, all call-graph: PageRank 356, Fan Out 43, Fan In 31; every edge change is a removed link (74 readings, net -88), only in OO languages. Local main reproduces both goldens exactly. - docs/function_call_graph.md ladder and measurement table; callgraph-miss-sweep skill row marked fixed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
squid-protocol
marked this pull request as ready for review
October 3, 2026 08:08
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.
Fixes #3837
Root cause: this is not the
classstep.members.entrySet()inside JsonObject goes down the untyped-receiver path, and_visible_receiverreturnsfile(confident) as soon as the caller's own file defines the name on exactly one class. That class is the caller's own, even though LinkedTreeMap (imported) also definesentrySet. explain_call confirms this:file (scoped) -> JsonObject.java:entrySet@136 qualifier 'members'.Fix:
thisreceiver resolvesfileto the caller's own lineage class, and another visible file (an import, or the same package directory) also defines the name on a class, the call is an ambiguousreceiver.() -> toJson(gson, x)recorded the qualifier<expr>, because->was read as member access. Without this fix, the resolver change cost 13 correct links.->is no longer a qualifier separator for Java. Kotlin, Groovy and Scala have the same problem, but are left out because nothing measures them yet.Graph accuracy (run locally after merging main; same tools and pins as CI):
Both resolution baselines are regenerated to lock in the improvement. The Python baseline also absorbs earlier drift from main (recall 51.6% → 51.7% was already on main).
Golden masters (both modes), audited before the re-bless:
CSharpCompilation.Createfan-in goes from 12 to 8.tests/tools/update_golden_master.pyin a full-precision venv and in a PyYAML-only venv;test_golden_crucible.pypasses in both.Tests:
test_call_resolver.pygains four Call resolver: an explicit receiver is ignored when the caller's own class has a method of that name #3837 tests:this.still resolves to the caller's own class;filestep stays.The first two fail on main.
test_calls_out_qualifiers_3329.pygains a Java lambda arrow test (fails on main), plus a guard that->stays a separator for PHP and C.Suite and gates:
tests/core_engine+tests/extraction+ call-graph tool tests +test_source_reads.py: 11,333 passed.pr_gates.py --fast: lint, audits, secrets, X-Ray and gauntlet all pass.ruff_audit --ciis clean.Docs: the
fileandreceiverrungs ofdocs/function_call_graph.md, the Java lambda note and the measurement-table row; thecallgraph-miss-sweepskill row is marked fixed.🤖 Generated with Claude Code
https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ