Skip to content

Fix main: Case::Ink in real-world tests, PDFium lock, escape PDF subtypes - #35

Merged
Amet13 merged 2 commits into
mainfrom
claude/relaxed-ramanujan-4sc5w7-followups
Dec 1, 2026
Merged

Amet13 merged 2 commits into
mainfrom
claude/relaxed-ramanujan-4sc5w7-followups

Conversation

@Amet13

@Amet13 Amet13 commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Follow-up to #30, #31 and #32, which merged within a minute of each other. main does not compile its tests right now; this PR fixes that.

Changes

  1. Build fix: Corpus: real-world set of annotated PDFs with its own gates #30 and Import handwritten ink marks and report skipped annotations #31 merged without text conflicts but do not compile together. The sample donation in crates/proofback-corpus/tests/real.rs (Corpus: real-world set of annotated PDFs with its own gates #30) matches every Case, and Import handwritten ink marks and report skipped annotations #31 added Case::Ink. Ink marks map to comment, like sticky notes.
  2. Test crash fix: three tests in tests/real.rs use PDFium on parallel threads, and pdfium-render is built without its thread_safe feature. 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.
  3. Security (code-scanning finding on Import handwritten ink marks and report skipped annotations #31): the skipped-annotation lines from import and the doctor --pdf list printed the PDF's /Subtype names 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 on main yet.

Checks (Rust 1.100, the CI toolchain)

  • cargo clippy --workspace --all-targets -- -D warnings passes.
  • PROOFBACK_REQUIRE_PDFIUM=1 cargo test --workspace passes.
  • cd tools && npm run check passes.

Generated by Claude Code

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
@Amet13
Amet13 marked this pull request as ready for review December 1, 2026 01:22
@Amet13
Amet13 merged commit 58966ff into main Dec 1, 2026
18 of 19 checks passed
@Amet13
Amet13 deleted the claude/relaxed-ramanujan-4sc5w7-followups branch December 1, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants