feat(op-canon): app_of/concept_of decomposition re-exports#61
Merged
Conversation
The app module had the forward surface (class_id_of, render_classid,
render_classid_of) but the inverse decomposition was only reachable via
the full `ogar_vocab::app::{app_of, concept_of}` path (used directly in
the low-half test). Re-export both on `op_canon::app` so a render classid
round-trips entirely on this crate's surface:
concept --render_classid--> 0x0001_DDCC --app_of/concept_of--> (prefix, concept)
- app_of(classid) -> u16 re-export of ogar_vocab::app::app_of (high half)
- concept_of(classid) -> u16 re-export of ogar_vocab::app::concept_of (low half)
Same one-source-of-truth discipline as render_classid / APP_PREFIX (OGAR
#97): the canonical layer owns the bit math, this crate re-exports — no
local shifts to drift. Two doctests + two unit tests (round-trip inversion
of render_classid; equality with OGAR's central helpers + bit-exact
reconstruction).
cargo +1.95 fmt / clippy -D warnings / test -p op-canon: 21 unit + 7
doctests green.
AdaWorldAPI
pushed a commit
that referenced
this pull request
Jul 1, 2026
Re-export `ogar_vocab::canonical_concept_name` (OGAR PR #98) on `op_canon::app` — the reverse codebook map (shared concept id -> canonical name), completing the round-trip against class_id_of: name --class_id_of--> concept id --canonical_concept_name--> name Same one-source-of-truth discipline as the forward resolvers and #61's app_of/concept_of: the canonical layer owns the map, op-canon re-exports. Returns the SHARED canonical name (WorkPackage and Redmine's Issue both reverse to project_work_item), not the OpenProject surface name. - 1 doctest (round-trip via class_id_of + None for unknown ids). - 2 unit tests: reverses class_id_of on headline concepts; agrees with the snapshot's canonical_concept for every id it resolves (>=20 covered). cargo +1.95 fmt / clippy -D warnings / test -p op-canon: 23 unit + 8 doctests green.
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
Completes the
op-canon::appclassid decomposition surface by re-exporting the two inverses ofrender_classid:app_of(classid: u32) -> u16— the OpenProject render prefix (high half)concept_of(classid: u32) -> u16— the shared canonical concept (low half)The forward surface (
class_id_of→render_classid→render_classid_of) already lived on the module, but the inverse decomposition was only reachable via the fullogar_vocab::app::{app_of, concept_of}path (used directly in the low-half test). Now a render classid round-trips entirely on this crate's own surface:Why
Same one-source-of-truth discipline as
render_classid/APP_PREFIX(OGAR #97): the canonical layer owns the bit math,op-canonre-exports — no local shifts to drift. Consumers get the complete forward + inverse pair from one import surface instead of reaching intoogar_vocab::app.Tests
app_of,concept_of) showing the round-trip against0x0001_0102.app_of/concept_ofinvertrender_classidacross the headline concepts; equality with OGAR's central helpers + bit-exact reconstruction of the classid.cargo +1.95 fmt --check/clippy --all-targets -D warnings/test -p op-canon: 21 unit + 7 doctests green.Branch note
PR #56 (the original
beautiful-gates-dJo0u, theop-canonapp module) is already merged. Per the merged-branch rule this branch was restarted from latestmain(fe100b2, which already includes the merged #60) and this single follow-up commit stacked on top — fast-forward, no force, and no overlap with the in-flightclaude/odoo-rs-transcode-lf8ya5work.🤖 Generated with Claude Code
Generated by Claude Code