Skip to content

feat(pdf): release PaddleOCR reader with validated image responses - #148

Merged
willgriffin merged 9 commits into
mainfrom
codex/paddleocr-release
Oct 16, 2026
Merged

willgriffin merged 9 commits into
mainfrom
codex/paddleocr-release

Conversation

@willgriffin

@willgriffin willgriffin commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Adds Chad’s PaddleOCR-VL provider from #146 while preserving the original commits. Remote recognition is explicit; metadata, images and rendering remain local. Auto selection is unchanged.

Closes #145
Closes #147

Review fixes enforce one response page per image, reject oversized inputs before local processing, and require complete text coverage across every page before bypassing OCR. Mixed scanned pages, including pages with text footers, remain on the OCR path.

Drive-by fixes

Tracked release-validation item #147: 0914334 repairs the broken pnpm pin in package.json; 295f2b6 repairs the formatter hook for intentionally ignored generated JavaScript; 3ee7069 regenerates API indexes on CI’s Node 24; 8d432ee documents the Node 24 docs requirement. No hooks or gates were bypassed.

Validation and review

Node 24.18.0 and pnpm 11.25.0: frozen install, typecheck, lint, generated API docs check, build, and all 221 tests pass. Regression tests cover malformed image response cardinality, all local size-limit paths, and later scanned pages. Packed public API consumer smoke passed. Live GPU accuracy was not tested.

Independent high-risk full review and targeted follow-up by Claude Opus and Codex Astra: CLEAN at 95f83a39ef8967ea0b3ab2e88fc0ff40caed0b5f, base 1918eece3c41bf422ef1f7ee0b38d062912491b9. Original cycle 6216025328, round 6/6, including three contributor-reported prior passes for budget only. No unresolved accepted findings. Evidence: /tmp/paddleocr-release-evidence/pdf/coverage.json.

Normal merge queue and on-main Publish workflow release this change. Supersedes #146 after merge.

chadtalsma-svg and others added 5 commits October 16, 2026 07:03
provider: 'paddleocr' returns a complete PDFReader: extractText and
performOCR go to the PaddleOCR-VL /layout-parsing service; getInfo,
metadata, embedded images and page renders run locally through unpdf.
Explicit only (auto never selects it), no retry and no local OCR
fallback. PaddleOCRClient gains parseImage() for PNG and JPEG.

Closes #145

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refuse every named OCR engine (tesseract included), convert WebP to PNG
before OCR, stop inheriting the reader timeout, throw when the service
returns a different page count, and honour enableOCR: false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A damaged or encrypted PDF probes as 0 pages locally but may still parse
remotely. Also match WebP by canonical format and report an undecodable
WebP as EINVAL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T14:56:33.886841Z 34d4abc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Release Preview

When this PR is squash-merged, @happyvertical/pdf will receive a patch version bump based on the PR title's conventional commit format.

What happens on merge?

  1. Tests run on main branch
  2. The squash commit message is validated
  3. Version is bumped automatically
  4. Package is published to npm.happyvertical.com (then mirrored to npmjs)
  5. Git tag is created

No manual intervention needed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34d4abcf71

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/paddleocr-provider.ts Resolved
Comment thread src/node/paddleocr-provider.ts Resolved
@willgriffin
willgriffin disabled auto-merge October 16, 2026 15:07
@willgriffin
willgriffin added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 423909c Oct 16, 2026
6 of 7 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.

fix: repair PDF release-validation toolchain Make PaddleOCR-VL a getPDFReader provider (provider: 'paddleocr')

2 participants