Repository navigation
Description
Summary
On a large Java multi-module monorepo, codegraph index at the repo root scans only 1 file and indexes ~180 files on 1.6.1 and 1.6.2, while 1.6.0 on the exact same tree indexes 12,831–12,958 files. No .java files are included in the 1.6.1/1.6.2 index.
Environment
- macOS (Apple Silicon), Node 24.3.0
- codegraph 1.6.0 / 1.6.1 / 1.6.2 (installed via the official installer;
codegraph upgrade <version>to switch) - Repo shape (private, so no URL): Java monorepo, 73 top-level entries / ~20 modules
git ls-files | wc -l→ 21,777*.javaon disk → 20,307- total files (excl.
.git) → 65,966 git ls-files --others --ignored --exclude-standard | wc -l→ 44,215git ls-files --others --exclude-standard | wc -l→ 0.git/info/exclude→ one entry (.claude);core.excludesFile→ global ignore with only standard macOS entries (.DS_Store,*.tmp, …)- no nested git repos, no submodules, no symlinked directories at the root
Repro
codegraph index -v <repo-root>Observed scanning phase (same tree, same command, only the binary differs):
| version | scanning phase | result |
|---|---|---|
| 1.6.0 | thousands (1,000 files found … 6,000 files found …) |
Indexed 12,831 files, 537k nodes / 1.29M edges, 2m26s |
| 1.6.1 | 1 files found |
Indexed 179 files (only YAML / pom.xml / .properties / JS / Python — zero .java) |
| 1.6.2 | 1 files found |
Indexed 182 files (same mix) |
codegraph status right after the 1.6.1 run showed Files: 179 (down from 12,790), and the previous ~840 MB index had already been replaced, so the regression also destroys an existing index.
Narrowing
- Indexing a subdirectory that is a single module of the same repo works on 1.6.1/1.6.2 (
codegraph init <repo>/<module>→ 85–108 files, Java included). - A trivial standalone directory with one
.javafile works on 1.6.1 (Indexed 1 files). - So the failure is specific to scanning the repo root of this monorepo, not to Java parsing or to sub-project scans.
- Everything the scanner does find at the root is outside
src/trees; the module source trees (<module>/src/main/java/**) never appear.
Guess at the cause
The 1.6.1 release notes mention the watcher scope now matching git ls-files --exclude-standard and buildScopeIgnore reading .git/info/exclude / core.excludesFile. In this repo git ls-files --exclude-standard returns 21,777 paths (not empty), so if the scanner now derives its file list from that and then filters again, something in the interaction with the 44k ignored-untracked files or the module layout appears to prune everything except a handful of config files.
Ask
- Is this a known issue for 1.6.1/1.6.2?
- Is there a supported way to force a filesystem walk / bypass the git-derived scope (config or env var), so 1.6.2 can be used on repos like this?
- I can run any diagnostic build or provide a sanitized file listing if that helps localize it.
Happy to test a patch — 1.6.0 is the last version that indexes this repo correctly, so I'm staying on 1.6.0 for now.
Activity
maxmilian commentedon Nov 2, 2026
This looks like #2849. Since 1.6.1 (#1754), folders that git reports as ignored were added to the scope matcher as unanchored patterns, so an ignored folder at the repo root (e.g. a root
src/) also hid every module's folder with the same name. That matches 1.6.0 vs 1.6.1/1.6.2 on a multi-module Java tree. It was fixed on main by #2858 (a278c2ee, Oct 23), which isn't in a release yet. To confirm: doesgit ls-files -o -i --exclude-standard --directoryat your root list a top-level folder whose name also appears inside your modules?