Skip to content

fix(contract+ogar+lock): mirror OGAR #126 (PRICELIST/PRICELIST_RULE/UNIT_OF_MEASURE) + close domains_agree Anatomy + Automation drift#606

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/contract-mirror-pricelist-uom-from-ogar-c2
Jun 24, 2026
Merged

fix(contract+ogar+lock): mirror OGAR #126 (PRICELIST/PRICELIST_RULE/UNIT_OF_MEASURE) + close domains_agree Anatomy + Automation drift#606
AdaWorldAPI merged 1 commit into
mainfrom
claude/contract-mirror-pricelist-uom-from-ogar-c2

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jun 24, 2026

Copy link
Copy Markdown
Owner

D3 — closes both gaps in one PR

OGAR #126 just merged (PRICELIST + PRICELIST_RULE + UNIT_OF_MEASURE — the ProductCatalog cluster, all 0x02XX commerce arm). This PR mirrors those 3 entries AND closes the silent domains_agree drift I surfaced earlier today while attempting D3 the first time but couldn't fix without an OGAR pin bump.

Three coordinated fixes

1. lance-graph-contract::ogar_codebook::CODEBOOK — +3 entries

("pricelist",        0x0209),
("pricelist_rule",   0x020A),
("unit_of_measure",  0x020B),

No new ConceptDomain variant — both Anatomy (0x0AXX) and Automation (0x0CXX) were already mirrored when those domains landed in earlier PRs; this only adds the new commerce-arm rows.

2. lance-graph-ogar::parity::domains_agree — close the silent Anatomy + Automation drift

parity::domains_agree's matches!() macro had explicit (O::X, C::X) arms for each variant but was missing Anatomy and Automation. Both enum variants exist on both sides AND the high-byte routing is wired AND the CODEBOOK entries are there — but the matches!() fell through to default-false for any 0x0AXX or 0x0CXX classid, panicking assert_codebook_parity() on those ids. Likely silently passing CI because no test iterates a 0x0AXX or 0x0CXX classid through domains_agree.

Same shape as the AuthStore arm added in D1 81d08c42 (E-OGAR-AUTH-MIRROR-DRIFT epiphany). Now adds:

| (O::Anatomy,    C::Anatomy)
| (O::Automation, C::Automation)

3. Workspace Cargo.lock — OGAR pin bump

Bumped pinned ogar-vocab / ogar-class-view / ogar-ontology / ogar-adapter-surrealql from ac4b41625089c1e8 (current OGAR main, post-#126 merge). 4 refs. Same fix pattern as q2 #42 / D2 #597.

The crates/lance-graph-ogar/Cargo.lock own-root lock is .gitignored and needs the same bump locally; consumer's cargo regenerates on build.

Why this couldn't ship earlier today

The COUNT_FUSE compile-time assert locks mirror.len() == ogar_vocab::class_ids::ALL.len(). Until C2 #126 landed and bumped ALL from 58 → 61, the mirror+3 = 61 mismatched. Now both sides are 61.

Board-Hygiene per Mandatory Rule

.claude/board/EPIPHANIES.md prepended with E-OGAR-API-EDIT-PULL-FIRST (Status: FINDING). Sibling pattern to E-OGAR-AUTH-MIRROR-DRIFT (lance-graph #595 / #596 / #597) — both about cross-repo edit-time drift. That one was "mirror lags ALL"; this one is "API-edit lags upstream main." The discipline: pull-first, edit-narrow, push-thin.

Surfaced by my own initial uploads on C2 #126 regressing Anatomy + Automation entries (the ogar-fma-skeleton CI fail at class_ids::BONE), fixed via pull-then-splice rebase.

Tests

cargo build -p lance-graph-ogar can't run locally (network 403 fetching the new OGAR pin), but the changes themselves are correct:

  • lance-graph-contract: 3 new CODEBOOK entries, fmt-clean
  • lance-graph-ogar: 2 new match arms in domains_agree, fmt-clean
  • Cargo.lock: 4 SHA refs bumped, Cargo.toml deps byte-identical between pins (the standard "safe SHA swap" pattern)

CI on this branch will verify.

Source-of-finding


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for additional commerce terms, including pricelist, pricing rules, and units of measure.
    • Expanded domain matching so more identifiers are recognized consistently across systems.
  • Documentation

    • Added a new operational note describing the recommended workflow for applying edits safely and avoiding accidental overwrites during CI-related fixes.

…NIT_OF_MEASURE) + close domains_agree Anatomy + Automation drift

D3 — closes the parity gap surfaced by OGAR #126 (PRICELIST + PRICELIST_RULE
+ UNIT_OF_MEASURE — ProductCatalog cluster, all 0x02XX commerce arm) AND
the silent domains_agree drift surfaced earlier today while attempting D3
the first time.

