Skip to content

tesseract-ogar: in-binary executor for the authoritative OGAR OCR capability table#13

Merged
AdaWorldAPI merged 2 commits into
masterfrom
claude/happy-hamilton-0azlw4
Jul 7, 2026
Merged

tesseract-ogar: in-binary executor for the authoritative OGAR OCR capability table#13
AdaWorldAPI merged 2 commits into
masterfrom
claude/happy-hamilton-0azlw4

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Consumer half of the OGAR-authoritative capability model (companion: AdaWorldAPI/OGAR#174merge that FIRST; CI here now sibling-checks-out OGAR and binds against its main).

  • New crate tesseract-ogar: typed OcrRequest/OcrResponse enums (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.
  • Fuses (drift bangs once): compile-time length tripwire vs OCR_ACTION_NAMES; both-direction name-set equality; 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 both directions, activated classid set == declared subjects, every id minted) — the full confirmation loop in this binary's test suite.
  • Smoke on real data: the executor path reproduces the proven qLLiy,, regression from /tmp eng data.
  • CI: added the OGAR sibling checkout (expect red until OGAR#174 merges — same merge-order pattern as the lance-graph#556 arc).

🤖 Generated with Claude Code

https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1


Generated by Claude Code

claude added 2 commits July 7, 2026 15:50
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
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@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: 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".

Comment thread Cargo.toml
# 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"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@AdaWorldAPI AdaWorldAPI merged commit fa2b3aa into master Jul 7, 2026
1 check 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.

2 participants