feat(redmine-canon): app module — pull OGAR via class (0x0007 twin of op-canon)#19
Merged
Merged
Conversation
… op-canon)
Adds `crates/redmine-canon/src/app.rs`, the symmetric Redmine-side twin of
op-canon's `app.rs` (lance-graph#589 landing shape).
Public API (mirrors op-canon's FINAL naming):
- `APP_PREFIX: u16 = 0x0007` — Redmine's reserved render prefix
(APP-CLASS-CODEBOOK-LAYOUT.md §2; OpenProject's twin is 0x0001)
- `class_id_of(surface_name) -> Option<u16>` — pulls via RedminePort::class_id,
no bridge, no hand-rolled registry
- `render_classid(concept: u16) -> u32` — stamps the Redmine prefix:
(0x0007 << 16) | concept => 0x0007_DDCC
- `render_classid_of(surface_name) -> Option<u32>` — pull + compose in one step
Tests:
- `class_id_of("Issue") == Some(0x0102)` (same project_work_item id as
OpenProject's WorkPackage — the fork-lineage convergence invariant)
- `render_classid(0x0102) == 0x0007_0102`
- `port_pull_agrees_with_the_snapshot` drift guard: iterates the vendored
Redmine snapshot's curator_classes; for every name the port resolves,
asserts it returns the same id as the snapshot. Checked 28 surface names
(all 28 Redmine port aliases appear in the snapshot).
Wires `pub mod app;` into redmine-canon/src/lib.rs respecting
`#![warn(missing_docs)]`.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
1 similar comment
|
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.
The Redmine-side lance-graph#589 landing shape, symmetric to op-canon's W0 (openproject-nexgen-rs#56):
redmine-canon::apppulls the canonical class_id for a Redmine surface name viaogar_vocab::ports::RedminePort::class_id(no bridge), and composes the full render classid under Redmine's reserved prefix0x0007(APP-CLASS-CODEBOOK-LAYOUT.md§2).class_id_of("Issue") == Some(0x0102)— the same low-half concept OpenProject'sWorkPackagepulls (two renders, one concept). Includes a port<->snapshot drift guard. Built+tested on 1.95.