ogar-vocab: OCR action table v2 — recognize_document + 5 structured-doc capabilities#188
Merged
Merged
Conversation
…ding) Detailed spec for extending ogar_vocab::ocr_actions from 8 to 14 capabilities (word-level page recognition, doc.v1 structured document, typed invoice-field harvest, page segmentation, halftone detection, page furniture) with numbered verifiable claims, zero new mints, fuse-extension mechanics, executor pairing order, IR-shape and preflight answers, and explicit non-goals. 5+3 council protocol: 5 verification savants first, consolidate, then 3 brutal reviewers. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
Folds the 5 verification savants' evidence-backed corrections into the spec before the 3 brutal reviewers (operator protocol: consolidate first so the 5+3 doesn't go mushy). Load-bearing: the live fuse is resolve_hotplug/HOT_PLUG not verify_ocr_registration; interim break is a hard workspace compile failure; classify_regions dropped (no precedent); C4 re-answered against the real OGAR-AS-IR §3 tests; BBB resolution path for the woa-rs sketch; docs land in ocr_actions.rs module doc + a DISCOVERY-MAP entry, not ARAGO-ACTIONHANDLER-PARITY. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
Grows ogar_vocab::ocr_actions 8->14: recognize_page_words,
recognize_document (the one-shot: page -> doc.v1 JSON + typed fields),
harvest_fields, segment_page, detect_halftone_regions,
detect_page_furniture. Zero new mints — subjects are the already-minted
page_image (0x0808) and page_layout (0x0807); OCR_SUBJECT_CLASSIDS gains
exactly {PAGE_LAYOUT}. The const-assert fuse is 8->14, and the
capability_registry hot-plug test mirrors (OCR_IDS/OCR_COVERED) are
converted to LIVE references to the authoritative consts so they can
never re-drift.
5 new tests (document reads cover the word stage, harvest_profile slot
presence, subject set == exact row subjects, +v2 rows in the derive);
125/125 ogar-vocab tests, clippy clean. Spec + phase-1 (5-savant)
consolidation in docs/OCR-ACTIONS-V2-PROPOSAL.md; DISCOVERY-MAP
D-OCR-ACTIONS-V2 entry appended.
Companion tesseract-rs PR (tesseract-ogar executor COVERED 8->14 +
recognize_document helper) lands in lockstep; merge THIS first (the
sibling path-dep makes the interim a hard workspace compile failure).
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_eb4daddd-69b1-4392-91b3-a6a18bc816be) |
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.
OCR action surface v2 — 6 structured-document capabilities
Grows the authoritative
ogar_vocab::ocr_actionstable from 8 → 14 so consumers (woa-rs, medcare-rs, smb-office-rs, …) can invoke the tesseract-rs structured-document surface throughogar-vocablike every other Core capability.New
ActionDefrows (zero new mints — subjects are the already-mintedpage_image0x0808 andpage_layout0x0807):recognize_page_wordsline_wordsrecognize_documentdoc_json, fields(the one-shot: image → doc.v1 JSON + typed invoice fields)harvest_fieldsfieldssegment_pageregions_rectsdetect_halftone_regionsfigure_rects, mask_w, mask_h, founddetect_page_furnitureheader_lines, footer_lines, page_numberFuse:
OCR_ACTION_NAMES8→14 +const _assert 8→14;OCR_SUBJECT_CLASSIDS+=PAGE_LAYOUT(the only net-new subject); thecapability_registryhot-plug test mirrors (OCR_IDS/OCR_COVERED) are converted to LIVE references so they can never re-drift.Process: authored via the 5+3 council (5 verification savants → consolidate → 3 brutal reviewers, all CLEAN). Spec + phase-1 consolidation in
docs/OCR-ACTIONS-V2-PROPOSAL.md;DISCOVERY-MAPD-OCR-ACTIONS-V2appended. Deferred (recorded, not omitted):typed_fieldmint (0x080A), alanguageparam slot, aclassify_regionstoggle.⚠ Merge order: merge THIS first. The companion tesseract-rs PR grows
tesseract-ogar::COVERED_CAPABILITIES8→14; itsconst _assert againstOCR_ACTION_NAMESmakes the interim a hard workspace compile failure (verified: the assert fails in both 8-vs-14 and 14-vs-8 directions), so both must land.Tests: 125/125 ogar-vocab, clippy clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1