Description
Summary
_read_files caps every unit at _FILE_CHAR_CAP (20,000 characters) before joining it into the user message. expand_oversized_files exists precisely so an oversized document is split into contiguous FileSlices that together cover the whole file — but it only splits suffixes listed in _SPLITTABLE_TEXT_SUFFIXES, and that list has drifted from detect.DOC_EXTENSIONS.
reach the semantic pass : .html .md .mdx .pdf .qmd .rst .skill .txt .yaml .yml
sliced when oversized : .markdown .md .mdx .rst .txt
never sliced : .html .pdf .qmd .skill .yaml .yml
Anything in that third row loses everything past 20,000 characters, silently.
Reproduce
A 38,411-character document, same content, five different extensions:
.md splittable=True units=3 chars reaching the LLM=38411 LOST=0
.qmd splittable=False units=1 chars reaching the LLM=20000 LOST=18411
.html splittable=False units=1 chars reaching the LLM=20000 LOST=18411
.yaml splittable=False units=1 chars reaching the LLM=20000 LOST=18411
.skill splittable=False units=1 chars reaching the LLM=20000 LOST=18411
Why it is worse than it looks
- Nothing reports it. There is no warning, no
_partial_filesmarker (that machinery tracks truncated responses, not truncated inputs), and nothing inGRAPH_REPORT.md. The graph looks complete. - Nothing in the tail can ever become a node. The semantic pass never sees the text, so the loss is invisible from inside the graph too — you cannot tell a document with a sparse second half from one that was cut.
- It is silent per-file, so it scales quietly. A corpus of long
.htmldocs loses roughly the same fraction of every one of them. - graphify's own
.skillfiles are in the gap, and they are well over 20k characters.
.md has worked correctly since #1369; the other document types were added to DOC_EXTENSIONS later and the splittable list was never updated to match.
Suggested fix
Add the plain-text document types — .qmd, .skill, .html, .yaml, .yml — to _SPLITTABLE_TEXT_SUFFIXES. _file_to_text reads all of them with a straight read_text, so a character range over the raw file is exactly what the model is shown; they slice identically to .md.
More importantly, pin the relationship so it cannot drift again: assert that every non-binary DOC_EXTENSION is splittable, so adding a document type without deciding how it gets sliced fails loudly instead of quietly dropping tails.
.pdf is the harder half
I would leave .pdf out of a first fix. Its bytes are not what the model sees — _file_to_text routes it through extract_pdf_text, while read_slice_text does path.read_text() — so slicing needs the converter threaded through the slicing path first. Worth its own change, but note that a paper over 20,000 characters is truncated today, and papers are among the longest things anyone points graphify at.
There is also a small mirror inconsistency: .markdown is in _SPLITTABLE_TEXT_SUFFIXES but not in DOC_EXTENSIONS, so it is never classified as a document in the first place.
I have the non-PDF half working with tests and will open a PR shortly.
Environment
| graphify | v8 @ b14b52e (0.9.47) |
| Python | 3.12, Windows 11 |
Activity
feat(detect): classify Typst (.typ) as documents (Graphify-Labs#2826)
fix(llm): slice every text document type, not just five of them (#2900)
fix(llm): bisect PDF slices on extracted text; reconcile splittable-P…
chore: bump to 0.9.49
safishamsi commentedon Aug 24, 2026
Fixed in v0.9.49: https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.49. Closing as resolved.
Classify Jinja templates as documents (Graphify-Labs#3427)
Merge upstream/v8 (graphify 0.9.61, +559 коммитов) в 1C/BSL + ArcadeD…