From 3212a8f0efeaad4b6ea0c14497a17230c96260f1 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Wed, 29 Apr 2026 09:59:31 +0100 Subject: [PATCH 1/3] 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/3] 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/3] 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 {