Skip to content

feat(index): by-design coverage class — deliberately-ignored files reported as purposely not indexed#974

Merged
DeusData merged 1 commit into
mainfrom
feat/coverage-not-indexed
Jul 9, 2026
Merged

feat(index): by-design coverage class — deliberately-ignored files reported as purposely not indexed#974
DeusData merged 1 commit into
mainfrom
feat/coverage-not-indexed

Conversation

@DeusData

@DeusData DeusData commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Completes the #963 coverage taxonomy. The coverage report now distinguishes three classes:

class meaning nature
parse_partial indexed, but constructs in flagged ranges MAY be missing best-effort
skipped not indexed at all (oversized/read/parse failure) best-effort
not_indexed (new) deliberately excluded — gitignore/.cbmignore/skip-lists deterministic, by design

What it does

  • Discovery classifies every per-file skip by reason (gitignore, cbmignore, skip-list, ignored-suffix, fast-pattern, size-cap) via the new cbm_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).
  • Persistence: not_indexed_file / not_indexed_dir rows in the same index_coverage table, rewritten fresh from discovery on every run (full and incremental); exempt from the deleted-file prune (deliberately-unindexed paths have no hash rows).
  • Reporting: index_repository gains not_indexed_files (+ always-present not_indexed_files_count); index_status's coverage report gains a not_indexed section (dirs + files + note). The note frames the class as deliberate: not an error — change the ignore rules and re-index to include them.
  • Strict separation from failures: by-design rows never appear in skipped/parse_partial, never enter the missed shadow graph, and can never trigger the UI's report-an-edge-case callout.

Tests

  • e2e (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.
  • store unit test: prune exemption + shadow-graph exclusion.
  • Live CLI check: {path: secret.py, reason: gitignore} + excluded dirs: [vendor] with skipped: 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.

…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>
@DeusData DeusData added this to the 0.9.1-rc milestone Jul 9, 2026
@DeusData DeusData merged commit d6bbb0a into main Jul 9, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant