From 35468004e6b41472dba1b1e8c1da37dd7612e659 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 3 Jul 2026 07:48:31 +0300 Subject: [PATCH] test(core): ignore ribbon_groups microbenchmark by default The once_lock_eliminates_allocation_after_first_call test from PR #257 is a timing microbenchmark that Box::leaks ~400k strings by design to defeat allocator reuse. Mark it #[ignore] so it stays out of the default suite; cache correctness is already covered by the pointer-identity test. Co-Authored-By: Claude Opus 4.8 --- crates/ocs_plugin_api/src/ribbon.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/ocs_plugin_api/src/ribbon.rs b/crates/ocs_plugin_api/src/ribbon.rs index b5f6ca11..afe33251 100644 --- a/crates/ocs_plugin_api/src/ribbon.rs +++ b/crates/ocs_plugin_api/src/ribbon.rs @@ -145,7 +145,13 @@ pub trait CadModule: Send + Sync { mod tests { use super::*; + // Timing microbenchmark, not a correctness check: it intentionally + // `Box::leak`s ~400k strings to defeat the allocator's reuse, so keep it out + // of the default suite. Run manually with `cargo test -- --ignored`. + // Correctness of the cache is covered by + // `once_lock_produces_identical_pointer_on_subsequent_calls`. #[test] + #[ignore = "microbenchmark: leaks strings by design; run with --ignored"] fn once_lock_eliminates_allocation_after_first_call() { // Helper to build a realistic module tree (2 groups, ~20 items) // Benchmark builds this manually for a clean before/after comparison.