Skip to content

bug(scip): index never converges — 'only N of M files indexed. Continuing.' on every run, and no summary is printed #1673

Description

@Shashankss1205

User report (scip-dotnet, mixed 46-file repo, LadybugDB):

  • First cgc index . took ~11s and finished with no report at all — no file/function counts.
  • Every subsequent cgc index . said "repository '.' has only 32 of 46 files indexed. Continuing.", re-ran, completed — and the next run said exactly the same thing. It never reaches "already indexed".

Root causes (verified in source)

  1. Files can vanish from the SCIP path's accounting. The Tree-sitter supplement pass skips files whose parse returns an error or raises (continue with no node), and a failing add_file_to_graph for a SCIP-covered file likewise leaves nothing. The Tree-sitter pipeline gives every discovered file at least a minimal File node precisely so graph count == discovery census; the SCIP path only did this for the no-parser case. Result: the resume check (Repository-[:CONTAINS*]->File count vs estimate_processing_time census) can never converge, and 'Continuing' loops forever.
  2. The SCIP path never populates last_index_summary, so cgc index finishes silently (and worse: a SCIP run in a process that previously ran the Tree-sitter pipeline would print the stale previous summary).
  3. Census asymmetry: the resume check called estimate_processing_time without the context's cgcignore_path while the pipelines filter with it — a context-scoped ignore makes the expected count permanently higher than reality.
  4. The 'only N of M' message names no files, so there is nothing actionable when the gap is real.

Fix

  • Minimal-File-node fallbacks on every shortfall path in the SCIP pipeline (parse error, parse crash, write failure) — convergence by construction.
  • SCIP pipeline populates the CLI summary (and the builder resets it before a SCIP run).
  • estimate_processing_time accepts cgcignore_path and the resume check passes the context's.
  • The 'Continuing' branch now lists up to 5 missing files by name.

Regression-tested with a fake scip module against a real embedded database, including a simulated parser crash.

Activity

  1. github-actions commented on Aug 26, 2026

    @github-actions
    Contributor

    Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ

  2. moved this from Backlog tasks to In progress in CGC Progress Boardon Aug 26, 2026
  3. moved this from In progress to Done in CGC Progress Boardon Aug 26, 2026
  4. moved this from Done to In progress in CGC Progress Boardon Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions