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
4 changes: 2 additions & 2 deletions crates/od-ontology/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ serde_json = "1"
# COMMENT. The bump crosses #95 (medcare, additive) + #96 (convergence-pin
# test) + #97 + #98 (reverse map); OdooPort + the 9 ODOO_ALIASES are
# byte-identical across the whole range (re-verified).
ogar-vocab = { git = "https://github.com/AdaWorldAPI/OGAR", rev = "ac4b4162bb6ba8d590be3b2b37a07a44f7135d6c", optional = true }
ogar-adapter-surrealql = { git = "https://github.com/AdaWorldAPI/OGAR", rev = "ac4b4162bb6ba8d590be3b2b37a07a44f7135d6c", optional = true }
ogar-vocab = { git = "https://github.com/AdaWorldAPI/OGAR", rev = "597ecb120fc8842c5b8aa552be506d2462151cec", optional = true }
ogar-adapter-surrealql = { git = "https://github.com/AdaWorldAPI/OGAR", rev = "597ecb120fc8842c5b8aa552be506d2462151cec", optional = true }

[features]
# Opt-in CLI (mirrors openproject-nexgen-rs#31's `--features cli` discipline).
Expand Down
40 changes: 15 additions & 25 deletions crates/od-ontology/tests/alignment_pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,40 +442,30 @@ fn seeded_classes_have_compatible_ogar_identity() {
// (covers six basins: BillingCore + SMBAccounting + ProductCatalog +
// SmbFoundryCustomer + SmbFoundryInvoice + HRFoundation).
// - OGAR's `OdooPort` aliases = "which canonical OGAR class_id"
// (currently covers the **commerce arm** only — `0x02XX` ids:
// COMMERCIAL_DOCUMENT, COMMERCIAL_LINE_ITEM, TAX_POLICY,
// BILLING_PARTY, PAYMENT_RECORD, CURRENCY_POLICY, plus the
// cross-arm BILLABLE_WORK_ENTRY).
// (covers all six basins as of OGAR #127: commerce 0x02XX +
// HR 0x0DXX + the cross-arm BILLABLE_WORK_ENTRY bridge).
//
// The intersection MUST agree (every commerce-arm seed row has an OdooPort
// classid); the difference (product / accounting / HR seed rows without an
// OdooPort alias) IS the surface for a future OdooPort PR and is reported
// as informational rather than asserted.
// After OGAR #111 + #126 + #127 the two axes are in full agreement: every
// seeded class has a canonical OGAR classid, and the hard assertion below
// checks that strictly.
// After OGAR #111 + #126 + #127 (lance-graph #597 + #606 + #608), the
// cross-axis identity gap surfaced by this crate's PR #14 is fully
// closed: every seeded class has a canonical OGAR classid. The hard
// assertion now covers ALL 15 seeded classes (was commerce-arm 3 only
// pre-#111). Re-introducing a un-mapped class fires this test
// immediately.
let mut without_classid: Vec<&str> = Vec::new();
for row in ODOO_SEED {
if OdooPort::class_id(row.odoo_class).is_none() {
without_classid.push(row.odoo_class);
}
}
without_classid.sort_unstable();
eprintln!(
"informational: {} of {} seeded classes have no canonical OGAR \
classid yet (= candidates for the next OdooPort PR — product / \
accounting / HR basins): {:?}",
without_classid.len(),
ODOO_SEED.len(),
assert!(
without_classid.is_empty(),
"the cross-axis identity gap was closed by OGAR #111 + #126 + #127 — \
re-introducing un-mapped seeded class(es) regresses the closure: {:?}",
without_classid
);

// HARD assertion: the commerce-arm intersection. These three are in BOTH
// surfaces today; dropping any of them from `OdooPort::aliases()` would
// break the cross-axis identity.
let commerce_arm: &[&str] = &["res.partner", "account.move", "account.move.line"];
for cls in commerce_arm {
assert!(
OdooPort::class_id(cls).is_some(),
"commerce-arm seeded class `{cls}` has no canonical OGAR classid; \
OdooPort and the alignment table have drifted apart"
);
}
}