From b06f3df6b685e64b1195690d5e7e65e60706518f Mon Sep 17 00:00:00 2001 From: Zhengchao An Date: Wed, 8 Jul 2026 16:01:12 +0800 Subject: [PATCH] fix: repair main build (swift clippy assert + ecstore multipart test ctx) (#4441) * fix(swift): replace assert!(false) with panic! in expiration_worker test clippy::assertions_on_constants fails the swift clippy CI job under -D warnings. * fix(ecstore): add missing ctx field to multipart lock test store The multipart list-parts lock test (#4437) constructs ECStore without the ctx field added by the Phase 5 InstanceContext work (backlog#939). Both landed on main independently, leaving a semantic conflict that breaks the ecstore lib-test build (E0063). Adopt the process bootstrap context, matching the existing bootstrap_ctx() test in store/mod.rs. --- crates/ecstore/src/store/multipart.rs | 1 + crates/protocols/src/swift/expiration_worker.rs | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/ecstore/src/store/multipart.rs b/crates/ecstore/src/store/multipart.rs index 3668b6a8f..b320d6074 100644 --- a/crates/ecstore/src/store/multipart.rs +++ b/crates/ecstore/src/store/multipart.rs @@ -417,6 +417,7 @@ mod tests { decommission_cancelers: RwLock::new(Vec::new()), start_gate: Mutex::new(()), pool_meta_save_gate: Mutex::new(()), + ctx: crate::runtime::instance::bootstrap_ctx(), } } diff --git a/crates/protocols/src/swift/expiration_worker.rs b/crates/protocols/src/swift/expiration_worker.rs index 7aeb88a86..e9f409404 100644 --- a/crates/protocols/src/swift/expiration_worker.rs +++ b/crates/protocols/src/swift/expiration_worker.rs @@ -984,10 +984,7 @@ mod tests { let tracked = match worker.scan_all_objects_with_backend(&backend).await { Ok(tracked) => tracked, - Err(err) => { - assert!(false, "scan candidates should be tracked: {err}"); - 0 - } + Err(err) => panic!("scan candidates should be tracked: {err}"), }; assert_eq!(tracked, 2);