Skip to content

feat(redmine-canon): re-export ogar_class_view::OgarClassView (Northstar C2)#6

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/redmine-canon-class-view-reexport
Jun 20, 2026
Merged

feat(redmine-canon): re-export ogar_class_view::OgarClassView (Northstar C2)#6
AdaWorldAPI merged 1 commit into
mainfrom
claude/redmine-canon-class-view-reexport

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

C2 per Northstar plan §3 — symmetric move with the existing class_ids re-export (PR #5).

The ClassView projection bridge from ogar_vocab::Class onto lance_graph_contract::ClassView lives in ogar-class-view (OGAR #77, merged). This port re-exports both the trait + impl so the projection contract is shared with op-canon (symmetric with the class_ids symmetry).

Surface

  • Cargo.toml: adds ogar-class-view + lance-graph-contract git deps (both AdaWorldAPI forks).
  • src/class_view.rs (new): re-exports the projection surface in one place — OgarClassView, ClassView trait, ClassId, FieldMask, RenderRow, ClassProjection, FieldRef, ObjectView, DisplayTemplate.

Downstream rm-* crates now reach the run-time projection layer through one import path (redmine_canon::class_view), without each crate needing to know about lance-graph-contract or ogar-class-view directly.

The five-line muscle-memory loop

Northstar §2.3 — now exercisable through redmine-canon:

use redmine_canon::class_view::{OgarClassView, ClassView, FieldMask};
use redmine_canon::class_ids::PROJECT_WORK_ITEM;

let view = OgarClassView::new();              // registry built at startup
let mask = FieldMask::EMPTY.with(0).with(1);  // SoA row presence bits
let rows = view.render_rows(PROJECT_WORK_ITEM, mask);
// rows feed an askama projection template — HTML / JSON / whatever.

Tests (+3 unit, +1 doctest)

  • re_export_loads_the_canonical_class_view — pulls OgarClassView into scope, asserts field_count > 0 for project_work_item / billable_work_entry / project_role.
  • render_rows_skips_off_bits_through_the_re_export — exercises the five-line loop end-to-end.
  • snapshot_ids_resolve_through_the_re_exported_view — every concept the vendored snapshot promotes has a non-empty field set via the re-exported view.
  • Doctest pins the public API.

16/16 unit + 2 doctests pass; workspace check + test green; clippy clean; fmt clean.

Scope

Purely additive — one new file (class_view.rs), one pub mod line, two new git deps. No existing API changes, no test churn.

Pair

Symmetric PR on openproject-nexgen-rs (op-canon::class_view re-export) queues next — same shape, same diff.

…tar C2)

Northstar plan §3 C2 — symmetric move with the existing class_ids
re-export (PR #5). The ClassView projection bridge from ogar_vocab::Class
onto lance_graph_contract::ClassView lives in `ogar-class-view` (OGAR PR
#77, merged). This port re-exports both the trait + impl so:

- The projection contract is shared with op-canon (#48/#49/#50 pattern).
- Downstream `rm-*` crates get one import path (`redmine_canon::class_view`)
  for ClassView + FieldMask + RenderRow + OgarClassView.
- The "five-line muscle-memory loop" in Northstar §2.3 is exercisable
  through redmine-canon directly.

Surface:
- crates/redmine-canon/Cargo.toml: adds `ogar-class-view` +
  `lance-graph-contract` git deps (both AdaWorldAPI/* forks).
- crates/redmine-canon/src/class_view.rs: re-exports ClassId, ClassView,
  ClassProjection, FieldMask, RenderRow + DisplayTemplate, FieldRef,
  ObjectView + OgarClassView. Module doc explains the pattern.

Tests (+3 unit, +1 doctest, 16/16 + 2 doctests total):
- re_export_loads_the_canonical_class_view — pulls OgarClassView into
  scope, asserts field_count > 0 for the three project-mgmt concepts.
- render_rows_skips_off_bits_through_the_re_export — exercises the
  five-line loop end-to-end via the re-export.
- snapshot_ids_resolve_through_the_re_exported_view — end-to-end pin:
  every concept the vendored snapshot promotes has a non-empty field
  set via the re-exported view.
- Doctest pins the public API signature works.

Workspace check + test green; clippy + fmt clean.
@AdaWorldAPI AdaWorldAPI merged commit 634f736 into main Jun 20, 2026
1 check passed
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