contract: mirror the 0x0805..0x0809 OCR plan mints (paired with OGAR #172)#655
Conversation
… OGAR #172) The lance-graph half of the two-sided drift fuse: ogar_codebook::CODEBOOK +5 rows (textline/blob/page_layout/page_image/ocr_renderer) mirroring OGAR PR #172, + the lance-graph-ogar doc-count 79->84. MERGE ORDER: OGAR #172 first (or same timeframe) — lance-graph-ogar pulls ogar-* as git deps on OGAR main, so its COUNT_FUSE compile-assert only balances once both sides carry 84. 829/829 contract tests green. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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_702314b8-a27f-47c1-90a7-3734c6456a55) |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/lance-graph-contract/src/ogar_codebook.rs (1)
694-717: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winExtend drift-guard test to cover the new OCR entries.
The comment on this test states entries "MUST match OGAR
ogar_vocab::CODEBOOKexactly," but none of the five new ids added in this PR (textline,blob,page_layout,page_image,ocr_renderer) are asserted here. Per thecrates/**/*.rsguideline to add tests alongside implementations, extend this test to cover the new mints so a local regression (e.g., a swapped id) is caught without relying solely on thelance-graph-ogarruntime parity check.✅ Suggested test additions
// 0x08XX OCR (container kinds; unichar content stays out of the codebook). assert_eq!(canonical_concept_id("unicharset"), Some(0x0801)); assert_eq!(canonical_concept_id("charset"), Some(0x0803)); + assert_eq!(canonical_concept_id("textline"), Some(0x0805)); + assert_eq!(canonical_concept_id("blob"), Some(0x0806)); + assert_eq!(canonical_concept_id("page_layout"), Some(0x0807)); + assert_eq!(canonical_concept_id("page_image"), Some(0x0808)); + assert_eq!(canonical_concept_id("ocr_renderer"), Some(0x0809));🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/lance-graph-contract/src/ogar_codebook.rs` around lines 694 - 717, The drift-guard test in codebook_ids_match_ogar_vocab does not cover the newly added OCR codebook entries, so add assertions for textline, blob, page_layout, page_image, and ocr_renderer to keep the test aligned with OGAR::ogar_vocab::CODEBOOK. Update this test alongside canonical_concept_id so a swapped or changed OCR mint is caught locally, not only by runtime parity checks. Keep the existing “must match exactly” intent and place the new assertions with the other OCR-related ids.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@crates/lance-graph-contract/src/ogar_codebook.rs`:
- Around line 694-717: The drift-guard test in codebook_ids_match_ogar_vocab
does not cover the newly added OCR codebook entries, so add assertions for
textline, blob, page_layout, page_image, and ocr_renderer to keep the test
aligned with OGAR::ogar_vocab::CODEBOOK. Update this test alongside
canonical_concept_id so a swapped or changed OCR mint is caught locally, not
only by runtime parity checks. Keep the existing “must match exactly” intent and
place the new assertions with the other OCR-related ids.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 9362df9b-2449-4971-9546-26e1bd45024b
📒 Files selected for processing (2)
crates/lance-graph-contract/src/ogar_codebook.rscrates/lance-graph-ogar/Cargo.toml
What
The lance-graph half of the two-sided drift fuse, paired with the now-merged OGAR #172:
ogar_codebook::CODEBOOK+5 rows mirroring the OCR PDF→text plan mints, + thelance-graph-ogardoc-count 79→84.pdf-to-text-ocr-v1.md)textlineblobpage_layoutpage_imageocr_rendererWhy now (fuse balance)
Since #172 merged, OGAR main carries
ALL.len() == 84while lance-graph main's mirror still has 79 — thelance-graph-ogarCOUNT_FUSEcompile-assert is unbalanced on main until this lands (exactly the drift the fuse exists to catch). This PR restores balance.Verification
cargo test -p lance-graph-contract— 829/829 greencargo test --manifest-path crates/lance-graph-ogar/Cargo.toml(standalone, git-deps OGAR main = post-Claude/risc thought engine tc zw7 #172) — compiles + runs, i.e. theCOUNT_FUSEcompile-time assert balances at 84 == 84Cherry-pick of
95a5c384from the session branch (claude/happy-hamilton-0azlw4) onto freshmain, so the fuse balance does not wait on the full session-branch merge.🤖 Generated with Claude Code
https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
Generated by Claude Code
Summary by CodeRabbit