mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-11 16:36:13 -06:00
A Redact annotation with neither a usable QuadPoints array nor a usable Rect was dropped silently by marks(). Applying the readable marks beside it then reported success, and the text under the dropped mark stayed in the file. apply() now counts such marks on the pages being applied and returns RedactError::UnreadableMark(n) before anything changes. The message goes out through the existing error text: the engine edit error, the automation reply and the UI failure line all print it. Marks that were readable through the existing fallbacks (a Rect alone, a usable QuadPoints array) work as before. Tests: three in crates/redact/src/tests.rs (refusal with the count and no change, Rect-only still redacts, an unreadable mark on another page does not block the selected page) and one end to end in crates/automation/tests/automation.rs (the reply carries the reason and the page keeps its text). On upstream main with only the variant added, the two refusal tests and the automation test fail; the Rect test passes. Reverting each pinned production line turns the tests red again. Gates: cargo fmt --check, clippy -D warnings for pdfcraft-redact and pdfcraft-automation, and the redact test suite pass.