Delete the DOCX text fallback: a second extractor is a second character plane
Eli: "we should not have a docx text fallback. if the main docx call doesn't work, we need to fix that instrument, not silently fallback." The fallback was worse than redundant. `applyTextOpsToDocx` resolves every edit scope against `extractDocxBodyText` and nothing else, so a document that fell through to mammoth was READ on one character plane and EDITED on another: every offset the reader returned pointed somewhere else in the writer. Nothing surfaced it, because falling back looks exactly like success -- and the address grammar now being wired into the edit layer would have inherited the same silent divergence. Measured before removing it (rule 2): 400 documents sampled at stride 28 across the 11,293-file corpus, zero empty and zero throwing. It was carrying nothing. A typed refusal naming the failure replaces it, so a real extraction defect arrives as a bug report instead of as a wrong-plane edit. Parser version bumped to 2 -- the cache is content-addressed on parser identity, so the old fallback's output cannot be served for the new contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H9ToHYJVDxfeJcJwdzrP2H
| Repository | eliziff/Beaver |
|---|---|
| Author | Eli Ziff <eliasziff@gmail.com> |
| Authored | |
| Parents | ecf89fde |
| Stats | 1 file changed , +27 , -4 |
| Part of | SourceDoc / DOCX engine: redlines, tracked changes, editing benchmark |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-f7035bc1.md
from inside the repo you want the change in.