Skip to content

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

test(tinyflows): add dispatch ctx to adapter test fixtures

Steven Enamakelc03cac542d21
diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs
index c37b2dec8c..9800a73796 100644
--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs
@@ -73,6 +73,7 @@ async fn http_adapter_blocks_under_readonly_tier() {
let (_dir, creds) = http_cred_store();
let http = OpenHumanHttp {
+ ctx: crate::core::runtime::DispatchCtx::ambient(),
security: Arc::new(policy(AutonomyLevel::ReadOnly)),
http_config: HttpRequestConfig::default(),
http_creds: Arc::new(creds),
diff --git a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs
index 8085d41809..d5a6f71185 100644
--- a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs
@@ -6,7 +6,12 @@ use super::*;
fn build_capabilities_constructs_every_slot_without_panicking() {
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
- let caps = build_capabilities(&crate::core::runtime::DispatchCtx::ambient(), config, "test:build", None);
+ let caps = build_capabilities(
+ &crate::core::runtime::DispatchCtx::ambient(),
+ config,
+ "test:build",
+ None,
+ );
assert!(caps.tasks.is_some(), "Tinyflows task nodes need a runner");
assert!(
caps.approvals.is_none(),
@@ -54,7 +59,12 @@ async fn http_adapter_rejects_host_outside_strict_allowlist() {
async fn engine_run_drives_trigger_to_http_request_through_the_real_seam() {
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp);
- let caps = build_capabilities(&crate::core::runtime::DispatchCtx::ambient(), config, "test:smoke", None);
+ let caps = build_capabilities(
+ &crate::core::runtime::DispatchCtx::ambient(),
+ config,
+ "test:smoke",
+ None,
+ );
// A deterministically-blocked loopback URL with `on_error: continue` so
// the run completes even though the (real, SSRF-guarded) HTTP adapter
@@ -110,6 +120,7 @@ async fn code_adapter_javascript_runs_when_isolated_and_refuses_when_isolation_i
&config.action_dir,
));
let runner = OpenHumanCode {
+ ctx: crate::core::runtime::DispatchCtx::ambient(),
config,
security,
approval: Default::default(),
diff --git a/crates/openhuman-core/src/flows/tinyflows/tinyflows_tests.rs b/crates/openhuman-core/src/flows/tinyflows/tinyflows_tests.rs
index 66dabfdfef..952e939825 100644
--- a/crates/openhuman-core/src/flows/tinyflows/tinyflows_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/tinyflows_tests.rs
@@ -79,6 +79,7 @@ fn http_adapter(allowed_domains: Vec<String>) -> OpenHumanHttp {
&config.action_dir,
));
OpenHumanHttp {
+ ctx: crate::core::runtime::DispatchCtx::ambient(),
security,
http_config: crate::config::HttpRequestConfig {
allowed_domains,