Skip to content

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

test(subagent_host): tighten artifact path assertion in byte policy test

Steven Enamakel91672691de3e
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner_artifacts_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner_artifacts_tests.rs
index 5482577522..551db84477 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner_artifacts_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner_artifacts_tests.rs
@@ -82,10 +82,14 @@ async fn byte_policy_projects_a_parent_readable_artifact_before_the_result_cap()
);
assert_ne!(outcome.output, original);
assert!(outcome.artifact_paths.contains(&"authored.txt".to_owned()));
+ let output_prefix = format!("{}/", tinyagents_harness::artifacts::OUTPUTS_DIR);
let stored_path = outcome
.artifact_paths
.iter()
- .find(|path| path.starts_with("outputs/"))
+ .find(|path| {
+ path.strip_prefix(&output_prefix)
+ .is_some_and(|name| !name.is_empty())
+ })
.expect("host projection records its artifact path");
let parent_copy = parent_action_dir.join(stored_path);
assert!(