Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.
Rust ai-nativedescription-logicsformal-verificationinfrastructure-as-codeisabelle-languageknowledge-graphleanlean4mcpmcp-serverontologyowlowl2reasoningrustshaclsparqltheorem-proving
feat(marketplace): ies-4.3.1 preset — frozen MIT baseline (#25)
FABIOTESSceea6a2ef5e7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c5fda5d7..421d8a8b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,7 @@ All notable changes to Open Ontologies are documented here.## [Unreleased]### Added+- **`ies-4.3.1` marketplace preset — frozen MIT baseline** (#25). New marketplace catalogue entry pointing at the archived `dstl/IES4` repo at tag `v4.3.1` (3 Mar 2025, MIT-licensed, last public release before the IES governance transition to DBT / IES-Org). Distinct from the existing `ies` preset (which tracks `IES-Org/ont-ies` main and shifts as upstream evolves) — use `ies-4.3.1` when you need a reproducible compliance baseline that won't drift. Source: 5,375-line Turtle artefact `ies4.ttl`, baseURI `http://ies.data.gov.uk/ontology/ies4`, the same namespace used by the existing `boro` and `ies4` enforce rule packs. Install via `onto_marketplace install ies-4.3.1`. Inline unit tests in `src/marketplace.rs` verify the URL pins to the `v4.3.1` tag (not `main`) and that the live `ies` and frozen `ies-4.3.1` presets coexist with distinct IDs and URLs.- **RRF (Reciprocal Rank Fusion) as an opt-in fusion strategy for `onto_align`**. New `OntoAlignInput.fusion` field accepts `"weighted_sum"` (default, unchanged behaviour with self-calibrating learned weights) or `"rrf"` (Cormack et al. SIGIR 2009 at k=60, validated for ontology alignment by Agent-OM at VLDB 2025). RRF is order-based rather than score-based, so it doesn't need feedback to bootstrap; it's a sensible cold-start choice when the `align_feedback` table is empty. The per-signal scores remain on each candidate's `signals` field so downstream `onto_align_feedback` calls keep working identically. New public method `AlignmentEngine::align_with_fusion(source, target, high, low, dry_run, fusion)`; the existing `align_with_thresholds(...)` and `align(...)` entry points are preserved as thin wrappers that pass `"weighted_sum"`. New `tests/align_rrf_test.rs` (5 tests) covering normalisation to [0, 1], per-signal preservation, low-threshold post-rerank filtering, weighted_sum back-compat, and weighted_sum/RRF top-pair agreement on perfect matches.- **`ies4` enforce rule pack** (#24). New built-in design-pattern pack for the [Information Exchange Standard](https://informationexchangestandard.org/), the UK cross-sector ontology framework custodied by Department for Business and Trade since March 2025 (canonical repo `IES-Org/ont-ies`). Three rules beyond the existing `boro` pack: (1) `ies4_particular_class_overlap` (severity: error) — a class cannot subclass both `ies:Particular` and `ies:ClassOfEntity`, as that violates the type-vs-token distinction foundational to IES4's 4D mereology; (2) `ies4_state_without_subject` (severity: warning) — a class subclassing `ies:State` must declare `ies:isStateOf` via owl:Restriction or have at least one instance using it (the state pattern is meaningless without a bearer); (3) `ies4_event_without_participant` (severity: warning) — a class subclassing `ies:Event` must have a participant pattern via `ies:isParticipantIn` / `ies:involvesParticipant` / `ies:hasParticipant` (events without participants are incomplete 4D models). Invoke via `onto_enforce` MCP tool or `enforce` CLI with `rule_pack = "ies4"`. Academic grounding: FOUST 7 paper "Comparing IES and BORO" (CEUR Vol-4176, JOWO 2024). New `tests/enforce_ies4_test.rs` (5 tests covering each rule's positive and negative cases, plus the instance-level participation accept path).diff --git a/src/marketplace.rs b/src/marketplace.rsindex f4d4afa7..854944c0 100644--- a/src/marketplace.rs+++ b/src/marketplace.rs@@ -63,6 +63,14 @@ pub static CATALOGUE: &[MarketplaceEntry] = &[url: "https://raw.githubusercontent.com/IES-Org/ont-ies/main/docs/specification/ies-common.ttl",format: RdfFormat::Turtle,},+ MarketplaceEntry {+ id: "ies-4.3.1",+ name: "IES4 v4.3.1 (frozen MIT baseline)",+ description: "Last public MIT-licensed snapshot of IES4 from the archived dstl/IES4 repo (tag v4.3.1, released 3 Mar 2025). Use as a reproducible compliance baseline when you need a frozen reference that won't shift with upstream changes. 4.3.2+ development continues in the IES-Org working group — use the `ies` preset for live work.",+ domain: "upper-ontology",+ url: "https://raw.githubusercontent.com/dstl/IES4/v4.3.1/IES%20Specification%20Docs/ies4.ttl",+ format: RdfFormat::Turtle,+ },MarketplaceEntry {id: "bfo",name: "BFO (Basic Formal Ontology)",@@ -327,3 +335,41 @@ pub fn format_name(fmt: RdfFormat) -> &'static str {_ => "unknown",}}++#[cfg(test)]+mod tests {+ use super::*;++ fn find(id: &str) -> Option<&MarketplaceEntry> {+ CATALOGUE.iter().find(|e| e.id == id)+ }++ #[test]+ fn ies_4_3_1_preset_exists_and_targets_archived_dstl_v4_3_1_tag() {+ // Per #25 — `ies-4.3.1` is the frozen MIT-licensed baseline. Must+ // point at the dstl/IES4 archived repo at tag `v4.3.1`, NOT main+ // or any other branch (the whole point of the preset is reproducible+ // pinning).+ let entry = find("ies-4.3.1").expect(+ "ies-4.3.1 marketplace preset missing — was the entry removed by mistake?",+ );+ assert!(entry.url.contains("dstl/IES4"), "url should reference the archived dstl/IES4 repo; got {}", entry.url);+ assert!(entry.url.contains("/v4.3.1/"), "url MUST pin to tag v4.3.1; got {}", entry.url);+ assert!(entry.url.ends_with("ies4.ttl"), "expected Turtle artefact; got {}", entry.url);+ assert!(matches!(entry.format, RdfFormat::Turtle));+ assert_eq!(entry.domain, "upper-ontology");+ }++ #[test]+ fn ies_4_3_1_does_not_collide_with_live_ies_preset() {+ // The live `ies` preset (pointing at IES-Org main) and the frozen+ // `ies-4.3.1` preset must coexist with distinct IDs and URLs —+ // they serve different purposes.+ let live = find("ies").expect("live `ies` preset missing");+ let frozen = find("ies-4.3.1").expect("frozen `ies-4.3.1` preset missing");+ assert_ne!(live.id, frozen.id);+ assert_ne!(live.url, frozen.url);+ assert!(live.url.contains("IES-Org"), "live preset should point at IES-Org");+ assert!(frozen.url.contains("dstl/IES4"), "frozen preset should point at archived dstl/IES4");+ }+}