Skip to content

The extractor image and the test environment pin pypdf 6.21.4 - #275

Merged
zlareb1 merged 3 commits into
mainfrom
dependabot/uv/extractor/pypdf-6.21.4
Nov 6, 2026
Merged

zlareb1 merged 3 commits into
mainfrom
dependabot/uv/extractor/pypdf-6.21.4

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #184

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

The document extractor image ships pypdf 6.21.4, which fixes security bugs in reading malformed PDFs.

Why

pypdf 6.21.3 and 6.21.4 fix security bugs in reading malformed PDFs, and the extractor reads uploaded PDFs with pypdf.PdfReader (extractor/loom_extractor/pdffile.py). The release notes list each fix: https://github.com/py-pdf/pypdf/releases/tag/6.21.3 and https://github.com/py-pdf/pypdf/releases/tag/6.21.4.

The root uv.lock moves with extractor/uv.lock: tests/unit/test_extractor_service.py::test_the_image_locks_what_the_tests_ran requires every package both locks hold to be at one version, so the image runs what the tests ran. Bumping either lock alone fails that test, which is why the root-lock-only bump in the related pull request is red.

Scope and risk

Only the pypdf entry changes in each lock: its version and its file metadata. The pypdf>=6.21,<7 ranges in both pyproject.toml files already allow 6.21.4. Nothing else in either lock moves.

The extractor stamps each PDF artifact's parser version with the pypdf version (extractor/loom_extractor/pdffile.py). A PDF ingested after the new extractor image rolls out names pypdf6.21.4 in its artifact's parser version. Documents already ingested keep their artifacts until they are ingested again, so the fixes reach an existing PDF only on its next ingest. 6.21.3 also fixes how text is read from CID fonts with indirect widths, so a re-ingested PDF can give different text; the document row's parser (loom-pdf/1+pypdf6.21.4) tells that artifact from one read with 6.21.2.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none for the published extractor image, which picks up the new pypdf at the next release. An operator who builds the image from extractor/Dockerfile rebuilds it.
  • Rollback: revert both locks together; reverting one fails the lock parity test. PDFs ingested while 6.21.4 ran keep their artifacts and the loom-pdf/1+pypdf6.21.4 parser stamp until they are ingested again.

Tests

  • docker-smoke at this head builds the extractor image from extractor/Dockerfile, which runs uv sync --locked against the new extractor/uv.lock, and passes Quickstart on amd64 and arm64.
  • uv lock --check passes for the root lock and for extractor/. The hashes match PyPI's 6.21.4 files.
  • python -m pytest -q tests/unit/test_extractor_service.py tests/unit/test_document_extraction_office.py tests/unit/test_document_extraction.py tests/unit/test_package_contracts.py: 266 passed.
  • CI at this head passes ruff + mypy-gate, format (biome, prettier, taplo, shfmt) and pytest unit + coverage (27510 passed, none failed); the first checklist item rests on those CI jobs.
  • Locally, the full unit suite passed except for 4 cases of test_the_delimiter_is_sniffed_in_bounded_time, a 5-second limit on sniffing a CSV delimiter. Those 4 cases fail the same way on this machine with pypdf 6.21.2, so the bump does not cause them. The test has no skip marker, and CI's unit job passes it.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): dependabot bumped extractor/uv.lock; Claude Code ran uv lock --upgrade-package pypdf on the root lock. I checked that each lock changes only the pypdf entry and that its hashes match PyPI's 6.21.4 files.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed.
  • Generated files are regenerated in this PR, not by hand: the SDK op tables, docs/reference/configuration.md and the docs/reference/ tables (python scripts/codegen/docs_reference.py), the reach manifest, schemas/schema.sql (make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships (hooks/, lib/, bin/, skills/, .mcp.json, the Codex plugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Nov 5, 2026
@dependabot
dependabot Bot force-pushed the dependabot/uv/extractor/pypdf-6.21.4 branch from e577345 to 5df3145 Compare November 5, 2026 16:27
zlareb1 and others added 2 commits November 6, 2026 12:34
test_the_image_locks_what_the_tests_ran requires both locks to hold one
version of each shared package.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1 zlareb1 changed the title Bump pypdf from 6.21.2 to 6.21.4 in /extractor The extractor image and the test environment pin pypdf 6.21.4 Nov 6, 2026
@zlareb1
zlareb1 merged commit bc28eb6 into main Nov 6, 2026
41 of 44 checks passed
@dependabot
dependabot Bot deleted the dependabot/uv/extractor/pypdf-6.21.4 branch November 6, 2026 14:10
This was referenced Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant