From 3212a8f0efeaad4b6ea0c14497a17230c96260f1 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Wed, 29 Apr 2026 09:59:31 +0100 Subject: [PATCH 1/5] Apply suggested fix to benches/workloads.rs from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- benches/workloads.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/benches/workloads.rs b/benches/workloads.rs index faae7da..11068ee 100644 --- a/benches/workloads.rs +++ b/benches/workloads.rs @@ -214,7 +214,16 @@ fn bench_comprehensive(c: &mut Criterion) { policy_id, &mut cache, cfg, - |key| Arc::clone(&value_pool[key as usize]), + |key| { + let idx = key as usize; + Arc::clone(value_pool.get(idx).unwrap_or_else(|| { + panic!( + "workload key {} out of range for value_pool (len {}, expected < UNIVERSE)", + key, + value_pool.len() + ) + })) + }, ); total += start.elapsed(); } From e21c89cf61c7c02b06ebad8a5c19defcdb0c0cb0 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Wed, 29 Apr 2026 09:59:32 +0100 Subject: [PATCH 2/5] Apply suggested fix to benches/workloads.rs from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- benches/workloads.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/benches/workloads.rs b/benches/workloads.rs index 11068ee..904e9e3 100644 --- a/benches/workloads.rs +++ b/benches/workloads.rs @@ -99,7 +99,13 @@ fn bench_hit_rates(c: &mut Criterion) { &mut generator, OPS, &mut op_model, - |k| Arc::clone(&value_pool[k as usize]), + |k| { + Arc::clone( + value_pool + .get(k as usize) + .expect("generator produced key outside configured UNIVERSE"), + ) + }, ); total += start.elapsed(); } From d20d0586cfae7197908f241a7c03ccc9b9994ed3 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Wed, 29 Apr 2026 09:59:32 +0100 Subject: [PATCH 3/5] Apply suggested fix to benches/workloads.rs from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- benches/workloads.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/benches/workloads.rs b/benches/workloads.rs index 904e9e3..77c0598 100644 --- a/benches/workloads.rs +++ b/benches/workloads.rs @@ -46,8 +46,6 @@ const CAPACITY: usize = 4096; const UNIVERSE: u64 = 16_384; const OPS: usize = 200_000; const SEED: u64 = 42; -/// Read-through probability used by the operation model (1.0 = always read-through). -const READ_THROUGH_RATIO: f64 = 1.0; fn make_generator(workload: Workload) -> WorkloadGenerator { WorkloadSpec { From 4e4a5cc01476c84a6c6db0f29c382bdff779f34a Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Tue, 14 Jul 2026 20:07:18 +0100 Subject: [PATCH 4/5] fix: restore workload read-through ratio --- Cargo.lock | 8 ++++---- benches/workloads.rs | 2 ++ src/ds/intrusive_list.rs | 10 ++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4c25400..f41a5b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,9 +77,9 @@ checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anyhow" -version = "1.0.101" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" +checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" [[package]] name = "arbitrary" @@ -351,9 +351,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.18" +version = "0.9.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" dependencies = [ "crossbeam-utils", ] diff --git a/benches/workloads.rs b/benches/workloads.rs index 77c0598..904e9e3 100644 --- a/benches/workloads.rs +++ b/benches/workloads.rs @@ -46,6 +46,8 @@ const CAPACITY: usize = 4096; const UNIVERSE: u64 = 16_384; const OPS: usize = 200_000; const SEED: u64 = 42; +/// Read-through probability used by the operation model (1.0 = always read-through). +const READ_THROUGH_RATIO: f64 = 1.0; fn make_generator(workload: Workload) -> WorkloadGenerator { WorkloadSpec { diff --git a/src/ds/intrusive_list.rs b/src/ds/intrusive_list.rs index a04cdc1..6e79008 100644 --- a/src/ds/intrusive_list.rs +++ b/src/ds/intrusive_list.rs @@ -871,11 +871,10 @@ impl IntrusiveList { #[inline] fn attach_front(&mut self, id: SlotId) -> Option<()> { let old_head = self.head; - if let Some(node) = self.arena.get_mut(id) { + { + let node = self.arena.get_mut(id)?; node.prev = None; node.next = old_head; - } else { - return None; } if let Some(old_head) = old_head { if let Some(head_node) = self.arena.get_mut(old_head) { @@ -891,11 +890,10 @@ impl IntrusiveList { #[inline] fn attach_back(&mut self, id: SlotId) -> Option<()> { let old_tail = self.tail; - if let Some(node) = self.arena.get_mut(id) { + { + let node = self.arena.get_mut(id)?; node.next = None; node.prev = old_tail; - } else { - return None; } if let Some(old_tail) = old_tail { if let Some(tail_node) = self.arena.get_mut(old_tail) { From 37a42ab181f9099058f3e4fa1f3f111a2d7db89d Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Tue, 14 Jul 2026 20:29:33 +0100 Subject: [PATCH 5/5] fix: preserve atomic update compatibility on nightly --- src/policy/s3_fifo.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/policy/s3_fifo.rs b/src/policy/s3_fifo.rs index 316c4f6..666f690 100644 --- a/src/policy/s3_fifo.rs +++ b/src/policy/s3_fifo.rs @@ -633,6 +633,8 @@ where /// hit/miss counters. #[cfg(feature = "concurrency")] #[inline] + // `try_update` is the nightly name, but `fetch_update` is required by our Rust 1.85 MSRV. + #[allow(deprecated)] pub(crate) fn get_shared(&self, key: &K) -> Option<&V> { let &id = self.map.get(key)?; let node = self.arena.get(id).expect("map/arena out of sync");