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 workspace isolation assertions

Steven Enamakel9b2a908caa8b
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_workspace_owner_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_workspace_owner_tests.rs
index 4ab768bb06..c3b15d4ce7 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_workspace_owner_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_workspace_owner_tests.rs
@@ -236,10 +236,12 @@ async fn driver_job_controls_are_isolated_by_workspace_with_shared_runtime_state
)
.await
.expect("native list alias works for A");
- assert!(listed_a.results[0].text().contains(&id_a));
+ assert!(listed_a.results[0]
+ .text()
+ .contains("workspace-a-session"));
assert!(
- !listed_a.results[0].text().contains(&id_b),
- "A must not see B's driver job: {}",
+ !listed_a.results[0].text().contains("workspace-b-session"),
+ "A must not see B's durable session: {}",
listed_a.results[0].text()
);
let listed_b = execute_tool_batch(
@@ -257,8 +259,12 @@ async fn driver_job_controls_are_isolated_by_workspace_with_shared_runtime_state
)
.await
.expect("native list alias works for B");
- assert!(listed_b.results[0].text().contains(&id_b));
- assert!(!listed_b.results[0].text().contains(&id_a));
+ assert!(listed_b.results[0]
+ .text()
+ .contains("workspace-b-session"));
+ assert!(!listed_b.results[0]
+ .text()
+ .contains("workspace-a-session"));
let foreign_wait = execute_tool_batch(
&harness,
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
index a700dd39e7..581a3bcd5e 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
@@ -30,7 +30,7 @@ impl OpenHumanPersistence {
}
}
- pub(super) fn with_host_outcome(
+ pub(in crate::agent::subagent_host) fn with_host_outcome(
mut self,
host_outcome: Arc<Mutex<HashMap<SubagentTaskKey, SubagentRunOutcome>>>,
) -> Self {
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs
index da1bc2542d..257e42b1c0 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs
@@ -402,7 +402,7 @@ async fn persistence_inserts_one_terminal_and_returns_the_durable_winner() {
}
#[tokio::test]
-async fn inline_driver_projection_returns_the_durable_winner_not_a_local_loser() {
+async fn driver_inline_projection_returns_the_durable_winner_not_a_local_loser() {
use tinyagents_orchestration::subagent::SubagentPersistenceDisposition as Disposition;
let directory = tempfile::tempdir().unwrap();