Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 26 functions across 2 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
-
Check name Status Explanation Title check ✅ Passed The title clearly and concisely identifies the main change: adding an OCR parser service for routing and per-page merging. Description check ✅ Passed The description provides a clear summary of the implementation and a specific test plan with reported results. It does not include all template sections, such as related tickets, PR type checkboxes, d… Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
-
📝 Generate docstrings 💡
-
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
-
- Create PR with unit tests
- Commit unit tests in branch
feat/ocr-parser-service
-
Warning
Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use path_filters to narrow the review scope.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
roborev: Combined Review (
|
* ci(server): give the docker build a registry layer cache `cache-from`/`cache-to` were unset, so every CI build refetched the 231 MB lance extension and re-ran both apt layers from scratch. None of the layer ordering in the Dockerfile bought anything on CI. Registry cache rather than `type=gha`: the image is ~1.9 GB, and `mode=max` on it would churn through the 10 GB Actions cache quota. The cache tag follows `SERVER_DOCKER_IMAGE`, so dev and release caches never mix — and neither do their platform sets. `image-manifest=true,oci-mediatypes=true` is what Docker Hub will accept for the cache manifest. PR previews read the cache but do not write it: they push from divergent trees and would only evict trunk's entries. The `latest` push rebuilds the same context, so it reads the cache and does not re-export it. * ci: give GITHUB_TOKEN read-only defaults Adds a top-level `permissions: contents: read` to the three workflows that had none, and moves the write scopes in github-release, extralit.docs and extralit onto the single job that actually needs them. Closes code scanning alerts Extralit#176, Extralit#196, Extralit#252, Extralit#253, Extralit#313, #314. * ci(server): compute the build env with expressions, not bash The 40-line if/else only ever branched on `inputs`, so it moves to a job-level `env:` block. What's left in shell is IMAGE_TAG, the one value that reads an earlier step's output. Docker Hub creds go straight to the login step instead of through GITHUB_ENV.
…e DoclingDocument PageParser Protocol, ParseTask/ParsePlan, ParserService.plan (pages_needing_ocr -> liteparse+OCR; else pymupdf if installed, else liteparse without OCR; pdf_inspector explicit-only) and ParserService.parse (per-page merge by (top, left), region tasks filtered by containment). build_document lays merged blocks through the existing docling_builder; page sizes come from pdf_inspector.page_sizes. Checked docling_builder.append_blocks/register_page and reused them; no new DoclingDocument walking. Parsers are injected: pymupdf/pdf_inspector do not yet implement PageParser (separate task), so the registry is untouched.
caea4a3 to
79bcf1d
Compare
Summary
Phase 1 task from the retrieval plan:
contexts/ocr/parsers/service.py.PageParserProtocol:parse_pages(pdf_bytes, pages, *, ocr) -> dict[int, list[LayoutBlock]]ParseTask(pages, parser, ocr, bbox=None),ParsePlan(+pages_by_parser,ocr_pagesfor the laterLayoutMetadatawrite)ParserService.plan(): triagepages_needing_ocr→ liteparse with OCR; other pages → pymupdf if installed, else liteparse without OCR. pdf_inspector is explicit-only.ParserService.parse(): runs each task, merges blocks per page by(top, left); region tasks (bbox) keep only blocks mostly contained in the region (CONTAINMENT_THRESHOLD).build_document(blocks, page_sizes=…)→DoclingDocumentvia the existingdocling_builder.Parsers are injected as a mapping;
pymupdf.py/pdf_inspector.py/registry.pyare unchanged (theirPageParserrefactor andliteparse.pyare separate tasks).ocr_jobs.pyuntouched.Test plan
tests/unit/contexts/ocr/test_parser_service.py: routing table (scanned / digital / no-pymupdf / fully scanned / unknown triage / page allowlist), task dispatch with ocr flag, cross-task per-page merge order, region containment filter, unknown parser error,build_documentprovenance and empty-page registration.uv run pytest tests/unit/contexts/ocr --noconftest(storage/layout_store lance tests deselected; known-failing locally): 112 passed, 1 skipped.Summary by CodeRabbit