tesseract-ogar: in-binary executor for the authoritative OGAR OCR capability table#13
Conversation
New crate closing the plug-and-play loop: OGAR declares the OCR capability surface (ogar_vocab::ocr_actions, 8 ActionDefs on the 0x08 concepts -- looks like an API spec, compiles into the same binary); this crate executes it. Typed OcrRequest/OcrResponse enums dispatch onto the existing proven APIs (recognize_grey_line/recognize_page/ extract_text_layer/extract_page_image/render_text/tsv/hocr/ searchable_pdf) -- pure dispatch, zero serialization, no wire format. The fuses: compile-time length tripwire (OCR_ACTION_NAMES vs COVERED_CAPABILITIES), both-direction name-set equality test, per- variant capability_of check, mandatory-param->field seam table, and the consumer REGISTRATION const verified by the authority's verify_ocr_registration (expected consumer, coverage, activated classid set == declared subjects, ids minted) -- the operator's confirmation loop: drift bangs once, in this binary. Smoke test on real /tmp eng data reproduces the proven "qLLiy,," regression via the executor path. All deps path-only, no pins. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_7f6b9fb8-0551-4ba7-b01a-2417453abdab) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abfda9b0f0
ℹ️ 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".
| # ride the OGAR Core (`lance-graph-contract`) per the Core-First doctrine. | ||
| [workspace] | ||
| members = ["crates/tesseract-core", "crates/tesseract-ocr", "crates/tesseract-recognizer", "crates/tesseract-ocr-pdf"] | ||
| members = ["crates/tesseract-core", "crates/tesseract-ocr", "crates/tesseract-recognizer", "crates/tesseract-ocr-pdf", "crates/tesseract-ogar"] |
There was a problem hiding this comment.
Add CI coverage for the new workspace crate
Adding crates/tesseract-ogar makes this a shipped workspace package, but the workflow in this commit still only runs build/test/clippy/fmt for tesseract-core and tesseract-recognizer (.github/workflows/rust.yml lines 39-63); no command ever builds or tests tesseract-ogar. In this context, the new executor and its OGAR drift tests can fail to compile or diverge from the action table without CI catching it, despite those tests being the advertised safety fuse.
Useful? React with 👍 / 👎.
Consumer half of the OGAR-authoritative capability model (companion: AdaWorldAPI/OGAR#174 — merge that FIRST; CI here now sibling-checks-out OGAR and binds against its main).
tesseract-ogar: typedOcrRequest/OcrResponseenums (8 variants = the 8 declared capabilities) dispatching onto the existing proven APIs — pure dispatch, zero serialization, no wire format, monomorphized in-binary calls. All deps path-only, no pins.OCR_ACTION_NAMES; both-direction name-set equality; per-variantcapability_ofcheck; mandatory-param→field seam table; and the consumerREGISTRATIONconst verified by the authority'sverify_ocr_registration(expected consumer, coverage both directions, activated classid set == declared subjects, every id minted) — the full confirmation loop in this binary's test suite.qLLiy,,regression from/tmpeng data.🤖 Generated with Claude Code
https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
Generated by Claude Code