refactor(redmine-canon): re-export APP_PREFIX + render_classid from OGAR (one source of truth)#20
Merged
Conversation
…GAR (one source of truth)
The Redmine-side twin of openproject-nexgen-rs#57: adopts the OGAR PR #97
surface in `redmine_canon::app`, replacing the two local mirrors with
re-exports from `ogar-vocab`:
- APP_PREFIX local `pub const = 0x0007`
→ `pub const = RedminePort::APP_PREFIX` (#97 typed const)
- render_classid local `(APP_PREFIX as u32) << 16 | concept`
→ `ogar_vocab::app::render_classid_for::<RedminePort>` (#97 central)
- low/high decomp local `(cid >> 16) as u16` / `cid as u16` in the test
→ `ogar_vocab::app::app_of(cid)` / `concept_of(cid)` (#97 central)
Keeps the two `-canon` ports byte-symmetric on the new OGAR surface: op-canon
re-exports OpenProjectPort::APP_PREFIX (0x0001), redmine-canon re-exports
RedminePort::APP_PREFIX (0x0007). The local prefix literal and local bit math
are gone; the consumer composes its 0x0007 render via the typed upstream
surface, matching the one-source-of-truth discipline class_ids already follows.
Two new tests:
- app_prefix_re_exports_the_typed_ogar_constant
- render_classid_agrees_with_the_central_ogar_composition
#99 trap-spellbook pre-flight: cleared all 5 questions (no producer reading,
no lifecycle vocabulary, target IR is canonical OGAR, arrow producer→OGAR→
consumer, no behavior to recover). Zero diagnostic signatures present.
Lockfile: cargo update -p ogar-vocab → OGAR main (post-#97).
cargo +1.95 test -p redmine-canon: 22 unit + 5 doctests pass; fmt + clippy
(-D warnings) clean.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
The Redmine-side twin of openproject-nexgen-rs#57: adopts the OGAR PR #97 surface in
redmine_canon::app, replacing the two local mirrors with re-exports fromogar-vocab.Keeps the two
-canonports byte-symmetric on the new OGAR surface: op-canon re-exportsOpenProjectPort::APP_PREFIX(0x0001), redmine-canon re-exportsRedminePort::APP_PREFIX(0x0007). One source of truth; drift between local and OGAR is now structurally impossible.New tests (pin the re-exports)
app_prefix_re_exports_the_typed_ogar_constant—APP_PREFIX == RedminePort::APP_PREFIX == 0x0007.render_classid_agrees_with_the_central_ogar_composition— for every concept,render_classid(c) == ogar_vocab::app::render_classid_for::<RedminePort>(c).The low/high decomposition test now routes through
ogar_vocab::app::app_of/concept_of(also #97) instead of local shifts.#99 spellbook pre-flight (cleared)
PortSpec::APP_PREFIX— no behavior.ogar_vocab::ports+ogar_vocab::app).Zero diagnostic signatures present.
Build
cargo update -p ogar-vocab→ OGARmain(post-#97). No new/removed deps.1.95.cargo test -p redmine-canon→ 22 unit + 5 doctests pass (was 20+5 in feat(redmine-canon): app module — pull OGAR via class (0x0007 twin of op-canon) #19).cargo fmt --checkclean;cargo clippy -- -D warningsclean.Cross-refs
PortSpec::APP_PREFIX+ogar_vocab::appcomposition module.redmine-canon::appmodule.