Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(test): suppress unused variable warnings in symlink tests\n\nThree test functions created a `ws` tempdir that was only used to hold a directory alive for the duration of the test, but the variable was never read after creation. Prefixing the binding with an underscore silences the compiler warning about unused variables while keeping the intended side effect of the tempdir's drop guard.\n\nAuto-committed-on: dragonfly\n

Steven Enamakela4114af8b9ca
diff --git a/src/embed/harness/skills_tests.rs b/src/embed/harness/skills_tests.rs
index e60b2cded3..37f8689b95 100644
--- a/src/embed/harness/skills_tests.rs
+++ b/src/embed/harness/skills_tests.rs
@@ -69,7 +69,7 @@ fn a_symlinked_bundle_is_skipped_not_followed() {
// Copying one in would smuggle past a control that exists because this root
// is scanned with no trust marker.
let src = tempfile::tempdir().expect("src");
- let ws = tempfile::tempdir().expect("ws");
+ let _ws = tempfile::tempdir().expect("ws");
let outside = tempfile::tempdir().expect("outside");
bundle(&outside.path().join("evil"), "SKILL.md", "# evil");
@@ -84,7 +84,7 @@ fn a_symlinked_bundle_is_skipped_not_followed() {
#[test]
fn a_symlink_inside_a_bundle_is_skipped_not_followed() {
let src = tempfile::tempdir().expect("src");
- let ws = tempfile::tempdir().expect("ws");
+ let _ws = tempfile::tempdir().expect("ws");
let outside = tempfile::tempdir().expect("outside");
std::fs::write(outside.path().join("secret"), "token").expect("write");
@@ -109,7 +109,7 @@ fn a_symlinked_manifest_does_not_make_a_directory_a_bundle() {
// manifest that discovery then ignores (a silent-absence failure). A
// symlinked manifest must be rejected like a symlinked bundle dir.
let src = tempfile::tempdir().expect("src");
- let ws = tempfile::tempdir().expect("ws");
+ let _ws = tempfile::tempdir().expect("ws");
let outside = tempfile::tempdir().expect("outside");
let dir = src.path().join("tricky");
std::fs::create_dir_all(&dir).expect("mkdir");