A pathological document announces itself on first read
The sniffer now runs at the read choke points: extractLocalDocument (library_read/library_find/library_outline) and readDocumentContent (read_document/fetch_documents) surface scanDocxPathology's notes_of_caution - manual redlines, unresolved tracked changes, text boxes, unicode traps - as additive metadata. The extracted text stays byte-identical, held by test against extractDocxBodyText on both paths; find_in_document opts out so hit offsets keep anchoring into pure text. The report caches beside the text parse under its own parseCache identity (docx-pathology v1, JSON-in-string); an unparseable entry degrades to no notes, never a failed read. Note wording comes from the report verbatim, capped at 8 lines per result. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012AgUm5EcRKbT3duVFMbrQD
| Repository | eliziff/Beaver |
|---|---|
| Author | Eli Ziff <eliasziff@gmail.com> |
| Authored | |
| Parents | 0e792666 |
| Stats | 4 files changed , +359 , -9 |
| Part of | Legal agent-surface and context-compaction experiments |
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-5e188b38.md
from inside the repo you want the change in.