Skip to content

ogar-vocab: authoritative OCR capability table + generic consumer-registration roundtrip#174

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

ogar-vocab: authoritative OCR capability table + generic consumer-registration roundtrip#174
AdaWorldAPI merged 2 commits into
mainfrom
claude/happy-hamilton-0azlw4

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

OGAR becomes the authoritative store of the OCR capability surface — the operator-directed plug-and-play model: declared like an API spec, compiled into the same binary, zero serde.

  1. ogar_vocab::ocr_actions — the authoritative table: 8 ActionDefs on the minted 0x08 concepts (recognize_line on textline; recognize_page/extract_text_layer/extract_page_image on page_image; render_text/tsv/hocr/searchable_pdf on ocr_renderer), each with a typed param signature (OcrActionParam — a dependency-free mirror of ActionParam, since ogar-from-schema already depends on this crate) + KausalSpec::External + name-level reads/writes. Plus OCR_ACTION_NAMES (const fingerprint for consumer fuses), OCR_SUBJECT_CLASSIDS, OCR_EXPECTED_EXECUTORS = ["tesseract-ogar"].
  2. ogar_vocab::capability_registry (GENERIC — the thinking-styles best-practice table plugs into the same form next): CapabilityRegistration { consumer, covered, subject_classids } + verify_registration with five named drift arms (UnexpectedConsumer / Uncovered / Undeclared / ClassidMismatch / Unminted). The confirmation loop: the authority names its expected executor; the consumer registers via a const and asserts the roundtrip in its own binary; unique-mint stays guarded by the existing codebook duplicate test.

No concept mints, no classid changesclass_ids::ALL untouched (84), so the lance-graph COUNT_FUSE is unaffected (verified: armed contract 840 tests green against this tree).

Companions (merge THIS first — both bind against OGAR main)

  • tesseract-rs: tesseract-ogar executor crate (typed OcrRequest/OcrResponse dispatch onto the proven pipeline, exhaustiveness fuses, REGISTRATION verified by verify_ocr_registration, real-data smoke green)
  • lance-graph: lance-graph-ogar roundtrip green-light test (ID-level only — lance-graph carries no ontology payload)

Gates: fmt + clippy -D warnings clean, 122 tests green (-p ogar-vocab scoped).

🤖 Generated with Claude Code

https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1

claude added 2 commits July 7, 2026 15:41
…thoritative action table

tesseract-rs's pure-Rust OCR transcode has no source AST to lift ActionDefs
from (unlike every other producer in this workspace), so its eight
capabilities (recognize_line / recognize_page / extract_text_layer /
extract_page_image / render_text / render_tsv / render_hocr /
render_searchable_pdf) are declared directly in a new ocr_actions module —
real ActionDef values (identity/predicate/object_class/kausal) targeting
the already-minted 0x08XX class_ids concepts (textline/page_image/
ocr_renderer), plus a dependency-free OcrActionParam mirror of
ogar-from-schema's arago-parity ActionParam (kept local to avoid a cyclic
dep, since ogar-from-schema already depends on ogar-vocab).

No codebook/class_ids entries were added or changed — this table
consumes the existing 0x0805/0x0808/0x0809 mints from PR #172.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
…oritative tables

OGAR is the authoritative store; this closes the confirmation loop the
operator asked for: a domain table (ocr_actions today, the planned
thinking-styles best-practice table next) declares capabilities +
subject classids + EXPECTED executors; the consumer registers itself
via a CapabilityRegistration const and asserts verify_registration in
its own tests. Checks: consumer expected, coverage both directions,
activated classid set == declared subject set, every id minted (unique
mint already guarded by the codebook duplicate test). Drift bangs once
at test time in the one binary -- no serde, no ontology payload outside
OGAR; lance-graph carries nothing of this.

ocr_actions gains OCR_EXPECTED_EXECUTORS (["tesseract-ogar"]),
OCR_SUBJECT_CLASSIDS (textline/page_image/ocr_renderer) and the
verify_ocr_registration convenience roundtrip.

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_8798f3bb-6a99-46b9-a23a-dd14b2ec2679)

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