fix(contract+ogar): mirror OGAR #110 auth domain + bump workspace Cargo.lock — restores q2 build parity#596
Conversation
…go.lock → restore q2 build parity OGAR PR #110 (2026-06-23, AuthStore class family) added 4 entries to `ogar_vocab::class_ids::ALL` (auth_store 0x0B01, auth_zitadel 0x0B02, auth_zanzibar 0x0B03, auth_ory_keto 0x0B04) and a `ConceptDomain::Auth` variant. The `lance-graph-contract::ogar_codebook` wire-compatible mirror was not updated when #110 landed — a 4-entry drift sat in main from 2026-06-23 until exposed by q2 #42's pin bump. The q2 Railway build (against the bumped `302c284` OGAR pin + latest lance-graph main) fired `lance_graph_ogar::parity::COUNT_FUSE`: `mirror::CODEBOOK.len() (39) != ogar_vocab::class_ids::ALL.len() (43)`. Three coordinated fixes: 1. lance-graph-contract: extend `ogar_codebook::CODEBOOK` with the 4 auth_* entries; add `ConceptDomain::Auth` variant; add `0x0B → Auth` to `canonical_concept_domain`; refresh the module-doc count from "two domains" → "four domains" (stale since the Health 0x09XX promotion). 2. lance-graph-ogar: `parity::domains_agree`'s `matches!()` had explicit `(O::X, C::X)` arms — needed an `(O::Auth, C::Auth)` arm. Without it, the runtime `assert_codebook_parity()` panics with "domain disagreement for auth_store (0x0b01)". 3. workspace Cargo.lock: bump pinned ogar-vocab / ogar-class-view / ogar-ontology / ogar-adapter-surrealql from `08a9c979` → `302c284` (current OGAR main, PR #110 merge). 4 references in this lock. Safe SHA swap verified: Cargo.toml deps byte-identical between commits. (The `crates/lance-graph-ogar/Cargo.lock` own-root lock is gitignored and needs the same bump locally; the workspace lock + ogar-vocab branch="main" git dep means consumer locks float to the latest commit on main — q2 already pins `302c284` which has the parity-compatible surface.) Tests: - lance-graph-contract: 9 doctests pass (compile-time fuse passes) - lance-graph-ogar lib: 53/53 pass, including `parity::tests::mirror_is_a_faithful_copy_of_ogar_codebook` - `cargo build -p lance-graph-ogar`: clean EPIPHANIES.md updated per Mandatory Board-Hygiene Rule with E-OGAR-AUTH-MIRROR-DRIFT — names the standing reminder that the mirror must be updated in the SAME commit as any OGAR-side ALL-list extension. Source-of-finding: - q2 Railway build error post-bump (the cross-pin coordination canary) - OGAR PR #110 (introduced the drift; merged 2026-06-23) - lance-graph #592 (introduced the mirror pattern; the parity guard) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThe PR syncs the ChangesOGAR Auth Domain Mirror Sync
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
⚔️ Resolve merge conflicts
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/lance-graph-contract/src/ogar_codebook.rs (1)
77-77: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a focused unit assertion for the new
0x0Bdomain route.Line 77 adds a new routing arm; please add a direct
0x0B01 -> ConceptDomain::Authassertion in the localdomain_routes_on_high_bytetest to keep the guard explicit in this crate.Suggested test addition
#[test] fn domain_routes_on_high_byte() { assert_eq!(canonical_concept_domain(0x0000), ConceptDomain::Reserved); assert_eq!(canonical_concept_domain(0x0101), ConceptDomain::ProjectMgmt); assert_eq!(canonical_concept_domain(0x0206), ConceptDomain::Commerce); assert_eq!(canonical_concept_domain(0x0700), ConceptDomain::Osint); assert_eq!(canonical_concept_domain(0x0801), ConceptDomain::Ocr); assert_eq!(canonical_concept_domain(0x0901), ConceptDomain::Health); + assert_eq!(canonical_concept_domain(0x0B01), ConceptDomain::Auth); assert_eq!(canonical_concept_domain(0x0500), ConceptDomain::Unassigned); }As per coding guidelines,
crates/**/*.rschanges should include focused unit tests alongside implementations.🤖 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` at line 77, Add a focused unit test assertion to the existing `domain_routes_on_high_byte` test function that directly validates the new routing case added at line 77. Create an assertion that verifies when the input is 0x0B01, the routing correctly maps to ConceptDomain::Auth, ensuring the guard for this new routing arm is explicit and testable within this crate.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.
Nitpick comments:
In `@crates/lance-graph-contract/src/ogar_codebook.rs`:
- Line 77: Add a focused unit test assertion to the existing
`domain_routes_on_high_byte` test function that directly validates the new
routing case added at line 77. Create an assertion that verifies when the input
is 0x0B01, the routing correctly maps to ConceptDomain::Auth, ensuring the guard
for this new routing arm is explicit and testable within this crate.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: abb7257a-6b9e-4ce2-b147-dd2d187842a9
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
.claude/board/EPIPHANIES.mdcrates/lance-graph-contract/src/ogar_codebook.rscrates/lance-graph-ogar/src/lib.rs
Drift fix (D — surfaced by q2 #42's pin bump)
The chain that exposed the drift:
auth_store,auth_zitadel,auth_zanzibar,auth_ory_ketoat0x0B01-0x0B04) toogar_vocab::class_ids::ALL+ mintedConceptDomain::Auth.lance-graph-contract::ogar_codebook::CODEBOOKis the wire-compatiblemirror of OGAR's codebook (per feat(contract): mirror OGAR APP-prefix (hi-u16) layer into ogar_codebook (closes ISS-CONTRACT-APP-PREFIX-MIRROR) #592 — the APP-prefix layer joined it).
The mirror was NOT updated when feat: MoE architecture — 4096 experts, top-128 sparse, 4-group hierarchy 4096 experts → router selects top-128 → each runs 16 internal layers → 4 hierarchical groups where expert outputs compose → collapse → token Architecture maps Qwopus's actual MoE structure: Router: 4096×4096 input distance table (which experts respond?) Expert internals: 256×256 per-layer tables (how does each expert think?) Sparse activation: only top-128 of 4096 fire (97% sparsity) Hierarchical meeting: experts compose at 4 intermediate points Performance: 42s for 3 prompts in release (128×16 MatVec per token) → production needs SIMD batching or GPU Output quality still blocked by attractor collapse ("!" dominates). Needs: thinking style temperature + persona routing + ONNX gate correction. https://claude.ai/code/session_01ChLvBfpJS8dQhHxRD4pYNp #110 landed.
Cargo.lockpinned ogar-vocab to08a9c979(pre-feat: MoE architecture — 4096 experts, top-128 sparse, 4-group hierarchy 4096 experts → router selects top-128 → each runs 16 internal layers → 4 hierarchical groups where expert outputs compose → collapse → token Architecture maps Qwopus's actual MoE structure: Router: 4096×4096 input distance table (which experts respond?) Expert internals: 256×256 per-layer tables (how does each expert think?) Sparse activation: only top-128 of 4096 fire (97% sparsity) Hierarchical meeting: experts compose at 4 intermediate points Performance: 42s for 3 prompts in release (128×16 MatVec per token) → production needs SIMD batching or GPU Output quality still blocked by attractor collapse ("!" dominates). Needs: thinking style temperature + persona routing + ONNX gate correction. https://claude.ai/code/session_01ChLvBfpJS8dQhHxRD4pYNp #110, 39 entries) — local build worked because
mirror == ALL == 39.b6a12a6→302c284). q2's Railwaydocker build then ran
cargo buildagainst lance-graph HEAD (mirror=39)302c284(ALL=43).lance_graph_ogar::parity::COUNT_FUSEconst-eval-panicked.
The local build was silently masking the drift.
Three coordinated fixes
1.
lance-graph-contract::ogar_codebook— mirror parityConceptDomain::Authvariant.0x0B → Autharm tocanonical_concept_domain.CODEBOOK(mirrors OGAR feat: MoE architecture — 4096 experts, top-128 sparse, 4-group hierarchy 4096 experts → router selects top-128 → each runs 16 internal layers → 4 hierarchical groups where expert outputs compose → collapse → token Architecture maps Qwopus's actual MoE structure: Router: 4096×4096 input distance table (which experts respond?) Expert internals: 256×256 per-layer tables (how does each expert think?) Sparse activation: only top-128 of 4096 fire (97% sparsity) Hierarchical meeting: experts compose at 4 intermediate points Performance: 42s for 3 prompts in release (128×16 MatVec per token) → production needs SIMD batching or GPU Output quality still blocked by attractor collapse ("!" dominates). Needs: thinking style temperature + persona routing + ONNX gate correction. https://claude.ai/code/session_01ChLvBfpJS8dQhHxRD4pYNp #110's mint).the Health
0x09XXpromotion).2.
lance-graph-ogar::parity::domains_agree— new armThe
matches!()macro used explicit(O::X, C::X)arms per variant; thenew
Authvariant on both sides falls through to default-false without anexplicit arm. Added
(O::Auth, C::Auth).Without this fix the runtime
assert_codebook_parity()panics withdomain disagreement for auth_store (0x0b01)even with the CODEBOOK fix.3. Workspace
Cargo.lock— OGAR pin bumpBumped
ogar-vocab/ogar-class-view/ogar-ontology/ogar-adapter-surrealqlfrom08a9c979→302c284(current OGAR main,PR #110 merge). 4 references in this lock.
Safe SHA swap verified —
Cargo.tomldeps byte-identical between commits:$ git -C ogar diff 08a9c979..302c284 -- crates/{ogar-vocab,ogar-class-view,ogar-ontology,ogar-adapter-surrealql}/Cargo.toml # returns EMPTYSame fix pattern as q2 #42 (which bumped q2's own Cargo.lock with the same
SHA range). The
crates/lance-graph-ogar/Cargo.lock(excluded-from-workspaceown-root lock) is
.gitignored; locally I bumped it for the test run,consumers regenerate from their own
cargo build.Tests
cargo test -p lance-graph-contract: 9 doctests pass (compile-time fuse passes)cargo test --libincrates/lance-graph-ogar: 53/53 pass, includingparity::tests::mirror_is_a_faithful_copy_of_ogar_codebook(the runtimefull-bijection check)
cargo build -p lance-graph-ogar: cleanBoard-Hygiene per Mandatory Rule
.claude/board/EPIPHANIES.mdprepended withE-OGAR-AUTH-MIRROR-DRIFT(Status: FINDING). Captures the standing reminder: the mirror must be
updated in the SAME commit as any OGAR-side
ALL-list extension. TheCOUNT_FUSE is the guardrail when it fires locally (matching pins); the
q2-side build was the guardrail that fired this time, two days late.
Source-of-finding
Related
Summary by CodeRabbit
Bug Fixes
Chores