Skip to content

feat(op-canon): app module — pull OGAR via class (W0 / lance-graph#589 shape)#56

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/beautiful-gates-dJo0u
Jun 22, 2026
Merged

feat(op-canon): app module — pull OGAR via class (W0 / lance-graph#589 shape)#56
AdaWorldAPI merged 1 commit into
mainfrom
claude/beautiful-gates-dJo0u

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Lands the lance-graph#589 shape for the OpenProject (project) consumer (migration plan W0 — the flagship): op-canon now pulls OGAR via class — resolving an OpenProject surface name to its canonical class-id through 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).

use op_canon::{app, class_ids};
assert_eq!(app::class_id_of("WorkPackage"), Some(class_ids::PROJECT_WORK_ITEM)); // 0x0102
assert_eq!(app::render_classid_of("WorkPackage"), Some(0x0001_0102));            // render lens

The two halves (APP-CLASS-CODEBOOK-LAYOUT.md)

  • low u16 = shared canonical concept — the RBAC + ontology + cross-app identity key. The port pull, identical to the id Redmine's Issue pulls (project_work_item = 0x0102).
  • high u16 = OpenProject's render prefix 0x0001 — its ClassView/template lens. Full render classid 0x0001_DDCC; Redmine's twin 0x0007_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)

item purpose
APP_PREFIX: u16 = 0x0001 OpenProject's reserved render prefix (layout §2; local mirror, to re-export OGAR's typed const once shipped)
class_id_of(name) -> Option<u16> pull the shared concept via the OGAR port
render_classid(concept) -> u32 compose 0x0001_DDCC (pure bit-stamp)
render_classid_of(name) -> Option<u32> pull + compose

Snapshot::concept_of_class is now documented as the corpus-evidence mirror; app::class_id_of is 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:

  • B2 (scope/API): renamed resolver class_id_of (was class_id, rubbed against class_ids); added the concept_of_classclass_id_of cross-reference; kept the render-half (spec-prescribed per §1/§3d, affirmed by R3+R5) with a follow-up to source APP_PREFIX from a typed OGAR export.
  • B1 (overclaim): softened the drift-guard wording ("agree on every name the port resolves", not "never disagree"); named the real skip-set; pinned the live Member/Membership snapshot↔alias divergence as a tracked test.

Build

  • Additive: one new module + pub mod app; + a doc cross-ref. No existing API changed; no bridge removed (op-canon never had one).
  • Toolchain 1.95. cargo test -p op-canon17 unit + 5 doctests pass; fmt --check + clippy clean.
  • Lockfile bumped (ogar-vocab + ogar-class-view + lance-graph-contract git pins → current main) so ogar_vocab::ports resolves.

Follow-ups (not this PR)

  • OGAR: OPENPROJECT_ALIASES keys Membership but the corpus snapshot carries Member for project_membership — align the alias (the pinned test flips when fixed). In flight: claude/port-app-prefix adds the typed OpenProjectPort::APP_PREFIX to re-export here.
  • W0 step 5: route class_view dispatch through the full render classid when the keystone/render wave lands.

Generated by Claude Code

…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.
@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.

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