Repository navigation
Call resolver: follow barrel re-exports (__init__.py, index.ts) — Python resolution recall 72% → 90% - #3689
Merged
Conversation
…e import step `from fastapi import Depends` resolves to fastapi/__init__.py, which only re-exports Depends from param_functions.py, so the import step found no definition and the call fell to a repository-wide name search (a tie). A caller that imports a barrel file now also sees what the barrel imports, at most two barrel hops deep; importing an ordinary module still does not make its imports visible. call_graph_resolution.py python (pyan3, language-crucible): confident precision 98.7 -> 99.4 (1277 -> 1567 judged), recall 36.1 -> 44.6, resolution recall 71.8 -> 90.2. Baseline regenerated. Golden masters (both): 48 values, all downstream of fastapi links that now land on the defining module -- param_functions.py direct downstream 2 -> 92, applications.py 1 -> 44, routing.py 6 -> 13 -- plus the corpus-wide Composition Fit z-scores, network macros and forensic top lists they move. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GCpfMCUMpco98QGbsuv2sr
Contributor
2 tasks done
squid-protocol
pushed a commit
that referenced
this pull request
Sep 25, 2026
…tructors Kept both test sections in test_call_resolver.py; took main's side for the resolution baseline and golden masters, then regenerated them with both changes: call_graph_resolution.py python -> confident precision 99.3% (1687 judged), recall 48.0%, resolution recall 90.2%. Golden masters move 4 values each (network_macro, one forensic top list). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GCpfMCUMpco98QGbsuv2sr
This was referenced Sep 26, 2026
Merged
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
A Level 2 (call-graph resolution, epic #3265) improvement found by breaking down where the resolver loses pyan3's edges on language-crucible's Python repos.
Problem. The biggest single loss was
tie(308 edges): the engine had the callee name, but ended up with several equally plausible definitions. The typical case isfrom fastapi import Dependsin a test:fastapi/__init__.py, a barrel that only re-exports:from .param_functions import Depends as Depends.importstep finds noDependsdefined in the barrel.Dependsfunction and class tie.Fix (
gitgalaxy/core/call_resolver.py,_with_reexports):__init__.py, orindex.{js,ts,tsx,jsx,mjs,cjs,mts}), it can also see the files that barrel imports. Barrels importing barrels are followed at most 2 hops.importstep.Type of change
gitgalaxy/core/call_resolver.py)Measured:
call_graph_resolution.py python(pyan3 reference, language-crucible)tests/call_graph_resolution_baseline.jsonis regenerated. pyan3 is a reference, not ground truth: "wrong" means pyan links the same caller to a different function of that name.Golden masters
Both fixtures re-blessed with
crucible_check.py --mode both --update --yes. The 48 differences per fixture were all reviewed; the count is below the 50-line display cap, so none were hidden. They're all downstream of fastapi calls that now land on the defining module:fastapi/param_functions.pyDepends(...)in the tests)fastapi/applications.pyFastAPI(...))fastapi/routing.pyfastapi/datastructures.pyfastapi/exceptions.pyfastapi/background.pyThe remaining differences follow from those:
network_macro(avg path length, modularity, assortativity);Tests
tests/core_engine/test_call_resolver.pyadds four tests:importlink;index.tsbarrel is followed.Verification
A sibling PR (constructor calls → constructor method) also touches
call_resolver.pyand both golden masters. Whichever merges second needs a golden-master re-bless.🤖 Generated with Claude Code
https://claude.ai/code/session_01GCpfMCUMpco98QGbsuv2sr
Generated by Claude Code