Skip to content

fix(imaging): stop sending scanned PDFs to triage as JavaScript, with sillybos 6.0.3 - #114

Merged
stephen-masters merged 3 commits into
mainfrom
fix/sillybos-6-0-2
Nov 17, 2026
Merged

stephen-masters merged 3 commits into
mainfrom
fix/sillybos-6-0-2

Conversation

@stephen-masters

@stephen-masters stephen-masters commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Raises the sillybos floor from >=6 to >=6.0.3, and the lock from 6.0.1 to 6.0.3.

Why

sillybos before 6.0.2 took the three bytes /JS anywhere in a PDF for a script. Megabytes of compressed page images spell those bytes by chance, so a long scanned PDF could go to the triage queue as "a PDF with JavaScript" when it held none. The chance grows with the size of the file. 6.0.2 counts /JS only beside the name of an action that can carry a script.

What changes for a run

  • A scanned PDF that was held for JavaScript it does not carry is now read.
  • Ten of the searchable PDFs this package wrote into workspace/processed were refused when read back in. All ten now pass.
  • A PDF with a real script is still refused; the existing test for one is unchanged in what it asserts.

Why the floor and not only the lock

The lock decides what a checkout and CI install. The floor decides what someone upgrading tetrak from PyPI gets. Without it, an environment that already holds sillybos 6.0.0 or 6.0.1 keeps the false refusals. The fix for those came in 6.0.2; the floor is set at 6.0.3 so that it matches the lock and an upgrade gets the release a checkout does. Typed as a fix, so merging cuts a patch release that carries the floor.

What was checked

  • All 1,645 scans in this checkout, the Armenian evaluation pages and one book's page frames pass under 6.0.3. The only verdicts that differ from 6.0.1 are the ten above.
  • 6.0.3 also reads a PDF name whole wherever a read boundary falls. That changes a verdict only for a policy that refuses an image codec, which this package's does not: the 1,645 scans get the same verdicts under 6.0.3 as under 6.0.2.
  • A new test builds a PDF whose stream data spells /JS( and expects it to be read. It fails on sillybos 6.0.1.
  • The PDF built by hand in the JavaScript test moves into a helper the new test shares.
  • ruff check, ruff format --check, uv lock --check and pytest -m "not slow" pass locally, apart from the three test_vision.py tests that need the vision extra on a Mac.

🤖 Generated with Claude Code

… sillybos 6.0.2

sillybos before 6.0.2 took the three bytes /JS anywhere in a PDF for
a script, and megabytes of compressed page images spell them by
chance. Long scanned PDFs went to the triage queue as "a PDF with
JavaScript", and so did ten of the searchable PDFs this package wrote
into workspace/processed, when read back in. 6.0.2 counts /JS only
beside the name of an action that can carry a script.

Raises the floor from >=6 to >=6.0.2, so that an upgrade brings the
fix with it, and the lock from 6.0.1 to 6.0.2. All 1,645 scans in
this checkout, the Armenian evaluation pages and one book's page
frames now pass; the only verdicts that changed are those ten.

Co-authored-by: Yvette Mankerian <yvettekm@gmail.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Deploying tetrak with  Cloudflare Pages  Cloudflare Pages

Latest commit: ef370b5
Status: ✅  Deploy successful!
Preview URL: https://0e7a4e50.tetrak.pages.dev
Branch Preview URL: https://fix-sillybos-6-0-2.tetrak.pages.dev

View logs

stephen-masters and others added 2 commits November 17, 2026 15:09
6.0.3 reads a PDF name whole wherever a read boundary falls. It changes
no verdict for Tetrak's policy, which refuses no image codec: all 1,645
scans Tetrak reads pass as they do on 6.0.2. The floor stays at 6.0.2,
the release that stopped the false JavaScript refusals.

Co-authored-by: Yvette Mankerian <yvettekm@gmail.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The floor now matches the lock, so an upgrade from PyPI gets the same
release a checkout does: the false JavaScript refusals fixed in 6.0.2
and the PDF name scan fixed in 6.0.3.

Co-authored-by: Yvette Mankerian <yvettekm@gmail.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@stephen-masters stephen-masters changed the title fix(imaging): stop sending scanned PDFs to triage as JavaScript, with sillybos 6.0.2 fix(imaging): stop sending scanned PDFs to triage as JavaScript, with sillybos 6.0.3 Nov 17, 2026
@stephen-masters
stephen-masters merged commit 6edb316 into main Nov 17, 2026
10 checks passed
@stephen-masters
stephen-masters deleted the fix/sillybos-6-0-2 branch November 18, 2026 09:36
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