feat(index): by-design coverage class — deliberately-ignored files reported as purposely not indexed#974
Merged
Merged
Conversation
…e class Completes the #963 coverage taxonomy: alongside the best-effort FAILURE signals (parse_partial, skipped), the report now lists what was deliberately NOT indexed — a deterministic, by-design class, never mixed into the failure surfaces. - discover: file skips are classified by reason (gitignore / cbmignore / skip-list / ignored-suffix / fast-pattern / size-cap) and collected via the new cbm_discover_ex2 (per-file entries capped at 2000 with the uncapped total reported — truncation is explicit, never silent; whole excluded subtrees stay exhaustive as before). Unsupported-extension files are deliberately NOT recorded: no grammar for an extension is not an ignore decision, and listing every README/asset would drown the signal - pipeline: ignored files captured per run (full + incremental) and persisted into the index_coverage table as not_indexed_file rows, excluded dirs as not_indexed_dir; incremental runs rewrite the by-design set fresh from discovery instead of carrying old rows - store: the deleted-file prune exempts not_indexed_* (deliberately unindexed paths never have hash rows); the missed shadow graph keeps showing FAILURES only — the UI's report-an-edge-case callout can never fire for gitignored paths, and a project whose only coverage rows are by-design gets no miss graph at all - mcp: index_repository response gains not_indexed_files {files, count, truncated, note} (dirs stay under excluded); index_status's coverage report gains a not_indexed section (dirs + files + note) and no longer lumps by-design rows into skipped; tool descriptions updated — the by-design class is presented as deliberate and deterministic (change the ignore rules and re-index), with no best-effort hedging - tests: e2e guard (gitignored file + dir reported with reasons on both surfaces, failure surfaces stay clean, missed graph excludes them, rows survive an incremental re-index, ignored constructs genuinely absent from the graph); store unit test covers the prune exemption and shadow-graph exclusion Refs #963 Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This was referenced Jul 9, 2026
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.
Summary
Completes the #963 coverage taxonomy. The coverage report now distinguishes three classes:
parse_partialskippednot_indexed(new)What it does
gitignore,cbmignore,skip-list,ignored-suffix,fast-pattern,size-cap) via the newcbm_discover_ex2. Per-file entries are capped at 2000 with the uncapped total always reported — truncation is explicit, never silent. Excluded subtrees stay exhaustive. Unsupported-extension files are deliberately NOT listed (not an ignore decision; would drown the signal).not_indexed_file/not_indexed_dirrows in the sameindex_coveragetable, rewritten fresh from discovery on every run (full and incremental); exempt from the deleted-file prune (deliberately-unindexed paths have no hash rows).index_repositorygainsnot_indexed_files(+ always-presentnot_indexed_files_count);index_status's coverage report gains anot_indexedsection (dirs + files + note). The note frames the class as deliberate: not an error — change the ignore rules and re-index to include them.skipped/parse_partial, never enter the missed shadow graph, and can never trigger the UI's report-an-edge-case callout.Tests
test_index_resilience.c): gitignored file + dir reported with reasons on both surfaces; failure surfaces stay clean; missed graph excludes them; rows survive an incremental re-index; the ignored constructs are genuinely absent from the graph while neighbors are indexed.{path: secret.py, reason: gitignore}+excluded dirs: [vendor]withskipped: 0, parse_partial: 0.Local: 814 tests across affected suites green (ASan/UBSan), lint-format + lint-cppcheck clean.
Refs #963 — closes out the issue's remaining scope once merged.