Skip to content

feat(corpus): verify pinned PDF carrier before text-layer inspection - #643

Merged
andy-zen-dev merged 3 commits into
masterfrom
scrip-pdf-carrier-pin-20261125
Nov 25, 2026
Merged

andy-zen-dev merged 3 commits into
masterfrom
scrip-pdf-carrier-pin-20261125

Conversation

@andy-zen-dev

Copy link
Copy Markdown
Collaborator

Refs #641. A repeat scan inspection can now require its previously recorded byte identity: python -m scriptorium.local_pdf_preflight scan.pdf --pages 1 2 --expect-sha256 DIGEST. Malformed/mismatched SHA-256 rejects before Poppler runs; no receipt or local path is emitted. Correct pins preserve the exact v1 receipt, and unpinned first acquisition remains supported. This is a caller-provided byte-identity guard, not a source authenticity or rights decision.

Eight focused local tests PASS, including three new tests and six invalid pin variants. Source/test Git blob hashes match locally tested files (9bb143b4a922ee441dea9ddac4a767e2e50eb678 / 1f81cec1eed39dbdb7e9bf20b9e34e50bb1b2a6a). Local full repo checkout failed DNS; full suite, real 1922 carrier and visual verification NOT_RUN. RSL HTML offers an interactive viewer but no static scan link; no scan bytes acquired. Reconcile merged #642 in queue revision 625. No new corpus admissions, no M2 change. Later exact-head CI and independent acceptance required; no same-run merge.

Copy link
Copy Markdown
Collaborator Author

Later-run solo-maintainer acceptance for exact head 31d0613d1b111f582f2053996fba3809fe37b7c2, base dc36b9a0dcd9f840c5cc11fe6e0a51a800f9d564 (3 ahead / 0 behind). Reviewed all three changed files and #641; no unresolved review threads or findings. Authenticated login verified; repository push permission true.

Independent local replay: both source/test Git blob IDs matched (9bb143b4a922ee441dea9ddac4a767e2e50eb678, 1f81cec1eed39dbdb7e9bf20b9e34e50bb1b2a6a); 8/8 focused tests passed. Real synthetic two-page PDF with Poppler 25.06.0: uppercase correct pin produced byte-identical unpinned receipt, wrong pin exited 2 with no stdout or path, nonempty/empty pages distinguished and no source prose emitted. This verifies the local byte pin, not authenticity, legal rights or resistance to concurrent hostile file replacement.

23 returned PR workflows completed successfully; exact-head checkout verified in Pages run 45668892615 and installed package run 45668892640 logs. 1670 standard-library tests and 19 installed-package tests passed; deterministic Pages build and Chromium acceptance passed. Deployment and live probe were skipped as expected. Full local checkout and real 1922 carrier NOT_RUN. No new corpus admission or parity claim; 11 measured editions, M2 0/5. Accept this bounded change, subject to current provider merge gates; retain #641 open.

@andy-zen-dev
andy-zen-dev merged commit b8a382e into master Nov 25, 2026
30 checks passed
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.

1 participant