aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/command/audit_command_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-29 02:16:43 +0900
committernsfisis <nsfisis@gmail.com>2026-06-29 02:17:57 +0900
commit3b28fc65f5de7c6ad69bee48b2d1f52dd9b30972 (patch)
treedd2567446a1fe6e7245fd35190dc039bb46cc86b /crates/shirabe/tests/command/audit_command_test.rs
parent1036b7e33a4360df8b99f81ef03492fee8328bd0 (diff)
downloadphp-shirabe-3b28fc65f5de7c6ad69bee48b2d1f52dd9b30972.tar.gz
php-shirabe-3b28fc65f5de7c6ad69bee48b2d1f52dd9b30972.tar.zst
php-shirabe-3b28fc65f5de7c6ad69bee48b2d1f52dd9b30972.zip
fix(advisory): pass IO as shared handle to Auditor::audit
Auditor::audit took io as &mut dyn IOInterface, forcing the audit and installer post-audit call sites to hold a borrow_mut() on the shared IO RefCell for the whole call. During advisory fetching the repositories write to their own clones of the same handle, so the borrow_mut() collided with their borrow() and panicked with 'RefCell already mutably borrowed' on 'audit --locked'. Take the Rc<RefCell<dyn IOInterface>> handle instead so writes borrow briefly and never overlap. Un-ignore the locked-audit regression test that this unblocks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/command/audit_command_test.rs')
-rw-r--r--crates/shirabe/tests/command/audit_command_test.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/crates/shirabe/tests/command/audit_command_test.rs b/crates/shirabe/tests/command/audit_command_test.rs
index bccc7c2..a1658ba 100644
--- a/crates/shirabe/tests/command/audit_command_test.rs
+++ b/crates/shirabe/tests/command/audit_command_test.rs
@@ -60,7 +60,6 @@ fn test_error_auditing_lock_file_when_it_is_missing() {
#[test]
#[serial]
-#[ignore = "'RefCell already mutably borrowed' panic at crates/shirabe/src/io/io_interface.rs:215 (write_error3) in the locked-audit advisory-fetch path; not in target file"]
fn test_audit_package_with_no_security_vulnerabilities() {
let tear_down = init_temp_composer(None, None, None, true);
let packages: Vec<PackageInterfaceHandle> = vec![get_package("dummy/pkg", "1.0.0")];