Repository navigation
bug(indexer): SCIP path never records non-code files, so cgc index reports "only N of M files indexed" forever #1565
Description
Reported by a user indexing a 46-file C# project with scip-dotnet:
I got a project with 46 files, only some of them are C# ofc but
cgc index .seems to "never seem to have completed" … it saidrepository '.' has only 32 of 46 files indexed. Continuing.then it completes indexing and… if I run it again and again and again it always says only 32 of the 46 have been indexed
Cause
Two different rules count files, and one can never be satisfied.
The "46" comes from cli_helpers.py:350 → graph_builder.estimate_processing_time() → discover_files_to_index(), which returns supported extensions plus a generic set (discovery.py:14-22):
_GENERIC_EXTENSIONS = {".toml", ".sh", ".yaml", ".yml", ".json", ".ini",
".cfg", ".md", ".txt", ".bat", ".ps1"}
_GENERIC_FILENAMES = {"Dockerfile", "Makefile", ".gitignore",
".dockerignore", ".env"}The "32" is MATCH (r:Repository {path:$path})-[:CONTAINS*]->(f:File) RETURN count(DISTINCT f).
The gap is at scip_pipeline.py:198-200, in the supplementary Tree-sitter pass:
ts_parser = get_parser(repo_file.suffix)
if not ts_parser:
continue # no File node, no record, nothingThe Tree-sitter pipeline does not have this hole — pipeline.py:189 falls back to add_minimal_file_node for exactly these files, and parse_file distinguishes them deliberately so it can: generic types return "unsupported": False (graph_builder.py:1048) while genuinely unparseable ones return True (:1053).
So the two pipelines disagree about what counts as a file, and the SCIP path is short by exactly the number of non-code files.
Reproduction
$ # 32 .cs files + 14 typical non-code files
files on disk: 46
discover_files_to_index (expected): 46
with a .cs parser: 32
with NO parser: 14 (.gitignore, Dockerfile, LICENSE.txt,
README.md, appsettings.json, build.sh, …)
SCIP path writes File nodes for: 32The 32/46 split is the natural one for a project of that shape, not a coincidence.
Impact
Cosmetic in terms of graph content — the C# code is fully indexed, and the missing entries would only ever be inert placeholder nodes. But:
cgc index .reports a partial index on every run and re-indexes each time; the state cannot be cleared (--forcere-indexes but the warning returns).- It is indistinguishable from a real partial index, so a genuine failure would be invisible.
- Only the SCIP path is affected, so behaviour differs by language for the same repository.
Fix
Give scip_pipeline the same add_minimal_file_node fallback the Tree-sitter pipeline has, so both agree on what a file is.
Environment
| Version | 0.5.4 |
| Backend | LadybugDB (also applies to other backends) |
| Indexer | scip-dotnet |
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsNo status
Activity
github-actions commentedon Aug 2, 2026
Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ
fix(indexer): record non-code files on the SCIP path (#1565) (#1566)
chore(release): bump version to 0.5.5 (#1569)