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(parser): page_count uses fitz total but pages tuple is shorter after per-page skip -- section page_end out of range #288
Fix #275 added per-page try/except so corrupt pages are skipped with a warning. But ParsedDocument is constructed with page_count=doc.page_count (total fitz page count including skipped pages) while pages=tuple(pages_list) only contains successfully parsed pages. Downstream code (toc_extractor._derive_page_ranges) uses page_count as the ceiling for the last section's page_end, creating section ranges that reference page numbers with no corresponding Page object in doc.pages. This causes silent gaps in chunking where chunks are expected but never created.
Fix
ingestion/parser.py after the per-page loop: set page_count=len(pages_list) so it matches the actual number of parsed pages.
Impact
Documents with corrupt/skipped pages have incorrect TOC section page ranges. Chunks expected for those sections are never created, producing silent content gaps.
Activity
fix(sprint-r4): root-cause fixes for all 17 bugs from code review rou…
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)