Repository navigation
fix(server): a large footnote no longer erases a DOCX attachment's body text - #48479
StiensWout wants to merge 3 commits into
Conversation
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…dy text Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Oversized DOCX footnotes and endnotes no longer prevent extraction of the document body. Existing parsing limits and truncation signaling remain intact, keeping the change narrowly scoped. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
When a DOCX footnotes or endnotes part went over the XML node limit, extraction threw before reading any body paragraphs, so the saved text held only the truncation notice. The notes part is now read like the main document: the parser drops only the footnote or endnote still open at the limit, keeps every completed note inline where it is referenced, keeps the whole body, and ends the text with the truncation notice.
Related: #37889
Reproduction on main
Commit efbd62a7a7 (main). The extracted text contains only a truncation notice. The report body is missing. Expected: The extracted text retains the readable report body and marks the truncated material.
The cause is at
apps/server/src/provider/documentTextWorker.ts:1890. Rancd apps/server && pnpm exec vp test run src/provider/userInputAttachments.test.tswith the repro test added: it failed in 2 of 2 runs on a clean checkout, withAssertionError: docx: Findings at a glance.in the output.Evidence
Environment: Linux x64, the repository's own tests.
Proven: the repro fails at the test commit b8cb6f77d3 and passes on the head 8df0736c3c, both on main efbd62a7a7.
Not shown: the bug in the running web app.
Tests
pnpm exec vp run check:changed efbd62a7a700a29ad545f8334b2139407875dab3passed on head.Not in this change
Who did the work
Made in T3 Code by Claude Opus 5.5 and GPT 6.2 Sol