Skip to content

Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.

ci: fix a parallel-test race and three line citations this branch moved

FABIOTESSefd37bf44dea
diff --git a/python/src/open_ontologies_lite/horn/reason.py b/python/src/open_ontologies_lite/horn/reason.py
index cceabbdd..046d7aa6 100644
--- a/python/src/open_ontologies_lite/horn/reason.py
+++ b/python/src/open_ontologies_lite/horn/reason.py
@@ -245,7 +245,7 @@ def _facts(store, graphs) -> tuple[list[Fact], list[str]]:
The default is the DEFAULT GRAPH ALONE, which is where `OntologyEngine.load()`
puts everything, so this package's own users lose nothing by it. The Rust
- engine flattens every named graph here (`src/reason.rs:2170`,
+ engine flattens every named graph here (`src/reason.rs:2178`,
`graph.all_triples()`), which is the defect above: a store holding a prior
materialisation turns derived triples into assertions.
"""
diff --git a/python/tests/test_horn_differential.py b/python/tests/test_horn_differential.py
index ef1374af..ac033f15 100644
--- a/python/tests/test_horn_differential.py
+++ b/python/tests/test_horn_differential.py
@@ -26,7 +26,7 @@ WHAT IS COMPARED, AND WHAT IS NOT.
The assertion is SET EQUALITY OF DERIVED TRIPLES against the Rust `run_horn`, over
the same `builtin_rules.tsv`. Byte identity of the two `horn.tsv` files is NOT a
goal and must not be asserted: the Rust emitter sorts interned `u32` triples
-(`src/reason.rs:2240`, `all.sort_unstable()` over `Vec<(u32,u32,u32)>`), so its
+(`src/reason.rs:2248`, `all.sort_unstable()` over `Vec<(u32,u32,u32)>`), so its
line order is first-appearance order in the store, not lexicographic order.
Reproducing it from Python would mean reimplementing the interner and betting on
identical store-iteration order across two bindings, to buy nothing the set
diff --git a/python/tests/test_horn_fixpoint_and_scope.py b/python/tests/test_horn_fixpoint_and_scope.py
index 96f7d8b7..cd762eb0 100644
--- a/python/tests/test_horn_fixpoint_and_scope.py
+++ b/python/tests/test_horn_fixpoint_and_scope.py
@@ -19,7 +19,7 @@ graph through two interpreters with different `PYTHONHASHSEED` and demands
identical bytes.
SCOPE. This is the one that matters most. The Rust `run_horn` flattens every named
-graph into `asserted.tsv` (`src/reason.rs:2170`, `graph.all_triples()`), so a store
+graph into `asserted.tsv` (`src/reason.rs:2178`, `graph.all_triples()`), so a store
that holds a previous materialisation in the inferred graph turns derived triples
into ASSERTIONS. The checker cannot detect it: the soundness theorem is
conditional on the assertions, and it is TOLD what they are. The result is a green
diff --git a/tests/verdict_vocabulary_test.rs b/tests/verdict_vocabulary_test.rs
index 3e087c5c..0ad9a9e0 100644
--- a/tests/verdict_vocabulary_test.rs
+++ b/tests/verdict_vocabulary_test.rs
@@ -40,9 +40,16 @@ use open_ontologies::verdict::{
/// entirely, which this suite discovered by failing. A script written here
/// runs the same everywhere and covers the non-zero codes too.
fn exits_with(code: i32) -> PathBuf {
+ // One file per CALL, not one per exit code. `cargo test` runs these in
+ // parallel threads, and a fixed path means one thread rewrites the script
+ // while another is executing it. Linux answers that with ETXTBSY ("Text
+ // file busy") and macOS does not, so the shared path passed locally and
+ // failed only on ubuntu, in the one CI leg that got far enough to run it.
+ static NEXT: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
+ let n = NEXT.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
let dir = std::env::temp_dir().join("oo-verdict-vocabulary");
std::fs::create_dir_all(&dir).unwrap();
- let p = dir.join(format!("exit{code}.sh"));
+ let p = dir.join(format!("exit{code}-{}-{n}.sh", std::process::id()));
std::fs::write(&p, format!("#!/bin/sh\nexit {code}\n")).unwrap();
#[cfg(unix)]
{