Skip to content

refactor(ontology): move OGAR port bridges to lance-graph-ogar — restore OGIT/OGAR SoC#585

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/medcare-bridge-lance-graph-wmx76z
Jun 21, 2026
Merged

refactor(ontology): move OGAR port bridges to lance-graph-ogar — restore OGIT/OGAR SoC#585
AdaWorldAPI merged 1 commit into
mainfrom
claude/medcare-bridge-lance-graph-wmx76z

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jun 21, 2026

Copy link
Copy Markdown
Owner

What

Restores the OGIT / OGAR separation of concerns (operator decision, lance-graph-ogar/Cargo.toml 2026-06-20):

  • lance-graph-ontology = OGIT — legacy TTL/RDF/OWL/DOLCE hydration cache, not ours to evolve. Nothing ClassView- / codebook- / port-shaped belongs here.
  • lance-graph-ogar = OGAR — Active-Record / ClassView / codebook / the AST-rail. The home for OGAR-driven code; already owns ogar-vocab.

The violation this fixes

The UnifiedBridge<P: PortSpec> harness + the OpenProject / Redmine / Medcare port bridges are OGAR-driven (ogar_vocab::ports + class_ids + codebook synthesis) yet lived in lance-graph-ontology, pulling ogar-vocab into the OGIT default build. That collapsed the boundary the contract's zero-dep ogar_codebook mirror exists to preserve. (Introduced earlier by the UnifiedBridge refactor; #582/#583 entrenched it — this undoes it forward.)

The move

  • Moved 4 bridge sources + their 4 integration tests lance-graph-ontologylance-graph-ogar:
    unified.rs, medcare_bridge.rs, openproject_bridge.rs, redmine_bridge.rs (+ bridge_scope_lock, openproject_bridge_scope_lock, redmine_bridge_scope_lock, bridge_codebook_convergence).
  • Dropped ogar-vocab from lance-graph-ontology entirely. OGIT keeps only its own bridges (Ogit/Woa/SharePoint/Spear) + the NamespaceBridge trait — zero OGAR coupling.
  • lance-graph-ogar gains a path dep on lance-graph-ontology (OGAR reads the OGIT hydration cache — the correct direction) and re-exports the bridges.

