refactor(op-canon): re-export APP_PREFIX + render_classid from OGAR (one source of truth)#57
Merged
Merged
Conversation
…one source of truth)
Adopts the OGAR PR #97 / #98 / #99 surface in `op_canon::app`, replacing the
two local mirrors with re-exports from `ogar-vocab`:
- APP_PREFIX local `pub const = 0x0001`
→ `pub const = OpenProjectPort::APP_PREFIX` (#97 typed const)
- render_classid local `(APP_PREFIX as u32) << 16 | concept`
→ `ogar_vocab::app::render_classid_for::<OpenProjectPort>` (#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)
Closes the B2#1 follow-up flagged on #56 (op-canon's introductory PR): the
local prefix literal and local bit math are gone; the consumer composes its
0x0001 render via the typed upstream surface, matching the same
one-source-of-truth discipline `class_ids` / `class_view` already follow.
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 @ 273fa78 (post-#99).
cargo +1.95 test -p op-canon: 19 unit + 5 doctests pass; fmt + clippy
(--D warnings) clean.
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
Adopts the OGAR PR #97 / #98 / #99 surface in
op_canon::app, closing the B2#1 follow-up flagged on #56: the localAPP_PREFIX = 0x0001literal and the local(APP_PREFIX as u32) << 16 | conceptbit math are gone — both come fromogar-vocabnow (one source of truth).Same one-source-of-truth discipline
class_ids(re-exportsogar_vocab::class_ids::*) andclass_viewalready follow. Drift between local and OGAR is now structurally impossible.New tests (pin the re-exports themselves)
app_prefix_re_exports_the_typed_ogar_constant—APP_PREFIX == OpenProjectPort::APP_PREFIX == 0x0001.render_classid_agrees_with_the_central_ogar_composition— for every concept,render_classid(c) == ogar_vocab::app::render_classid_for::<OpenProjectPort>(c).The low/high decomposition in
render_classid_keeps_concept_in_the_low_halfnow routes throughogar_vocab::app::app_of/concept_of(also #97) instead of local shifts — the bit math now has exactly one home.#99 spellbook pre-flight (cleared)
PortSpec::APP_PREFIX— no behavior.ogar_vocab::ports+ogar_vocab::app).Zero diagnostic signatures (
*_ast.rsspine /From<DdlAst>/triple.rs+recompute_dag.rscluster / sentinel DDL comments / behavioral roundtrip claims / string-typed FSMs /DEFINE EVENTchains) — none present.Build
cargo update -p ogar-vocab→ OGARmain @ 273fa78(post-#99). No new deps, no removed deps.1.95.cargo test -p op-canon→ 19 unit + 5 doctests pass (was 17+5 in feat(op-canon): app module — pull OGAR via class (W0 / lance-graph#589 shape) #56 — added the 2 re-export pins).cargo fmt --checkclean;cargo clippy -- -D warningsclean.Cross-refs
PortSpec::APP_PREFIX+ogar_vocab::appcomposition module.canonical_concept_namereverse map.appmodule (B2#1 follow-up now closed).Generated by Claude Code