Skip to content

feat(op-canon): app_of/concept_of decomposition re-exports#61

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

feat(op-canon): app_of/concept_of decomposition re-exports#61
AdaWorldAPI merged 1 commit into
mainfrom
claude/beautiful-gates-dJo0u

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Completes the op-canon::app classid decomposition surface by re-exporting the two inverses of render_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_ofrender_classidrender_classid_of) already lived on the module, 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). Now a render classid round-trips entirely on this crate's own surface:

concept --render_classid--> 0x0001_DDCC --app_of / concept_of--> (prefix, concept)

Why

Same one-source-of-truth discipline as render_classid / APP_PREFIX (OGAR #97): the canonical layer owns the bit math, op-canon re-exports — no local shifts to drift. Consumers get the complete forward + inverse pair from one import surface instead of reaching into ogar_vocab::app.

Tests

  • 2 doctests (app_of, concept_of) showing the round-trip against 0x0001_0102.
  • 2 unit tests: app_of/concept_of invert render_classid across 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, the op-canon app module) is already merged. Per the merged-branch rule this branch was restarted from latest main (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-flight claude/odoo-rs-transcode-lf8ya5 work.

🤖 Generated with Claude Code


Generated by Claude Code

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 AdaWorldAPI merged commit c8a59e6 into main Jul 1, 2026
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.
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