Plan (optional)
None — small scoping fix.
Problem
File discovery (codeanalyzer/core.py ~line 870) walks project_dir.rglob("*.py") and skips only site-packages, .venv, and .codeanalyzer path parts. A project built with setuptools carries build/lib/** — byte copies of its package sources — so every module is analyzed twice (once under its real path, once under build/lib/...), inflating the symbol table and downstream graphs. Same bug class just fixed in codeanalyzer-java, where Gradle's build/resources copies of test fixtures leaked into analysis (codellm-devkit/codeanalyzer-java#199); found during that fix's propagation sweep. dist/ (sdist/wheel staging) and *.egg-info are worth the same look.
Scope boundary
Discovery filter only. No schema change, no change to what a module contains — only which files become modules.
Goals
Caveats and known risks
- A project with hand-written sources under a top-level
build/ package would lose them — accepted, collides with setuptools' own output convention.
Definition of done
Plan (optional)
None — small scoping fix.
Problem
File discovery (
codeanalyzer/core.py~line 870) walksproject_dir.rglob("*.py")and skips onlysite-packages,.venv, and.codeanalyzerpath parts. A project built with setuptools carriesbuild/lib/**— byte copies of its package sources — so every module is analyzed twice (once under its real path, once underbuild/lib/...), inflating the symbol table and downstream graphs. Same bug class just fixed in codeanalyzer-java, where Gradle'sbuild/resourcescopies of test fixtures leaked into analysis (codellm-devkit/codeanalyzer-java#199); found during that fix's propagation sweep.dist/(sdist/wheel staging) and*.egg-infoare worth the same look.Scope boundary
Discovery filter only. No schema change, no change to what a module contains — only which files become modules.
Goals
build/lib(anddist,*.egg-infoif confirmed) excluded from discoverybuild/libcopy of a real module yields one module, not twoCaveats and known risks
build/package would lose them — accepted, collides with setuptools' own output convention.Definition of done