Refactor pdf image rendering to support chunked isolated execution#4319
Closed
PastelStorm wants to merge 16 commits intomainfrom
Closed
Refactor pdf image rendering to support chunked isolated execution#4319PastelStorm wants to merge 16 commits intomainfrom
PastelStorm wants to merge 16 commits intomainfrom
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 429480c. Configure here.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
Medium Risk
Touches core PDF OCR/rendering and image extraction paths; chunking and new renderer indirection could change performance and page-to-element mapping, though changes are well-covered by new tests.
Overview
Refactors PDF rendering/OCR to support chunked, runtime-resolved rendering. PDF page rasterization is now done in configurable chunks via
PDFIUM_CHUNK_SIZE(default 8) forprocess_file_with_ocr()andsave_elements(), andconvert_pdf_to_imageresolves the underlying renderer at call time to allow downstream monkey-patching.Improves robustness around streaming inputs and edge cases. File-like inputs have their read position restored after OCR/image extraction, invalid
PDFIUM_CHUNK_SIZEvalues fall back with a warning, and OCR now errors if a PDF renders pages but the provided layout is empty.Enhances CSV partitioning for tricky inputs. Delimiter detection is hardened for small/truncated/quoted data and long first rows; delimiter-less single-column CSVs are parsed with CSV quoting semantics instead of raw text.
Also bumps CI GitHub Actions versions (notably
actions/checkout@v5anddorny/paths-filter@v4plus Node24 env), updates license ignore list, fixes a pandas read-only array mutation in Tesseract OCR, bumps version to0.22.17, and refreshes ingest fixture outputs accordingly.Reviewed by Cursor Bugbot for commit 6235628. Bugbot is set up for automated code reviews on this repo. Configure here.