StructuralChunker.chunk() returns an empty list for any document without markdown headings, so the entire document is silently excluded from the RAG index instead of being chunked as a single block or falling back to another strategy.
Steps to reproduce:
from ingestion.chunking.structural_chunker import StructuralChunker
c = StructuralChunker()
print(len(c.chunk('This is a plain document with no headings at all. ' * 20, {})))
# observed: 0 (a ~1000-char document produces no chunks)
Related failing test: test_document_with_no_headings in tests/unit/test_structural_chunker.py.
StructuralChunker.chunk()returns an empty list for any document without markdown headings, so the entire document is silently excluded from the RAG index instead of being chunked as a single block or falling back to another strategy.Steps to reproduce:
Related failing test:
test_document_with_no_headingsintests/unit/test_structural_chunker.py.