From b348c71994d4fb5f54a695bb87f4d8df1f7a10ca Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 14:49:16 +0800 Subject: [PATCH 01/11] fix(deep_causality_num): Fixed miri test config Signed-off-by: Marvin Hansen --- deep_causality_num/tests/algebra/field_real_f64_tests.rs | 4 ---- deep_causality_num/tests/algebra/mod.rs | 8 ++++++++ deep_causality_num/tests/float_double/mod.rs | 8 ++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/deep_causality_num/tests/algebra/field_real_f64_tests.rs b/deep_causality_num/tests/algebra/field_real_f64_tests.rs index 5e56eb368..6b9e170fc 100644 --- a/deep_causality_num/tests/algebra/field_real_f64_tests.rs +++ b/deep_causality_num/tests/algebra/field_real_f64_tests.rs @@ -88,10 +88,6 @@ fn test_log10() { } #[test] -// Disabled under Miri: software-emulated floats produce different last-bit -// results for transcendental ops, so exact equality cannot hold. The test -// itself is correct and runs under normal CI. -#[cfg_attr(miri, ignore)] fn test_powf() { let x = 2.0_f64; let n = 3.0_f64; diff --git a/deep_causality_num/tests/algebra/mod.rs b/deep_causality_num/tests/algebra/mod.rs index ea097938b..75fada3fb 100644 --- a/deep_causality_num/tests/algebra/mod.rs +++ b/deep_causality_num/tests/algebra/mod.rs @@ -6,8 +6,16 @@ mod algebra_tests; #[cfg(test)] mod domain_euclidean_tests; +// Disabled under Miri: software-emulated floats produce different last-bit +// results for transcendental ops, so exact equality cannot hold. The test +// itself is correct and runs under normal CI. +#[cfg_attr(miri, ignore)] #[cfg(test)] mod field_real_f32_tests; +// Disabled under Miri: software-emulated floats produce different last-bit +// results for transcendental ops, so exact equality cannot hold. The test +// itself is correct and runs under normal CI. +#[cfg_attr(miri, ignore)] #[cfg(test)] mod field_real_f64_tests; #[cfg(test)] diff --git a/deep_causality_num/tests/float_double/mod.rs b/deep_causality_num/tests/float_double/mod.rs index b8f5314e1..b9096d0a2 100644 --- a/deep_causality_num/tests/float_double/mod.rs +++ b/deep_causality_num/tests/float_double/mod.rs @@ -14,6 +14,10 @@ mod double_attributes_tests; mod double_comparison_tests; #[cfg(test)] mod double_display_tests; +// Disabled under Miri: software-emulated floats produce different last-bit +// results for transcendental ops, so exact equality cannot hold. The test +// itself is correct and runs under normal CI. +#[cfg_attr(miri, ignore)] #[cfg(test)] mod double_erf_tests; #[cfg(test)] @@ -26,5 +30,9 @@ mod double_num_traits_tests; mod double_ops_tests; #[cfg(test)] mod double_traits_tests; +// Disabled under Miri: software-emulated floats produce different last-bit +// results for transcendental ops, so exact equality cannot hold. The test +// itself is correct and runs under normal CI. +#[cfg_attr(miri, ignore)] #[cfg(test)] mod double_transcendental_tests; From 5f4ecaf6b255d7b7314cb04d0e9da1541101e018 Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 14:56:10 +0800 Subject: [PATCH 02/11] fix(deep_causality_uncertain): Fixed miri test config Signed-off-by: Marvin Hansen --- deep_causality_uncertain/tests/types/sampler/mod.rs | 4 ++++ .../tests/types/sampler/sequential_sampler_tests.rs | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deep_causality_uncertain/tests/types/sampler/mod.rs b/deep_causality_uncertain/tests/types/sampler/mod.rs index 25107e3bb..21ab0001a 100644 --- a/deep_causality_uncertain/tests/types/sampler/mod.rs +++ b/deep_causality_uncertain/tests/types/sampler/mod.rs @@ -3,8 +3,12 @@ * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved. */ #[cfg(test)] +// Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1) +#[cfg(all(test, not(miri)))] mod qmc_sampler_tests; #[cfg(test)] mod sampler_seed_tests; #[cfg(test)] +// Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1) +#[cfg(all(test, not(miri)))] mod sequential_sampler_tests; diff --git a/deep_causality_uncertain/tests/types/sampler/sequential_sampler_tests.rs b/deep_causality_uncertain/tests/types/sampler/sequential_sampler_tests.rs index 1032df2ac..cd20b522c 100644 --- a/deep_causality_uncertain/tests/types/sampler/sequential_sampler_tests.rs +++ b/deep_causality_uncertain/tests/types/sampler/sequential_sampler_tests.rs @@ -363,10 +363,6 @@ fn test_logical_op_errors() { } #[test] -// Disabled under Miri: the sampler evaluates `x.powi(2)` on f64, which under -// Miri's soft-float emulation drifts by ~1 ULP (got 99.99999999999996 vs -// 100.0). Test is correct under normal CI. -#[cfg_attr(miri, ignore)] fn test_function_op_f64() { let sampler = SequentialSampler; let operand = create_node(UncertainNodeContent::Value(SampledValue::Float(10.0f64))); From 8338d002e900aff00fdd9571c3f0648449be8234 Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 14:57:48 +0800 Subject: [PATCH 03/11] fix(deep_causality_rand): Fixed miri test config Signed-off-by: Marvin Hansen --- deep_causality_rand/tests/utils/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deep_causality_rand/tests/utils/mod.rs b/deep_causality_rand/tests/utils/mod.rs index acb6fe73e..3a2c7dbdc 100644 --- a/deep_causality_rand/tests/utils/mod.rs +++ b/deep_causality_rand/tests/utils/mod.rs @@ -3,6 +3,10 @@ * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved. */ #[cfg(test)] +// Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1) +#[cfg(all(test, not(miri)))] mod inverse_cdf_tests; #[cfg(test)] +// Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1) +#[cfg(all(test, not(miri)))] mod sobol_tests; From fca1d108caf44a15a35796746b375b3c6b447c9c Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 15:03:29 +0800 Subject: [PATCH 04/11] fix(deep_causality_num): Fixed miri test config Signed-off-by: Marvin Hansen --- deep_causality_num/tests/algebra/mod.rs | 4 ++-- deep_causality_num/tests/float_double/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deep_causality_num/tests/algebra/mod.rs b/deep_causality_num/tests/algebra/mod.rs index 75fada3fb..8cdbafde7 100644 --- a/deep_causality_num/tests/algebra/mod.rs +++ b/deep_causality_num/tests/algebra/mod.rs @@ -9,13 +9,13 @@ mod domain_euclidean_tests; // Disabled under Miri: software-emulated floats produce different last-bit // results for transcendental ops, so exact equality cannot hold. The test // itself is correct and runs under normal CI. -#[cfg_attr(miri, ignore)] +#[cfg(not(miri))] #[cfg(test)] mod field_real_f32_tests; // Disabled under Miri: software-emulated floats produce different last-bit // results for transcendental ops, so exact equality cannot hold. The test // itself is correct and runs under normal CI. -#[cfg_attr(miri, ignore)] +#[cfg(not(miri))] #[cfg(test)] mod field_real_f64_tests; #[cfg(test)] diff --git a/deep_causality_num/tests/float_double/mod.rs b/deep_causality_num/tests/float_double/mod.rs index b9096d0a2..3cb2ac880 100644 --- a/deep_causality_num/tests/float_double/mod.rs +++ b/deep_causality_num/tests/float_double/mod.rs @@ -17,8 +17,8 @@ mod double_display_tests; // Disabled under Miri: software-emulated floats produce different last-bit // results for transcendental ops, so exact equality cannot hold. The test // itself is correct and runs under normal CI. -#[cfg_attr(miri, ignore)] #[cfg(test)] +#[cfg(not(miri))] mod double_erf_tests; #[cfg(test)] mod double_float_tests; @@ -33,6 +33,6 @@ mod double_traits_tests; // Disabled under Miri: software-emulated floats produce different last-bit // results for transcendental ops, so exact equality cannot hold. The test // itself is correct and runs under normal CI. -#[cfg_attr(miri, ignore)] #[cfg(test)] +#[cfg(not(miri))] mod double_transcendental_tests; From 2f2f6f93c5ff1b8f654c9efff0133ad4070488e3 Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 15:05:27 +0800 Subject: [PATCH 05/11] fix(deep_causality_rand): Fixed miri test config Signed-off-by: Marvin Hansen --- deep_causality_rand/tests/utils/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deep_causality_rand/tests/utils/mod.rs b/deep_causality_rand/tests/utils/mod.rs index 3a2c7dbdc..07468be43 100644 --- a/deep_causality_rand/tests/utils/mod.rs +++ b/deep_causality_rand/tests/utils/mod.rs @@ -4,9 +4,9 @@ */ #[cfg(test)] // Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1) -#[cfg(all(test, not(miri)))] +#[cfg(not(miri))] mod inverse_cdf_tests; #[cfg(test)] // Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1) -#[cfg(all(test, not(miri)))] +#[cfg(not(miri))] mod sobol_tests; From a454743cdbbf3dc888a0eaa477addee92490658d Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 15:07:30 +0800 Subject: [PATCH 06/11] fix(deep_causality_uncertain): Fixed miri test config Signed-off-by: Marvin Hansen --- deep_causality_uncertain/tests/types/sampler/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deep_causality_uncertain/tests/types/sampler/mod.rs b/deep_causality_uncertain/tests/types/sampler/mod.rs index 21ab0001a..19a9501d8 100644 --- a/deep_causality_uncertain/tests/types/sampler/mod.rs +++ b/deep_causality_uncertain/tests/types/sampler/mod.rs @@ -4,11 +4,11 @@ */ #[cfg(test)] // Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1) -#[cfg(all(test, not(miri)))] +#[cfg(not(miri))] mod qmc_sampler_tests; #[cfg(test)] mod sampler_seed_tests; #[cfg(test)] // Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1) -#[cfg(all(test, not(miri)))] +#[cfg(not(miri))] mod sequential_sampler_tests; From 2847420ca5a2155efba369a6e7b8d28488800310 Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 15:13:49 +0800 Subject: [PATCH 07/11] fix(deep_causality_rand): Fixed miri test config Signed-off-by: Marvin Hansen --- .../tests/types/dist/normal/standard_normal_tests.rs | 2 ++ deep_causality_rand/tests/types/dist/uniform/mod.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/deep_causality_rand/tests/types/dist/normal/standard_normal_tests.rs b/deep_causality_rand/tests/types/dist/normal/standard_normal_tests.rs index ad88ae294..f451f9ea2 100644 --- a/deep_causality_rand/tests/types/dist/normal/standard_normal_tests.rs +++ b/deep_causality_rand/tests/types/dist/normal/standard_normal_tests.rs @@ -8,6 +8,7 @@ use deep_causality_rand::types::distr::normal::standard_normal::StandardNormal; macro_rules! standard_normal_tests { ($float_type:ty, $tolerance:expr) => { #[test] + #[cfg_attr(miri, ignore)] fn test_mean_and_std_dev() { let mut rng = rng(); let distr = StandardNormal; @@ -91,6 +92,7 @@ mod f106_tests { use deep_causality_rand::rng; #[test] + #[cfg_attr(miri, ignore)] fn test_mean_and_std_dev() { let mut rng = rng(); let distr = StandardNormal; diff --git a/deep_causality_rand/tests/types/dist/uniform/mod.rs b/deep_causality_rand/tests/types/dist/uniform/mod.rs index 4114c9ebf..e29064f55 100644 --- a/deep_causality_rand/tests/types/dist/uniform/mod.rs +++ b/deep_causality_rand/tests/types/dist/uniform/mod.rs @@ -4,6 +4,9 @@ */ #[cfg(test)] +#[cfg(not(miri))] + mod standard_uniform_tests; #[cfg(test)] +#[cfg(not(miri))] mod uniform_tests; From 927c18d20e077541478b6d97359f7cd188951996 Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 15:13:57 +0800 Subject: [PATCH 08/11] fix(deep_causality_num): Fixed miri test config Signed-off-by: Marvin Hansen --- deep_causality_num/tests/algebra/mod.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/deep_causality_num/tests/algebra/mod.rs b/deep_causality_num/tests/algebra/mod.rs index 8cdbafde7..5e4f1764a 100644 --- a/deep_causality_num/tests/algebra/mod.rs +++ b/deep_causality_num/tests/algebra/mod.rs @@ -9,14 +9,18 @@ mod domain_euclidean_tests; // Disabled under Miri: software-emulated floats produce different last-bit // results for transcendental ops, so exact equality cannot hold. The test // itself is correct and runs under normal CI. -#[cfg(not(miri))] #[cfg(test)] +#[cfg(not(miri))] mod field_real_f32_tests; // Disabled under Miri: software-emulated floats produce different last-bit // results for transcendental ops, so exact equality cannot hold. The test // itself is correct and runs under normal CI. -#[cfg(not(miri))] #[cfg(test)] -mod field_real_f64_tests; +#[cfg(not(miri))] +pub(crate) mod field_real_f64_tests; +// Disabled under Miri: software-emulated floats produce different last-bit +// results for transcendental ops, so exact equality cannot hold. The test +// itself is correct and runs under normal CI. #[cfg(test)] +#[cfg(not(miri))] mod real_tests; From 5bbba9985f3d2f6c248676057d23b5a3240451d5 Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 15:18:39 +0800 Subject: [PATCH 09/11] fix(deep_causality_uncertain): Fixed miri test config Signed-off-by: Marvin Hansen --- .../tests/types/uncertain/mod.rs | 19 +++++++++++++------ .../tests/types/uncertain_maybe/mod.rs | 10 +++++++--- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/deep_causality_uncertain/tests/types/uncertain/mod.rs b/deep_causality_uncertain/tests/types/uncertain/mod.rs index 663d88d9d..299a6b964 100644 --- a/deep_causality_uncertain/tests/types/uncertain/mod.rs +++ b/deep_causality_uncertain/tests/types/uncertain/mod.rs @@ -6,17 +6,24 @@ // a subprocess via `posix_spawn`, and Miri does not implement the // `posix_spawn*` libc shims, so the tests abort. They are correct and run // under normal CI. -#[cfg(all(test, not(miri)))] +#[cfg(test)] +#[cfg(not(miri))] mod uncertain_arithmetic_tests; -#[cfg(all(test, not(miri)))] +#[cfg(test)] +#[cfg(not(miri))] mod uncertain_comparison_tests; -#[cfg(all(test, not(miri)))] +#[cfg(test)] +#[cfg(not(miri))] mod uncertain_default; -#[cfg(all(test, not(miri)))] +#[cfg(test)] +#[cfg(not(miri))] mod uncertain_logic_tests; -#[cfg(all(test, not(miri)))] +#[cfg(test)] +#[cfg(not(miri))] mod uncertain_sampling_tests; -#[cfg(all(test, not(miri)))] +#[cfg(test)] +#[cfg(not(miri))] mod uncertain_statistics_tests; #[cfg(test)] +#[cfg(not(miri))] mod uncertain_tests; diff --git a/deep_causality_uncertain/tests/types/uncertain_maybe/mod.rs b/deep_causality_uncertain/tests/types/uncertain_maybe/mod.rs index 3b3a041f5..9d6d8b795 100644 --- a/deep_causality_uncertain/tests/types/uncertain_maybe/mod.rs +++ b/deep_causality_uncertain/tests/types/uncertain_maybe/mod.rs @@ -7,12 +7,16 @@ // not implement the `posix_spawn*` libc shims, so the tests abort. They are // correct and run under normal CI. #[cfg(test)] +#[cfg(not(miri))] mod uncertain_maybe_bool_tests; -#[cfg(all(test, not(miri)))] +#[cfg(test)] +#[cfg(not(miri))] mod uncertain_maybe_f64_tests; -#[cfg(all(test, not(miri)))] +#[cfg(test)] +#[cfg(not(miri))] mod uncertain_maybe_f64_arithmetic_tests; -#[cfg(all(test, not(miri)))] +#[cfg(test)] +#[cfg(not(miri))] mod uncertain_maybe_f106_tests; From b602a898fcbfb9f4f7a6325a824bc5675d77bde7 Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 15:22:48 +0800 Subject: [PATCH 10/11] fix(deep_causality_num): Fixed miri test config Signed-off-by: Marvin Hansen --- deep_causality_num/tests/algebra/mod.rs | 5 +++++ deep_causality_num/tests/float/mod.rs | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/deep_causality_num/tests/algebra/mod.rs b/deep_causality_num/tests/algebra/mod.rs index 5e4f1764a..914cbbfbb 100644 --- a/deep_causality_num/tests/algebra/mod.rs +++ b/deep_causality_num/tests/algebra/mod.rs @@ -2,7 +2,12 @@ * SPDX-License-Identifier: MIT * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved. */ + +// Disabled under Miri: software-emulated floats produce different last-bit +// results for transcendental ops, so exact equality cannot hold. The test +// itself is correct and runs under normal CI. #[cfg(test)] +#[cfg(not(miri))] mod algebra_tests; #[cfg(test)] mod domain_euclidean_tests; diff --git a/deep_causality_num/tests/float/mod.rs b/deep_causality_num/tests/float/mod.rs index bdfe9142f..86ddd6ff1 100644 --- a/deep_causality_num/tests/float/mod.rs +++ b/deep_causality_num/tests/float/mod.rs @@ -2,12 +2,16 @@ * SPDX-License-Identifier: MIT * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved. */ + +// Disabled under Miri: software-emulated floats produce different last-bit +// results for transcendental ops, so exact equality cannot hold. The test +// itself is correct and runs under normal CI. #[cfg(test)] +#[cfg(not(miri))] mod float_32_tests; -// Skipped wholesale under Miri: this module exercises f64 floating-point -// behavior, much of it via exact `assert_eq!` on transcendental results -// (sin/cos/cbrt/atan2/...). Miri's soft-float emulation differs from hardware -// in the last bit, so these comparisons spuriously fail one by one. The tests -// are correct and pass under normal CI. -#[cfg(all(test, not(miri)))] +// Disabled under Miri: software-emulated floats produce different last-bit +// results for transcendental ops, so exact equality cannot hold. The test +// itself is correct and runs under normal CI. +#[cfg(test)] +#[cfg(not(miri))] mod float_64_tests; From aee75a8e123488f0c7a833b2fcf99048576724ec Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Mon, 22 Jun 2026 15:24:32 +0800 Subject: [PATCH 11/11] fix(deep_causality_rand): Format and linting Signed-off-by: Marvin Hansen --- deep_causality_physics/tests/BUILD.bazel | 2 -- deep_causality_rand/tests/types/dist/uniform/mod.rs | 1 - 2 files changed, 3 deletions(-) diff --git a/deep_causality_physics/tests/BUILD.bazel b/deep_causality_physics/tests/BUILD.bazel index f6435f845..ff237d0db 100644 --- a/deep_causality_physics/tests/BUILD.bazel +++ b/deep_causality_physics/tests/BUILD.bazel @@ -371,8 +371,6 @@ rust_test_suite( ], ) - - rust_test_suite( name = "theories", srcs = glob([ diff --git a/deep_causality_rand/tests/types/dist/uniform/mod.rs b/deep_causality_rand/tests/types/dist/uniform/mod.rs index e29064f55..ff256c74a 100644 --- a/deep_causality_rand/tests/types/dist/uniform/mod.rs +++ b/deep_causality_rand/tests/types/dist/uniform/mod.rs @@ -5,7 +5,6 @@ #[cfg(test)] #[cfg(not(miri))] - mod standard_uniform_tests; #[cfg(test)] #[cfg(not(miri))]