Skip to content

bug(indexer): SCIP job progress exceeds 100% (observed 400%) and reports negative time remaining when SCIP covers only part of the repo #1535

Description

@Shashankss1205

tools/indexing/scip_pipeline.py:112 vs :210-216

total_files is snapshotted once from the SCIP-covered file count:

update_job(job_id, total_files=len(files_data))

The supplementary Tree-sitter pass afterwards indexes every repo file SCIP missed, incrementing processed past that total:

files_data[abs_str] = ts_data
processed += 1
update_job(..., processed_files=processed)

Reproduction

Mocked ScipIndexer/ScipIndexParser over a 4-file repo where SCIP reports 1 file:

status=COMPLETED  total_files=1  processed_files=4  progress_percentage=400.0

Impact

Any indexer covering a subset of the repo hits this — scip-php with a Composer classmap, scip-clang without full compdb coverage, scip-typescript on a partial tsconfig. Two visible symptoms:

  • JobInfo.progress_percentage exceeds 100 (400% above).
  • While RUNNING, remaining_files = total - processed goes negative, and management_handlers.check_job_status formats that into output like "-1m -40s" remaining.

Suggested fix

Recompute total_files before the supplementary pass begins (the full discovery list is known by then), or count the supplement into the total as files are added rather than treating the SCIP count as final.


Environment
Commit c0e0bed (main)
Python 3.12.3, Linux

Reproduced with mocked SCIP components over a 4-file repo.

Activity

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

    area: indexerParsing, discovery, resolution, persistencebugSomething isn't workingseverity: lowCosmetic, dead code, or a narrow-trigger correctness issue

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions