Conversation
yitom486
marked this pull request as ready for review
September 9, 2026 06:54
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Shadow auto-approve: would not auto-approve because issues were found.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Expose positioned OCR spans via NAPI and Python OcrPageResult, backed by deterministic mapping tests and updated docs.
Re-trigger cubic
This branch has not been deployed
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.
Closes #513.
Purpose
Expose the positioned OCR recognition lines already produced by the vision pipeline through the Node.js and Python
OcrPageResultAPIs. This lets downstream readers such as Inkdown place OCR text on a rendered page, show confidence-aware overlays, and search/select scanned content without re-running OCR or parsing Markdown.API
Each page now exposes
spans, a recognition-order, line-level list of:textx,y,width,height— axis-aligned PDF-point rectangle in the same visible-page coordinate frame asTextItem; y grows upwardconfidence— 0.0 to 1.0spansis empty when OCR did not run for a page. When OCR does run, spans remain available even if fusion ultimately chooses native Markdown.Compatibility
This is additive only. It does not change existing Markdown, routing, provenance, model, or inference behavior, and does not trigger an extra OCR pass.
Validation
cargo test -j 1— 1,209 unit + 176 integration + 2 doc tests passedcargo test --lib --features "ocr python"— 1,298 tests passed, including the new Python mapping testcargo test --manifest-path napi/Cargo.toml maps_positioned_ocr_spans_into_napi_result— passednode napi/test.mjs— passedcargo clippy -j 1 -- -D warnings— passedgit diff --check— passedThe new deterministic NAPI and Python tests assert that text, all geometry fields, confidence, and the empty non-OCR-page case are preserved by each binding.