Skip to content

feat(ogar-vocab): mint generic document concept (0x080B) — the reusable ogar-doc-ir DTO#216

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/review-medcare-rust-dt7MS
Jul 20, 2026
Merged

feat(ogar-vocab): mint generic document concept (0x080B) — the reusable ogar-doc-ir DTO#216
AdaWorldAPI merged 2 commits into
mainfrom
claude/review-medcare-rust-dt7MS

Conversation

@claude

@claude claude Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What

Mints the generic, source-agnostic document concept — 0x080B, in the 0x08XX OCR-document plane (next after ocr_renderer 0x0809; 0x080A reserved). This is the mint-on-emit completion of a seam already declared in code: ogar-doc-ir::DocIr's doc-comment says "the document 0x080B subtree", but the codebook never carried the row.

Why — the reusable document pipeline this concept anchors

raw bytes → tesseract-rs (structured::render_doc) → "tesseract-rs/doc.v1" JSON
          → ogar-from-docv1 → ogar-doc-ir::DocIr        ← generic DTO, data-as-config (closed-vocab serde)
          → tesseract-ocr-pdf render_searchable_pdf → PDF   ← reconstruction (Python counterpart: tesseract + Spire.Doc)

DocIr is content-addressed (content_sha256); the raw bytes live in a consumer content store (a DocumentKv), never as a concept slot — the KIND gets the slot, the bytes do not (the 0x08XX kinds-not-content rule). Every consumer (medcare-rs DMS, odoo, openproject) reuses the same pipeline; only domain field-extraction differs.

Changes (all in ogar-vocab)

  • CODEBOOK row ("document", 0x080B) + class_ids::DOCUMENT const + class_ids::ALL entry (count pin 89 → 90).
  • all_promoted_classes() gains a Document class whose attributes mirror DocIr (version/source/geometry/content_sha256/mime/pages/fields).
  • OCR domain-set guard 9 → 10.

Cross-repo fuse

Paired with lance-graph PR (mirror ogar_codebook::CODEBOOK + COUNT_FUSE). Merge this first so the lance-graph COUNT_FUSE compile-time assert stays balanced.

Verification

cargo test -p ogar-vocab → 139 lib tests green (codebook round-trip, const coverage, domain-set, all_promoted order/length).


🤖 Generated with Claude Code

https://claude.ai/code/session_01Mwq1QKpw4zRd6oaGRoJhF2


Generated by Claude Code

claude added 2 commits July 20, 2026 11:17
…c plane)

Mints the source-agnostic DOCUMENT concept the OCR arc converges on — the
reusable DTO `ogar-doc-ir::DocIr` already carries (its doc-comment declared
"the document 0x080B subtree", the mint-on-emit seam). Next after ocr_renderer
0x0809 in the 0x08XX OCR-document plane; 0x080A reserved.

The reusable pipeline this concept anchors:
  raw bytes -> tesseract-rs (structured::render_doc) -> "tesseract-rs/doc.v1"
            -> ogar-from-docv1 -> ogar-doc-ir::DocIr  [generic DTO, data-as-config]
            -> tesseract-ocr-pdf render_searchable_pdf -> PDF
Content-addressed via DocIr::content_sha256; raw bytes live in a consumer
content store (a DocumentKv), never as a concept slot (0x08XX kinds-not-content
rule). Every consumer (medcare-rs DMS, odoo, openproject) reuses it.

CODEBOOK row + class_ids::DOCUMENT const + class_ids::ALL entry (count 89->90)
+ all_promoted_classes() Document class (attrs mirror DocIr) + OCR domain-set
guard (9->10). Paired lance-graph mirror (ogar_codebook::CODEBOOK + COUNT_FUSE)
lands alongside. ogar-vocab: 139 lib tests green.

Generated by Claude Code
The document mint added 'document' to ogar_vocab::class_ids::ALL but not to the
OgarClassView registry, tripping every_codebook_id_appears_in_class_ids_all and
known_class_ids_iterates_in_stable_codebook_order (CI). Import ogar_vocab::document
and add ('document', document()) to REGISTRY in codebook order (after ocr_renderer
0x0809). ogar-class-view: 12 lib tests green.

Generated by Claude Code
@AdaWorldAPI
AdaWorldAPI merged commit 3b27b89 into main Jul 20, 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