fix: filter method call noise from call graph#108
Closed
gzenz wants to merge 2 commits intotirth8205:mainfrom
Closed
fix: filter method call noise from call graph#108gzenz wants to merge 2 commits intotirth8205:mainfrom
gzenz wants to merge 2 commits intotirth8205:mainfrom
Conversation
Method calls like obj.method(), response.json(), data.get() were recorded
as bare CALLS targets ("method", "json", "get"), creating false callers
via name collisions and polluting the graph with unresolvable noise.
Now only self/cls/this/super method calls emit CALLS edges -- these
resolve within the class. External method calls are dropped since they
are unresolvable without type inference.
Impact on this repo (Python): 58% fewer CALLS edges total, but only 6%
fewer resolved edges -- almost all useful relationships preserved.
7 tasks
… fallback - Exempt test files from method call filtering so TESTED_BY edges are preserved (test code calls production via object.method()) - Add jsx_self_closing_element and jsx_opening_element to _CALL_TYPES for tsx/javascript -- <Component /> now produces CALLS edges - Add _BUILTIN_NAMES per-language filter to skip len/print/str/etc. - Add Leiden-to-file-based fallback in communities.py when all Leiden clusters are smaller than min_size (fixes 0 communities regression) - Update test paths to use /src/ for production code tests (not /test/)
tirth8205
reviewed
Apr 8, 2026
Owner
tirth8205
left a comment
There was a problem hiding this comment.
The 58% edge reduction is impressive and the filtering logic (keeping only self/cls/this/super method calls) makes sense. Good test coverage.
Please rebase on latest main — there have been several merges recently. Once rebased and CI passes, we'll review for merge.
5 tasks
Owner
Review: PR #108 — fix: filter method call noise (DRAFT)This PR is superseded by PR #158, which incorporates this fix and many more improvements from the same author. The 58% reduction in spurious CALLS edges is included in #158. Recommendation: Close this PR in favor of #158. The owner's comment already asked for a rebase, and gzenz subsequently opened #158 as the consolidated replacement (confirmed in #103's comments). Note: This PR is still in DRAFT status. |
Contributor
Author
|
Superseded by #158. |
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.
Summary
obj.method(),response.json(),data.get()were recorded as bare CALLS targets (method,json,get), creating false callers via name collisionsself/cls/this/supermethod calls emit CALLS edges -- external method calls are droppedsuper().method()pattern (call node wrapping super identifier)Impact (measured on this repo, Python-only)
Test plan
test_method_call_filtering_python_self--self.method()emits CALLStest_method_call_filtering_python_external--obj.method()does nottest_method_call_filtering_python_super--super().method()emits CALLStest_method_call_filtering_ts_this--this.method()emits CALLStest_method_call_filtering_ts_external--obj.method()does not