Files
codegraph/__tests__
Colby MchenryandClaude Opus 5.5 72f398af6e fix(index): a video named .ts counts as skipped, so a full index isn't PARTIAL (#2943)
The full index's batch reader recognises an MPEG transport stream named
`.ts` from its first bytes (Issue #1910) and skips it, but that branch
counted the clip only as processed. Every other file the scan finds lands
in filesIndexed, filesSkipped or filesErrored, and CodeGraph.indexAll
checks those tallies against filesDiscovered, so the clip left the run one
file short. `codegraph init` and `codegraph index` then warned "Index is
missing 1 of N discovered files ... The index is PARTIAL", stored
index_state = partial, which `codegraph status` reports, and left the
indexed commit unrecorded, so status fell back to its full scan. The
branch now counts the clip in filesSkipped, as the branch below it does
for a file gone from disk.

Validation:
- mpeg-ts-not-typescript.test.ts: a new case (a clip beside one source
  file) fails on main's source with the tallies at 1 of 2, and passes
  with the fix: no index_partial warning, index_state complete. The
  file's other 11 cases pass.
- CLI: on main, `init -y` of app.ts plus testdata/clip.ts prints the
  PARTIAL warning, status --json reads state "partial", and in a git repo
  indexed_at_commit stays empty. With the fix it prints "Indexed 1 files",
  the state is "complete" and indexed_at_commit is HEAD.

Follow-up to Issue #1910, reported by @Hetox; found while fixing
Issue #2904 (PR #2928).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 01:04:24 +00:00
..