Repository navigation
fix(indexer): record non-code files on the SCIP path so cgc index stops reporting a partial index - #1566
Merged
Conversation
`cgc index .` reported "Repository '.' has only 32 of 46 files indexed.
Continuing." on every run of a C# project, and no amount of re-indexing
cleared it.
Two rules were counting files and one could never be satisfied.
`estimate_processing_time` -> `discover_files_to_index` returns supported
extensions plus a generic set (.md, .json, .yaml, .toml, .sh, Dockerfile,
.gitignore, ...), while the check compares that against File nodes in the
graph. The SCIP pipeline's supplementary pass skipped any file it had no
parser for:
ts_parser = get_parser(repo_file.suffix)
if not ts_parser:
continue # no File node, no record, nothing
so the graph was short by exactly the number of non-code files.
The Tree-sitter pipeline has no such hole: pipeline.py:189 falls back to
add_minimal_file_node, and parse_file separates the two cases on purpose —
generic types return "unsupported": False (graph_builder.py:1048) while
genuinely unparseable ones return True (:1053). The SCIP path simply never
grew the fallback, so the two pipelines disagreed about what a file is.
Give the SCIP path the same fallback. Non-code files now get a minimal
File node, count toward job progress, and are reported in the summary log.
Regression test asserts the two pipelines agree: for a 32-source +
14-non-code repo, File nodes written == files discovered. Reverting the
fix fails it with "graph would hold 32 File nodes but discovery expects
46", reproducing the report exactly.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ |
Contributor
🔍 PR Code Graph Analysisfix(indexer): record non-code files on the SCIP path so 📊 Interactive VisualizationView the blast radius graph: PR Reviewer Dashboard 📦 ArtifactsThe graph JSON has been uploaded as a build artifact: Generated by CodeGraphContext using FalkorDB Lite |
Shashankss1205
added a commit
that referenced
this pull request
Aug 2, 2026
Bug-fix release. Since 0.5.4 on PyPI: - fix(indexer): record non-code files on the SCIP path so `cgc index` stops reporting a partial index forever (#1565, #1566) - fix(parsers): capture PHP imports rather than trait uses (#1522, #1563) - fix(parsers): recover Python annotated parameters — 40.3% of parameters were being dropped — and Go grouped imports (#1520, #1521, #1561) - fix(graph): always sanitize bundle filenames (#1517, #1541) - fix(cli/mcp): read import aliases from the IMPORTS relationship (#1515, #1540) - fix(cli/mcp): fall back to JSON when GCF encoding fails (#1518, #1539) Co-authored-by: Claude Fable 5 <[email protected]>
This was referenced Aug 5, 2026
This branch was successfully deployed
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.
Fixes #1565 — reported by a user indexing a 46-file C# project with
scip-dotnet, wherecgc index .said "Repository '.' has only 32 of 46 files indexed. Continuing." on every run and never converged.Full suite: 1080 passed, 7 skipped, no failures.
Cause
Two rules counted files, and one could never be satisfied.
The expected count comes from
estimate_processing_time→discover_files_to_index, which returns supported extensions plus a generic set (discovery.py:14-22):.md .txt .json .yaml .yml .toml .ini .cfg .sh .bat .ps1, plusDockerfile,Makefile,.gitignore,.dockerignore,.env.The actual count is
Filenodes in the graph.The gap was
scip_pipeline.py, in the supplementary Tree-sitter pass:The Tree-sitter pipeline has no such hole —
pipeline.py:189falls back toadd_minimal_file_node, andparse_fileseparates the two cases deliberately so it can: generic types return"unsupported": False(graph_builder.py:1048) while genuinely unparseable ones returnTrue(:1053).So the two pipelines disagreed about what counts as a file, and the SCIP path was short by exactly the number of non-code files in the repo.
Reproduction
The 32/46 split is the natural one for a project of that shape, not a coincidence.
Fix
Give the SCIP path the same fallback. Non-code files now get a minimal
Filenode, count toward job progress, and are surfaced in the summary log:Test
tests/unit/tools/test_scip_pipeline_minimal_nodes.pypins the two pipelines to the same contract: for a 32-source + 14-non-code repo, File nodes written must equal files discovered.Reverting the fix fails it with the reported symptom:
Notes for review
total_filesis snapshotted before this supplementary pass). This PR makesprocessedinclude minimal nodes, which is consistent with that count once bug(indexer): SCIP job progress exceeds 100% (observed 400%) and reports negative time remaining when SCIP covers only part of the repo #1535 is fixed.🤖 Generated with Claude Code