Three coordinated fixes:

1. lance-graph-contract: extend `ogar_codebook::CODEBOOK` with the 3 new
   ProductCatalog entries (pricelist 0x0209, pricelist_rule 0x020A,
   unit_of_measure 0x020B). No new ConceptDomain variant — both Anatomy
   (0x0AXX) and Automation (0x0CXX) were already mirrored when those
   domains landed; this only adds the new commerce-arm rows.

2. lance-graph-ogar: `parity::domains_agree` was missing the (O::Anatomy,
   C::Anatomy) and (O::Automation, C::Automation) arms. Both enum variants
   exist on both sides AND the high-byte routing is wired AND the CODEBOOK
   entries are there — but the matches!() macro fell through to default-
   false for any 0x0AXX or 0x0CXX classid, panicking
   assert_codebook_parity() on those ids. Same shape as the AuthStore arm
   I added in D1 81d08c4 (E-OGAR-AUTH-MIRROR-DRIFT epiphany).

3. Workspace Cargo.lock: bump pinned ogar-vocab / ogar-class-view /
   ogar-ontology / ogar-adapter-surrealql from ac4b4162 → 5089c1e8 (current
   OGAR main, post-#126 merge). 4 refs. Same fix pattern as q2 #42 / D2 #597.

   The crates/lance-graph-ogar/Cargo.lock own-root lock is gitignored and
   needs the same bump locally; consumer's cargo regenerates on build.

Why this PR couldn't ship earlier today: the COUNT_FUSE compile-time assert
locks mirror.len() == ALL.len(). Until C2 #126 landed and bumped ALL from
58 → 61, the mirror+3 = 61 mismatched. Now both sides are 61.

EPIPHANIES.md updated per Mandatory Board-Hygiene Rule with new finding
E-OGAR-API-EDIT-PULL-FIRST — sibling pattern to E-OGAR-AUTH-MIRROR-DRIFT,
about API-based edits regressing upstream main when uploading pre-edited
local files. Surfaced by my own initial uploads on C2 #126 regressing
Anatomy + Automation entries, fixed via pull-then-splice rebase.

Source-of-finding:
  - AdaWorldAPI/OGAR#126 (merged) — the mints
  - this PR's domains_agree fix — the silent drift
  - AdaWorldAPI/odoo-rs#14/#15/#16 — the upstream cross-axis identity gap

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c606df16-b165-4c98-bd37-5704dbdb704b

📥 Commits

Reviewing files that changed from the base of the PR and between 1b848a8 and 56d884d.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • .claude/board/EPIPHANIES.md
  • crates/lance-graph-contract/src/ogar_codebook.rs
  • crates/lance-graph-ogar/src/lib.rs

📝 Walkthrough

Walkthrough

Added an Epiphanies note about pull-first uploads, extended the OGAR codebook with three commerce concepts, and updated domain agreement matching to recognize the corresponding ids.

Changes

Pull-first edit workflow note

Layer / File(s) Summary
Epiphanies entry
.claude/board/EPIPHANIES.md
Adds a markdown note describing the stale-checkout update_file() failure mode and the pull-first, anchor-splice upload workflow.

OGAR codebook and parity alignment

Layer / File(s) Summary
Codebook extension
crates/lance-graph-contract/src/ogar_codebook.rs
Adds canonical concept mappings for pricelist, pricelist_rule, and unit_of_measure.
Domain agreement matching
crates/lance-graph-ogar/src/lib.rs
Updates parity::domains_agree to treat the additional domain variants as matching.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I nibbled a leaf from the stale old pile,
Then pulled fresh main with a rabbit’s style.
I spliced the change with careful paws, 🐇
And hopped where codebooks keep their laws.
New concepts twinkle; the domains agree.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main parity update across contract, OGAR, and lockfile changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@AdaWorldAPI AdaWorldAPI merged commit ade51df into main Jun 24, 2026
6 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