Imports move lance_graph_ontology::bridges::{UnifiedBridge, MedcareBridge, HealthcarePort, OpenProjectBridge, OpenProjectPort, RedmineBridge, RedminePort, *_CODEBOOK}lance_graph_ogar::bridges::*. (callcenter's UnifiedBridge<B: NamespaceBridge> is an unrelated type and is untouched.)

Tests

  • lance-graph-ontology: cargo build clean with no ogar-vocab, 264 lib tests green.
  • lance-graph-ogar: 34 lib + 21 moved integration tests green (bridge_scope_lock 6, openproject 6, redmine 4, convergence 5); codebook parity guard satisfied (39 == 39, on main via test(symbiont): run-NaN cognitive half proven green + fix ogar_codebook drift #584).
  • cargo check --workspace clean — no other member consumed the moved bridges.

Coordinated with

  • medcare-rs# — repoints its two lance_graph_ontology::bridges::{MedcareBridge, HealthcarePort} imports to lance_graph_ogar::bridges::* and adds the lance-graph-ogar dep; must land after this.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP


Generated by Claude Code

Summary by CodeRabbit

  • Refactor

    • Reorganized bridge implementations—OGAR-driven port bridges (Healthcare/MedCare, OpenProject, Redmine) now reside in the dedicated lance-graph-ogar crate for improved modularity.
    • Maintained backward compatibility through deprecated constant re-exports for existing consumers.
  • Chores

    • Updated internal dependencies and import paths to reflect crate reorganization.

…re OGIT/OGAR SoC)

The operator decision (lance-graph-ogar/Cargo.toml, 2026-06-20) keeps OGIT
and OGAR cleanly separate:
  lance-graph-ontology = OGIT  — legacy TTL/RDF/OWL/DOLCE hydration cache,
                                 not ours to evolve; nothing ClassView /
                                 codebook / port-shaped belongs here.
  lance-graph-ogar     = OGAR  — Active-Record / ClassView / codebook /
                                 the AST-rail; the home for OGAR-driven code.

The UnifiedBridge<P: PortSpec> harness + the OpenProject/Redmine/Medcare
port bridges are OGAR-driven (ogar_vocab::ports + class_ids + codebook
synthesis) yet lived in lance-graph-ontology, pulling ogar-vocab into the
OGIT default build. That collapsed the boundary the contract's zero-dep
ogar_codebook mirror exists to preserve.

This moves those 4 bridge files + their 4 integration tests into
lance-graph-ogar/src/bridges (it already owns ogar-vocab) and DROPS the
ogar-vocab dependency from lance-graph-ontology entirely. OGIT keeps only
its own bridges (Ogit/Woa/SharePoint/Spear) + the NamespaceBridge trait,
and goes back to zero OGAR coupling. lance-graph-ogar gains a path dep on
lance-graph-ontology (OGAR reads the OGIT hydration cache — the correct
direction).

Consumers move lance_graph_ontology::bridges::{UnifiedBridge, MedcareBridge,
HealthcarePort, OpenProjectBridge, OpenProjectPort, RedmineBridge,
RedminePort, *_CODEBOOK} -> lance_graph_ogar::bridges::*.

ontology: cargo build + 264 lib tests green (no ogar-vocab).
ogar: bridge unit + the 4 moved integration tests green (21) once the
contract ogar_codebook mirror is at 39 (PR #584, picked up on rebase).

Generated by [Claude Code](https://claude.com/claude-code)
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4e331674-1757-4401-ab6d-a06821084a6f

📥 Commits

Reviewing files that changed from the base of the PR and between d8bd3e6 and 17f7182.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • crates/lance-graph-ogar/Cargo.toml
  • crates/lance-graph-ogar/src/bridges/medcare_bridge.rs
  • crates/lance-graph-ogar/src/bridges/mod.rs
  • crates/lance-graph-ogar/src/bridges/openproject_bridge.rs
  • crates/lance-graph-ogar/src/bridges/redmine_bridge.rs
  • crates/lance-graph-ogar/src/bridges/unified.rs
  • crates/lance-graph-ogar/src/lib.rs
  • crates/lance-graph-ogar/tests/bridge_codebook_convergence.rs
  • crates/lance-graph-ogar/tests/bridge_scope_lock.rs
  • crates/lance-graph-ogar/tests/openproject_bridge_scope_lock.rs
  • crates/lance-graph-ogar/tests/redmine_bridge_scope_lock.rs
  • crates/lance-graph-ontology/Cargo.toml
  • crates/lance-graph-ontology/src/bridges/mod.rs
  • crates/lance-graph-ontology/src/lib.rs

📝 Walkthrough

Walkthrough

OGAR-driven port bridge types (UnifiedBridge, OpenProjectBridge, RedmineBridge, MedcareBridge) are relocated from lance-graph-ontology to lance-graph-ogar. The lance-graph-ontology crate drops its ogar-vocab git dependency and retains only legacy OGIT per-tenant bridges. All bridge module imports and integration test import paths are updated accordingly.

Changes

OGAR Bridge Relocation

Layer / File(s) Summary
Remove OGAR bridges and ogar-vocab from lance-graph-ontology
crates/lance-graph-ontology/Cargo.toml, crates/lance-graph-ontology/src/bridges/mod.rs, crates/lance-graph-ontology/src/lib.rs
Drops the ogar-vocab git dependency, removes all OGAR-driven bridge module declarations and re-exports (UnifiedBridge, MedcareBridge, OpenProjectBridge, RedmineBridge, codebook constants), and updates crate-level docs to direct OGAR port bridges to lance-graph-ogar.
Establish bridges module in lance-graph-ogar
crates/lance-graph-ogar/Cargo.toml, crates/lance-graph-ogar/src/bridges/mod.rs, crates/lance-graph-ogar/src/lib.rs
Adds a path dependency on lance-graph-ontology and a tempfile dev-dependency; introduces bridges/mod.rs that wires the unified submodule, per-port bridge submodules, re-exports all port/bridge types and UnifiedBridge, and provides deprecated shims for codebook constants; lib.rs exposes the new module at the crate root.
Update import paths in implementations and tests
crates/lance-graph-ogar/src/bridges/unified.rs, crates/lance-graph-ogar/src/bridges/medcare_bridge.rs, crates/lance-graph-ogar/src/bridges/openproject_bridge.rs, crates/lance-graph-ogar/src/bridges/redmine_bridge.rs, crates/lance-graph-ogar/tests/bridge_codebook_convergence.rs, crates/lance-graph-ogar/tests/bridge_scope_lock.rs, crates/lance-graph-ogar/tests/openproject_bridge_scope_lock.rs, crates/lance-graph-ogar/tests/redmine_bridge_scope_lock.rs
All internal bridge module use statements switch from crate::... paths to lance_graph_ontology::...; integration tests switch OGAR bridge imports from lance_graph_ontology::bridges to lance_graph_ogar::bridges.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • AdaWorldAPI/lance-graph#570: Directly overlaps — this PR moves the same UnifiedBridge/OpenProjectBridge/RedmineBridge types that #570 originally introduced in lance-graph-ontology, relocating them to lance-graph-ogar and removing ogar-vocab.
  • AdaWorldAPI/lance-graph#582: Added MedcareBridge = UnifiedBridge<HealthcarePort> and pinned ogar-vocab in lance-graph-ontology; this PR reverses that wiring by stripping those exports from lance-graph-ontology and re-establishing them in lance-graph-ogar.

Poem

🐇 Hop, hop, the bridges move today,
From ontology's arms to ogar's bay!
The ogar-vocab dep — farewell, goodbye,
Legacy OGIT bridges wave hi.
Import paths shimmer with a fresh new trace,
Each use now points to the right new place! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AdaWorldAPI AdaWorldAPI merged commit 5a1f187 into main Jun 21, 2026
4 of 5 checks passed
AdaWorldAPI added a commit that referenced this pull request Jun 21, 2026
…plit

#585 moved the OGAR-driven port bridges (UnifiedBridge harness +
MedcareBridge/OpenProjectBridge/RedmineBridge) from lance-graph-ontology
to lance-graph-ogar, but missed one consumer: the
lance-graph-consumer-conformance crate still did
`use lance_graph_ontology::bridges::MedcareBridge;` at lib.rs:93, which
now fails to compile (MedcareBridge no longer lives there).

Fix — the same transformation #585 applied to every other consumer:
- repoint the import to `lance_graph_ogar::bridges::MedcareBridge`
- add the `lance-graph-ogar` path dep to the crate's Cargo.toml

OgitBridge (lib.rs:222) and WoaBridge (lib.rs:331) are untouched — those
are OGIT-native legacy bridges that correctly stayed in
lance-graph-ontology. The callcenter `UnifiedBridge` (lib.rs:25) is an
unrelated type, also untouched.

No dependency cycle: conformance -> ogar -> ontology -> contract.
AdaWorldAPI added a commit that referenced this pull request Jun 21, 2026
…rift

fix(conformance): repoint MedcareBridge import after #585 OGIT/OGAR split
AdaWorldAPI pushed a commit that referenced this pull request Jun 21, 2026
Lockfile picks up the disambiguated lance-graph-contract (path + git)
from the rebased dependency graph. No source changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VGXeWN4XfVjteBVcVeuLo4
AdaWorldAPI pushed a commit that referenced this pull request Jun 22, 2026
… still on legacy OGIT after #585

Operator directive 2026-06-21: "if you don't use OGAR you're doing something
wrong" + "in the end planning (openproject) and ERP (odoo, YOU) should
become reusable ontologies so that the planner times can align with billable
hours". That's the OGAR value statement + the migration falsifier in one
sentence.

Detection (per the migration prompt from another session):
- woa-rs: imports `lance_graph_ontology::bridges::WoaBridge` + uses
  `callcenter::UnifiedBridge<WoaBridge>` (the OGIT-side NamespaceBridge form,
  NOT the moved OGAR-port form).
- smb-office-rs: imports `lance_graph_ontology::bridges::OgitBridge` + uses
  `callcenter::UnifiedBridge<OgitBridge>` (same legacy form).
- tikv / sea-orm / surrealdb: no lance-graph bridge imports (clean).

The detection prompt's Step 1 said "no-op, report and stop" because neither
consumer imports the moved types. Operator overrode that framing — the
no-op was the wrong terminal state. OGAR is the AR-shape / ClassView /
codebook / AST-rail surface (PR #585 + docs/OGAR_AR_SHAPE_ENDGAME.md); a
consumer that sits on legacy OGIT NamespaceBridge is architecturally wrong,
not "fine because nothing broke".

The concrete payoff (operator value statement): planner-side `TimeEntry`
(openproject) and ERP-side `account.move.line(qty=hours)` (odoo) and
`Stundenzettel` (woa, smb) must all resolve to ONE canonical OGAR class_id
or every cross-system integration carries a manual translation layer.
That's the integration cost OGAR was built to eliminate.

Filed:
- EPIPHANIES `E-OGAR-AR-MIGRATION-IS-SEVERITY`: full finding with the two
  affected consumers, target migration shape (UnifiedBridge<P: PortSpec>),
  OGAR-side blocker (WoaPort + SmbPort minting), and the operator value
  statement.
- ISSUES `OGAR-AR-MIGRATION-WOA-SMB-OPEN`: severity row with unblock
  action sequence (when OGAR PortSpecs land + Iron Rule allow-list update).

Blocker for the unblock: AdaWorldAPI/OGAR is NOT in this session's MCP
repo scope, so I cannot mint WoaPort / SmbPort here. The OGAR session
owns the unblock; this session's job is making sure the consumer-side
spec is waiting + the gap is documented across all affected boards so
no future session entrenches the OGIT-only path further.

Paired filings in the consumer repos (separate commits in those repos):
- woa-rs: new `.claude/board/OGAR-MIGRATION-GAP-2026-06-21.md` with the
  per-file migration target + Iron Rule 1 allow-list blocker noted.
- smb-office-rs: TECH_DEBT `TD-OGAR-CONSUMER-MIGRATION-1` (Open) +
  EPIPHANIES `E-PLANNER-TIMES-ALIGN-BILLABLE-HOURS` (the operator's value
  statement at consumer-side framing).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xzyc27Nx3f8WC5KzwfWfjx
AdaWorldAPI pushed a commit that referenced this pull request Jun 22, 2026
)

OGAR #93 (WoaPort + SmbPort) and #94 (OdooPort) landed new PortSpec impls
in ogar-vocab::ports. Add the matching bridge type aliases to
lance_graph_ogar::bridges so the WoA / SMB / Odoo consumers can migrate
onto OGAR the same way medcare did (lance-graph #585 + medcare #168) —
sibling of MedcareBridge / OpenProjectBridge / RedmineBridge.

- New: woa_bridge.rs (WoaBridge = UnifiedBridge<WoaPort>),
  smb_bridge.rs (SmbBridge = UnifiedBridge<SmbPort>),
  odoo_bridge.rs (OdooBridge = UnifiedBridge<OdooPort>). Each re-exports
  its port + a *_CODEBOOK shim over the port's *_ALIASES const (matching
  the openproject/redmine precedent — not invented; all three ports
  expose *_ALIASES) + co-located unit tests.
- mod.rs + lib.rs: declare + re-export the three aliases/ports.
- ogar-vocab bumped 19a6886 -> 08a9c979 (OGAR main, post #93/#94) so
  WoaPort/SmbPort/OdooPort resolve.
- Purely additive: no existing bridge, the UnifiedBridge harness, or
  lance-graph-ontology touched functionally. (Distinct from the legacy
  OGIT-side lance_graph_ontology::bridges::WoaBridge — different crate,
  no collision.)
- Incidental: cargo fmt reflowed 4 pre-existing files in this crate
  (medcare_bridge/openproject_bridge/unified.rs + bridge_codebook_
  convergence.rs) — import-order + chain-wrap only, content-identical.
  The crate is excluded from the main workspace so main CI never
  fmt-gated it; this makes it fmt-clean.

Verified: cargo build/test --manifest-path crates/lance-graph-ogar green
(45 lib + bridge integration suites, 0 failed); fmt --check clean.

Verified port facts against the 08a9c97 checkout:
  WoaPort  WorkOrder/woa: class_id("Stundenzettel")        == 0x0103
  SmbPort  SMB/smb:        class_id("Kunde")                == 0x0204
  OdooPort Odoo/odoo:      class_id("account.analytic.line")== 0x0103

Generated by [Claude Code](https://claude.com/claude-code)
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