Repository navigation
Fix main: Case::Ink in real-world tests, PDFium lock, escape PDF subtypes - #35
Merged
Merged
Conversation
The skipped-annotation lines and doctor --pdf printed the PDF's /Subtype names as they were; a crafted PDF could put newlines or instruction-like text into the CLI output that agents read. Real subtypes (short ASCII names) print unchanged; anything else is quoted, escaped and cut to 32 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xj9ekYmyESdZUsW8uWkzgv
- #30 and #31 merged cleanly but do not compile together: the sample donation in tests/real.rs matches every Case, and #31 added Case::Ink. Ink marks are comments, like sticky notes. - Three tests in tests/real.rs use PDFium on parallel threads; pdfium-render is built without thread_safe, and parallel PDFium calls crashed a corpus test process on Windows (STATUS_ILLEGAL_INSTRUCTION). Each test now holds one static lock while it uses PDFium. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xj9ekYmyESdZUsW8uWkzgv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #30, #31 and #32, which merged within a minute of each other.
maindoes not compile its tests right now; this PR fixes that.Changes
crates/proofback-corpus/tests/real.rs(Corpus: real-world set of annotated PDFs with its own gates #30) matches everyCase, and Import handwritten ink marks and report skipped annotations #31 addedCase::Ink. Ink marks map tocomment, like sticky notes.tests/real.rsuse PDFium on parallel threads, andpdfium-renderis built without itsthread_safefeature. Each test now holds one static lock while it uses PDFium, as the e2e tests already do. The same race crashed the corpus test process on Windows CI for Import handwritten ink marks and report skipped annotations #31 (STATUS_ILLEGAL_INSTRUCTION), when its ink test still shared a binary with the accuracy test.importand thedoctor --pdflist printed the PDF's/Subtypenames unchanged. A crafted PDF could put newlines or instruction-like text into output that agents read. Real subtypes (short ASCII names) print as before; anything else is quoted, escaped and cut to 32 characters. A unit test covers newlines, escape sequences and empty names. This commit was pushed to Import handwritten ink marks and report skipped annotations #31's branch seconds after Import handwritten ink marks and report skipped annotations #31 merged, so it is not onmainyet.Checks (Rust 1.100, the CI toolchain)
cargo clippy --workspace --all-targets -- -D warningspasses.PROOFBACK_REQUIRE_PDFIUM=1 cargo test --workspacepasses.cd tools && npm run checkpasses.Generated by Claude Code