feat(op-canon): app module — pull OGAR via class (W0 / lance-graph#589 shape)#56
Merged
Merged
Conversation
…9 shape) Adds `op_canon::app`, the OpenProject (project) consumer's landing shape for the lance-graph#589 / APP-CODEBOOK-MIGRATION-PLAN W0 migration: resolve an OpenProject surface name to its canonical class-id by PULLING the OGAR port (`ogar_vocab::ports::OpenProjectPort::class_id`) — no bridge, no hand-rolled registry. The vendored snapshot stays as a checked mirror (a port<->snapshot drift guard). Public surface: - APP_PREFIX: u16 = 0x0001 OpenProject's reserved render prefix (layout S2) - class_id_of(name) -> Option<u16> pull the shared concept via the port - render_classid(concept) -> u32 compose 0x0001_DDCC (pure bit-stamp) - render_classid_of(name) -> Option<u32> The low u16 is the shared canonical concept (RBAC + ontology + cross-app identity), identical to the id Redmine's Issue pulls (project_work_item 0x0102); the high u16 is OpenProject's render lens. Composing the high half is the consumer stamping its own reserved prefix (layout S1/S3d), not minting an OGAR codebook class. Hardened via the OGAR 5+3 review (6 PASS + 2 CONCERN resolved): resolver named class_id_of (vs the class_ids module); concept_of_class documented as the corpus-evidence mirror; drift-guard wording made precise; the live Member/Membership snapshot<->alias vocab divergence pinned as a tracked test. cargo +1.95 test -p op-canon: 17 unit + 5 doctests pass; fmt + clippy clean. Lockfile bumped to current ogar-vocab main so ogar_vocab::ports resolves.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Jun 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Lands the lance-graph#589 shape for the OpenProject (project) consumer (migration plan W0 — the flagship):
op-canonnow pulls OGAR via class — resolving an OpenProject surface name to its canonical class-id throughogar_vocab::ports::OpenProjectPort::class_id, no bridge, no hand-rolled registry. The vendored snapshot stays as a checked mirror (a port↔snapshot drift guard).The two halves (
APP-CLASS-CODEBOOK-LAYOUT.md)Issuepulls (project_work_item = 0x0102).0x0001— itsClassView/template lens. Full render classid0x0001_DDCC; Redmine's twin0x0007_DDCC. The cross-fork convergence is machine-checked upstream in OGAR's port tests, not duplicated here.Composing the high half is the consumer stamping its own reserved prefix (layout §1/§3d), not minting an OGAR codebook class — that mint stays gated on OGAR's 5+3 pass.
New surface (
op_canon::app)APP_PREFIX: u16 = 0x0001class_id_of(name) -> Option<u16>render_classid(concept) -> u320x0001_DDCC(pure bit-stamp)render_classid_of(name) -> Option<u32>Snapshot::concept_of_classis now documented as the corpus-evidence mirror;app::class_id_ofis the canonical resolver.Hardened via the OGAR 5+3 gate
Reviewed by 5 research + 3 brutal agents. 6 PASS (doctrine, W0-conformance, cross-port, port-coverage, gating-compliance, defect) + 2 CONCERN resolved:
class_id_of(wasclass_id, rubbed againstclass_ids); added theconcept_of_class↔class_id_ofcross-reference; kept the render-half (spec-prescribed per §1/§3d, affirmed by R3+R5) with a follow-up to sourceAPP_PREFIXfrom a typed OGAR export.Member/Membershipsnapshot↔alias divergence as a tracked test.Build
pub mod app;+ a doc cross-ref. No existing API changed; no bridge removed (op-canon never had one).1.95.cargo test -p op-canon→ 17 unit + 5 doctests pass;fmt --check+clippyclean.ogar-vocab+ogar-class-view+lance-graph-contractgit pins → currentmain) soogar_vocab::portsresolves.Follow-ups (not this PR)
OPENPROJECT_ALIASESkeysMembershipbut the corpus snapshot carriesMemberforproject_membership— align the alias (the pinned test flips when fixed). In flight:claude/port-app-prefixadds the typedOpenProjectPort::APP_PREFIXto re-export here.class_viewdispatch through the full render classid when the keystone/render wave lands.Generated by Claude Code