Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/ogar-vocab/src/ports.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Port specifications — `(namespace, bridge_id, public_name → class_id)`
//! triples consumed by `lance_graph_ontology::UnifiedBridge` to project
//! per-port public name vocabularies onto the shared OGAR codebook.
//! triples consumed by `lance_graph_ogar::bridges::UnifiedBridge` to
//! project per-port public name vocabularies onto the shared OGAR codebook.
//!
//! # The goal — one bridge harness, port-specific data
//!
Expand All @@ -12,7 +12,7 @@
//! NamespaceBridge impl AND duplicating its alias table.
//!
//! [`PortSpec`] flips that: the bridge becomes one generic
//! [`lance_graph_ontology::UnifiedBridge<P: PortSpec>`] harness, and
//! `lance_graph_ogar::bridges::UnifiedBridge<P: PortSpec>` harness, and
//! the per-port differences (namespace, bridge_id, alias table) live
//! here as data attached to the canonical class schema. Adding a port
//! is now one `impl PortSpec for FooPort {...}` block with three
Expand Down Expand Up @@ -91,7 +91,7 @@ impl PortSpec for OpenProjectPort {

/// The OpenProject port's `(public_name, class_id)` alias slice,
/// exposed for downstream `pub const` re-exports
/// (e.g. `lance_graph_ontology::bridges::OPENPROJECT_CODEBOOK` keeps
/// (e.g. `lance_graph_ogar::bridges::OPENPROJECT_CODEBOOK` keeps
/// its pre-migration shape by aliasing this slice). Prefer
/// [`OpenProjectPort::aliases`] in new code — going through the
/// `PortSpec` impl works generically across ports.
Expand Down Expand Up @@ -206,7 +206,7 @@ pub const REDMINE_ALIASES: &[(&str, u16)] = &[
/// Unlike [`OpenProjectPort`] / [`RedminePort`] — which converge two
/// project-management forks on a shared codebook — Healthcare is a
/// single-tenant namespace today, so there is no cross-port convergence
/// pin yet. The port exists so `lance_graph_ontology`'s `MedcareBridge`
/// pin yet. The port exists so `lance_graph_ogar`'s `MedcareBridge`
/// collapses to `UnifiedBridge<HealthcarePort>`: the namespace,
/// bridge_id, and alias table are now **inherited from this canonical
/// class schema** instead of being re-declared per bridge in lance-graph.
Expand Down
26 changes: 20 additions & 6 deletions docs/integration/CLASSVIEW-MATERIALIZATION-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ epiphany #4).
public name "WorkPackage"
NamespaceBridge<OpenProject>.entity("WorkPackage") [lance-graph-ontology]
UnifiedBridge<OpenProjectPort>.entity("WorkPackage") [lance-graph-ogar]
UnifiedBridge<OpenProjectBridge>.authorize_read(...) [lance-graph-callcenter]
Expand Down Expand Up @@ -215,11 +215,25 @@ of the first emitted concept).
| C1 | `op-codegen-projection` adopts `ogar-render-askama` for paths currently using `format!` | `openproject-nexgen-rs` |
| C2 | `redmine-canon` re-exports `OgarClassView` (symmetric with the existing `class_ids` re-export) | `redmine-rs` |
| C3 | `op-surreal-ast::from_class_view` adapter — feeds the canonical shape into the byte-identical-pinned typed AST | `openproject-nexgen-rs` |
| C4 | `OpenProjectBridge: impl NamespaceBridge` — `g_lock` to "OpenProject" namespace, public-name dictionary populated from `op-canon` snapshot. `entity_type_id()` returns OGAR codebook ids. | `openproject-nexgen-rs` (sibling of `MedcareBridge`) |
| C5 | `RedmineBridge: impl NamespaceBridge` — symmetric, "Redmine" namespace, same codebook ids. | `redmine-rs` |

After C4 + C5: a consumer holding `UnifiedBridge<OpenProjectBridge>` AND
`UnifiedBridge<RedmineBridge>` resolves `"WorkPackage"` OR `"Issue"`
| C4 | `OpenProjectBridge: impl NamespaceBridge` — `g_lock` to "OpenProject" namespace, `entity_type_id()` returns OGAR codebook ids. | `lance-graph-ogar` (sibling of `MedcareBridge`) |
| C5 | `RedmineBridge: impl NamespaceBridge` — symmetric, "Redmine" namespace, same codebook ids. | `lance-graph-ogar` |

**How C4 + C5 actually landed (location corrected post-merge).** The
original plan listed C4 in `openproject-nexgen-rs` and C5 in `redmine-rs`,
"sibling of `MedcareBridge`." During implementation the bridges converged
on a single generic harness instead of two cloned structs:
`OpenProjectBridge` / `RedmineBridge` are now **type aliases over
`UnifiedBridge<P: PortSpec>`**, where `OpenProjectPort` / `RedminePort`
(the per-port `NAMESPACE` / `BRIDGE_ID` / alias table) live in
`ogar-vocab::ports` (lance-graph PR #570). The bridges first landed in
`lance-graph-ontology` (#558/#559), then **moved to `lance-graph-ogar`
by #585** to restore the OGIT/OGAR separation of concerns — OGIT
(`lance-graph-ontology`) must not depend on `ogar-vocab`. The codebook
itself (the `(public_name → class_id)` data) stays in `ogar-vocab`; only
the bridge *harness* lives in `lance-graph-ogar`.

After C4 + C5: a consumer holding `UnifiedBridge<OpenProjectPort>` AND
`UnifiedBridge<RedminePort>` resolves `"WorkPackage"` OR `"Issue"`
through the policy-evaluated, audit-chained path → gets an `EntityRef`
whose `class_id` routes to the *same* `OgarClassView` arm.

Expand Down
Loading