Skip to content

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

fix(test): update skill install tests to pass explicit skills path

Steven Enamakel2f7353fd7cd8
diff --git a/crates/openhuman-embed/src/harness/skills_tests.rs b/crates/openhuman-embed/src/harness/skills_tests.rs
index 3e866cf84b..37b93b641a 100644
--- a/crates/openhuman-embed/src/harness/skills_tests.rs
+++ b/crates/openhuman-embed/src/harness/skills_tests.rs
@@ -14,7 +14,7 @@ fn bundles_are_copied_into_the_workspace_skills_root() {
bundle(&src.path().join("alpha"), "SKILL.md", "# alpha");
bundle(&src.path().join("beta"), "WORKFLOW.md", "# beta");
- let installed = install(src.path(), ws.path()).expect("install");
+ let installed = install(src.path(), &ws.path().join("skills")).expect("install");
assert_eq!(installed, 2);
// `<workspace>/skills` is the legacy skill root — the one root a harness
@@ -29,7 +29,7 @@ fn a_directory_that_is_itself_a_bundle_is_copied_under_its_own_name() {
let ws = tempfile::tempdir().expect("ws");
let solo = bundle(&src.path().join("solo"), "SKILL.md", "# solo");
- let installed = install(&solo, ws.path()).expect("install");
+ let installed = install(&solo, &ws.path().join("skills")).expect("install");
assert_eq!(installed, 1);
assert!(ws.path().join("skills/solo/SKILL.md").is_file());
}
@@ -43,7 +43,7 @@ fn nested_bundle_files_come_along() {
std::fs::create_dir_all(dir.join("scripts")).expect("mkdir");
std::fs::write(dir.join("scripts/run.sh"), "echo hi").expect("write");
- install(src.path(), ws.path()).expect("install");
+ install(src.path(), &ws.path().join("skills")).expect("install");
assert_eq!(
std::fs::read_to_string(ws.path().join("skills/alpha/scripts/run.sh")).expect("read"),
"echo hi"
@@ -57,7 +57,7 @@ fn a_directory_without_a_manifest_is_not_a_bundle() {
std::fs::create_dir_all(src.path().join("notaskill")).expect("mkdir");
std::fs::write(src.path().join("notaskill/readme.txt"), "hi").expect("write");
- assert_eq!(install(src.path(), ws.path()).expect("install"), 0);
+ assert_eq!(install(src.path(), &ws.path().join("skills")).expect("install"), 0);
assert!(!ws.path().join("skills/notaskill").exists());
}
@@ -76,7 +76,7 @@ fn a_symlinked_bundle_is_skipped_not_followed() {
std::os::unix::fs::symlink(outside.path().join("evil"), src.path().join("evil"))
.expect("symlink");
- assert_eq!(install(src.path(), ws.path()).expect("install"), 0);
+ assert_eq!(install(src.path(), &ws.path().join("skills")).expect("install"), 0);
assert!(!ws.path().join("skills/evil").exists());
}
@@ -92,7 +92,7 @@ fn a_symlink_inside_a_bundle_is_skipped_not_followed() {
bundle(&dir, "SKILL.md", "# alpha");
std::os::unix::fs::symlink(outside.path().join("secret"), dir.join("leak")).expect("symlink");
- install(src.path(), ws.path()).expect("install");
+ install(src.path(), &ws.path().join("skills")).expect("install");
assert!(ws.path().join("skills/alpha/SKILL.md").is_file());
assert!(
!ws.path().join("skills/alpha/leak").exists(),
@@ -126,7 +126,7 @@ fn a_symlinked_manifest_does_not_make_a_directory_a_bundle() {
#[test]
fn a_missing_skills_dir_is_a_clear_error_not_a_silent_skip() {
let ws = tempfile::tempdir().expect("ws");
- let err = install(std::path::Path::new("/nonexistent/skills"), ws.path())
+ let err = install(std::path::Path::new("/nonexistent/skills"), &ws.path().join("skills"))
.expect_err("a missing directory is a caller mistake");
assert!(matches!(err, HarnessError::Invalid(_)));
}
@@ -135,5 +135,5 @@ fn a_missing_skills_dir_is_a_clear_error_not_a_silent_skip() {
fn an_empty_skills_dir_is_allowed() {
let src = tempfile::tempdir().expect("src");
let ws = tempfile::tempdir().expect("ws");
- assert_eq!(install(src.path(), ws.path()).expect("install"), 0);
+ assert_eq!(install(src.path(), &ws.path().join("skills")).expect("install"), 0);
}