You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(chunker): image-only pages silently skipped, leaving sections with zero chunks but visible in TOC #276
chunker.py's _section_page_text() filters out pages where page.text.strip() is falsy. Pages with only images (no extractable text) produce empty page.text, are silently skipped with no warning, and the resulting section has zero chunks — yet it still appears in the document's TOC and routing responses, returning zero search results.
No log entry is emitted when a page is skipped. A section spanning 5 pages where pages 2–4 are full-page images produces a chunk from page 1 and page 5 only — without the caller knowing that 60% of the section's content was silently ignored.
Failure Scenario
A regulatory document has a section "Compliance Matrix" spanning pages 10–15.
Pages 10–14 are full-page tables rendered as images (no text extractable).
Page 15 has a one-line summary.
chunk_section produces one chunk from page 15.
The section appears in TOC as "Compliance Matrix (pages 10-15)".
A query "What is in the compliance matrix?" returns only the one-line summary from page 15.
85% of the section's content is permanently invisible, with no indication to the operator.
Proposed Fix
Log a warning when pages are skipped:
ifnotpage.text.strip():
logger.warning(
"Page %d in section '%s' has no extractable text (image-only?) — skipping",
page.page_num,
entry.title,
extra={"doc_id": doc.doc_id, "section_id": entry.section_id},
)
continue
Expose skipped_pages count in IngestResult so operators can detect image-heavy documents:
Activity
piyushmakhija28 commentedon Jun 21, 2026
Fixed in PR #280 (Sprint R3/R4: fix(sprint-r3): root-cause fixes for all 39 bugs from code review round 3 + Sprint R4 round 4)