Skip to content

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

test(core): add host kind parameter to context test support

Steven Enamakel8b84b3d299b8
diff --git a/crates/openhuman-core/src/core/runtime/context_test_support.rs b/crates/openhuman-core/src/core/runtime/context_test_support.rs
index 12d2a8f3c9..f1382afe3d 100644
--- a/crates/openhuman-core/src/core/runtime/context_test_support.rs
+++ b/crates/openhuman-core/src/core/runtime/context_test_support.rs
@@ -12,9 +12,18 @@ impl CoreContext {
pub(crate) fn for_test(
domains: crate::core::runtime::DomainSet,
workspace_dir: Option<std::path::PathBuf>,
+ ) -> Arc<CoreContext> {
+ Self::for_test_with_host_kind(HostKind::Cli, domains, workspace_dir)
+ }
+
+ /// Test-only constructor with an explicit host policy identity.
+ pub(crate) fn for_test_with_host_kind(
+ host_kind: HostKind,
+ domains: crate::core::runtime::DomainSet,
+ workspace_dir: Option<std::path::PathBuf>,
) -> Arc<CoreContext> {
Arc::new(CoreContext {
- host_kind: HostKind::Cli,
+ host_kind,
workspace_binding: RwLock::new(Arc::new(RwLock::new(WorkspaceBinding {
workspace_dir,
}))),