ogar-vocab: authoritative OCR capability table + generic consumer-registration roundtrip#174
Merged
Merged
Conversation
…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
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_8798f3bb-6a99-46b9-a23a-dd14b2ec2679) |
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.
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.
ogar_vocab::ocr_actions— the authoritative table: 8ActionDefs on the minted 0x08 concepts (recognize_lineon textline;recognize_page/extract_text_layer/extract_page_imageon page_image;render_text/tsv/hocr/searchable_pdfon ocr_renderer), each with a typed param signature (OcrActionParam— a dependency-free mirror ofActionParam, sinceogar-from-schemaalready depends on this crate) +KausalSpec::External+ name-level reads/writes. PlusOCR_ACTION_NAMES(const fingerprint for consumer fuses),OCR_SUBJECT_CLASSIDS,OCR_EXPECTED_EXECUTORS = ["tesseract-ogar"].ogar_vocab::capability_registry(GENERIC — the thinking-styles best-practice table plugs into the same form next):CapabilityRegistration { consumer, covered, subject_classids }+verify_registrationwith 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 changes —
class_ids::ALLuntouched (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-ogarexecutor crate (typedOcrRequest/OcrResponsedispatch onto the proven pipeline, exhaustiveness fuses,REGISTRATIONverified byverify_ocr_registration, real-data smoke green)lance-graph-ogarroundtrip green-light test (ID-level only — lance-graph carries no ontology payload)Gates: fmt + clippy
-D warningsclean, 122 tests green (-p ogar-vocabscoped).🤖 Generated with Claude Code
https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1