Skip to content

ogar-vocab: mint typed_field (0x080A), ship W4 document ActionDefs - #282

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/bpe-tokenization-architecture-3xd4eh
Aug 25, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
claude/bpe-tokenization-architecture-3xd4eh

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Summary

5+3 council-ratified (spec v1 → v2 → v3, per .claude/agents/5plus3-council.md) implementation of OGAR-DOC-W4-BUILD-SPEC.md §W4-3/§W4-4 — the doc-layer capstone this session's council was convened for.

  • Mints class_ids::TYPED_FIELD = 0x080A (key/value/confidence/geometry per-field decomposition), confirms class_ids::DOCUMENT = 0x080B unchanged. Both wired into the private CODEBOOK table, class_ids::ALL, all_promoted_classes(), and the ConceptDomain::Ocr domain-count fuse (93→94 classids, 10→11 OCR-domain concepts).
  • New crates/ogar-vocab/src/document_actions.rs: persist_document / read_document / reconstruct_document ActionDefs (facts only, External kausal), object_class = document (0x080B). Lands in a separate domain table from ocr_actions.rs (Deviation D-1 from §W4-4's literal text, council-verified via the cross-domain-synthesizer savant): resolve_hotplug gates per contributing table, so folding these rows into ocr_actions.rs would have forced paperless-kv into OCR_EXPECTED_EXECUTORS and permanently entangled tesseract-ogar's and paperless-kv's hot-plug resolutions. Expected executor: paperless-kv.
  • capability_registry::domain_tables() gains a 4th entry (document_entries, same entries_from_actions() derivation as ocr/geo/healthcare). New hot-plug test proves paperless-kv resolves the document table with zero contamination of tesseract-ogar's existing OCR resolution.
  • Doc staleness corrected append-only across DISCOVERY-MAP.md, OGAR-DOC-LAYER-PROPOSAL.md, DOCIR-COMPOSITION-GROUNDING.md, OCR-ACTIONS-V2-PROPOSAL.md, DOC-IR-SPIDER-CONVERGENCE-PLAN.md, and ogar-doc-ir/src/lib.rs — every "typed_field mint deferred / council-pending" claim regraded in place with a dated Status paragraph, none deleted.

Deliberately not in this PR: the persist_document executor body (walking a DocIr into GUID-keyed SoA nodes) — facts only, per §W4-4's own rule. Cross-repo companions (both merged as part of this same council landing): lance-graph-contract's ogar_codebook mirror row, paperless-rs's paperless-kv::HOT_PLUG activation.

Test plan

  • cargo test -p ogar-vocab — 164 unit tests + 6 doctests green
  • cargo clippy -p ogar-vocab --all-targets -- -D warnings clean
  • cargo fmt -p ogar-vocab -- --check clean
  • New document_hotplug_resolves_vocab_and_actions_and_does_not_contaminate_ocr test re-verifies tesseract-ogar's OCR resolution is byte-identical before/after
  • cargo test -p ogar-doc-ir — 16/16 green after the doc-comment correction

Generated by Claude Code

claude added 2 commits August 25, 2026 10:06
5+3 council-ratified (spec v1 -> v2 -> v3, per
.claude/agents/5plus3-council.md) implementation of
OGAR-DOC-W4-BUILD-SPEC.md SS W4-3/W4-4:

- Mint class_ids::TYPED_FIELD = 0x080A (key/value/confidence/geometry
  per-field decomposition), confirm class_ids::DOCUMENT = 0x080B
  unchanged. Both wired into the private CODEBOOK table, class_ids::ALL,
  all_promoted_classes(), and the ConceptDomain::Ocr domain-count fuse
  (93->94 classids, 10->11 OCR-domain concepts).

- New crates/ogar-vocab/src/document_actions.rs: persist_document /
  read_document / reconstruct_document ActionDefs (facts only, External
  kausal), object_class = document (0x080B). Lands in a SEPARATE domain
  table from ocr_actions.rs (Deviation D-1 from W4-4's literal text,
  council-verified via the cross-domain-synthesizer savant): resolve_hotplug
  gates per contributing table, so folding these rows into ocr_actions.rs
  would have forced paperless-kv into OCR_EXPECTED_EXECUTORS and
  permanently entangled tesseract-ogar's and paperless-kv's hot-plug
  resolutions. Expected executor: paperless-kv.

- capability_registry::domain_tables() gains a 4th entry (document_entries,
  same entries_from_actions() derivation as ocr/geo/healthcare). New
  hot-plug test proves paperless-kv resolves the document table with zero
  contamination of tesseract-ogar's existing OCR resolution.

- Doc staleness corrected append-only across DISCOVERY-MAP.md,
  OGAR-DOC-LAYER-PROPOSAL.md, DOCIR-COMPOSITION-GROUNDING.md,
  OCR-ACTIONS-V2-PROPOSAL.md: every "typed_field mint deferred /
  council-pending" claim regraded in place with a dated Status paragraph,
  none deleted.

Deliberately NOT in this landing: the persist_document executor body
(walking a DocIr into GUID-keyed SoA nodes) -- facts only per W4-4's own
rule. Cross-repo companions tracked separately: lance-graph-contract's
ogar_codebook mirror needs the matching typed_field row; paperless-rs's
paperless-kv needs its HOT_PLUG activation against this table.

164 unit tests + 6 doctests green, clippy -D warnings clean, fmt clean
(cargo fmt -p ogar-vocab / cargo clippy -p ogar-vocab, scoped).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ArVbbq3DsToBM7r79zGeEf
…the spider convergence plan

Follow-up to 3fbd9f3 (the W4 mint + document_actions landing). The
mandatory closing exhaustiveness grep sweep for 0x080A/typed_field
across OGAR/lance-graph/paperless-rs turned up two more sites in this
repo, both regraded append-only:

- ogar-doc-ir/src/lib.rs's "This crate mints nothing" section named
  the ActionDefs' home as "ogar-vocab / ogar-doc (W4)" -- the council
  landed them in ogar-vocab's own document_actions module, NOT a
  separate ogar-doc crate (W4-5 SS A1's "executor lives in the
  assembly repo" ruling). Corrected; crate's own 16 tests still green.
- DOC-IR-SPIDER-CONVERGENCE-PLAN.md's W0 council gate gains a Status
  paragraph: the mints half is closed, W2/W3 (the producers actually
  persisting through persist_document) remain open.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ArVbbq3DsToBM7r79zGeEf
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f5fcbf5-dc8a-4ab0-afed-410de975b118


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Aug 25, 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_e8c1f50e-d67d-4b16-be27-da502129892e)

@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: 894a901d59

ℹ️ 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".

attr("key", "String"),
attr("value", "String"),
attr("confidence", "u8"),
attr("geometry", "Geometry"),

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 Model the typed field bounding box instead of geometry

When a ogar_doc_ir::TypedField is projected into this newly minted class, its location cannot round-trip: the IR defines bbox: BBoxRail and has no per-field geometry member (geometry belongs to DocIr). Consequently, ClassView/persistence code driven by this canonical schema will omit the field's bbox rails and request a nonexistent attribute, losing the position required to reconstruct or render harvested fields. Replace this attribute with the matching bbox/BBoxRail shape.

Useful? React with 👍 / 👎.

@AdaWorldAPI
AdaWorldAPI merged commit 90b809e into main Aug 25, 2026
2 of 3 checks 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