Skip to content

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

test(config): simplify context route test setup

Steven Enamakel59fac65a8b61
diff --git a/crates/openhuman-core/src/config/ops/loader_current_tests.rs b/crates/openhuman-core/src/config/ops/loader_current_tests.rs
index 684cc8fd97..997f0b8f80 100644
--- a/crates/openhuman-core/src/config/ops/loader_current_tests.rs
+++ b/crates/openhuman-core/src/config/ops/loader_current_tests.rs
@@ -41,12 +41,9 @@ async fn a_context_route_follows_every_load_of_the_context_config() {
#[tokio::test]
async fn a_context_without_a_route_loads_unchanged_providers() {
- let loaded = CoreContext::scope(
- context_with(base_config()),
- load_current_or_init(&DispatchCtx::process_default()),
- )
- .await
- .expect("context config loads");
+ let loaded = load_current_or_init(&DispatchCtx::new(context_with(base_config())))
+ .await
+ .expect("context config loads");
assert!(loaded.ephemeral_route.is_none());
assert!(loaded
diff --git a/scripts/ci/agent-runtime-boundary-baseline.json b/scripts/ci/agent-runtime-boundary-baseline.json
index b6a6caa11e..b86a2eb7fa 100644
--- a/scripts/ci/agent-runtime-boundary-baseline.json
+++ b/scripts/ci/agent-runtime-boundary-baseline.json
@@ -37,28 +37,28 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs",
- "line": 69,
+ "line": 70,
"text": "let inherited_origin = crate::agent::turn_origin::capture();",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs",
- "line": 73,
+ "line": 74,
"text": "crate::agent::turn_origin::with_inherited_origin(",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs",
- "line": 208,
+ "line": 209,
"text": "let inherited_origin = crate::agent::turn_origin::capture();",
"occurrence": 2
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs",
- "line": 212,
+ "line": 213,
"text": "crate::agent::turn_origin::with_inherited_origin(",
"occurrence": 2
},
@@ -72,7 +72,7 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/schemas.rs",
- "line": 436,
+ "line": 437,
"text": "crate::agent::turn_origin::with_origin(",
"occurrence": 1
},
@@ -86,7 +86,7 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs",
- "line": 513,
+ "line": 516,
"text": "crate::agent::turn_origin::current(),",
"occurrence": 1
},
@@ -149,21 +149,21 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/desktop/notifications/rpc.rs",
- "line": 18,
+ "line": 19,
"text": "use crate::agent::turn_origin::with_origin;",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/desktop/notifications/rpc.rs",
- "line": 186,
+ "line": 187,
"text": "with_origin(origin, apply_decision(triage_run, &envelope)).await",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/flows/memory_tools.rs",
- "line": 64,
+ "line": 65,
"text": "match turn_origin::current() {",
"occurrence": 1
},
@@ -177,28 +177,28 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/flows/ops/builder.rs",
- "line": 201,
+ "line": 204,
"text": "let run = with_origin(",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/flows/ops/builder.rs",
- "line": 251,
+ "line": 254,
"text": "let run = with_origin(AgentTurnOrigin::Cli, agent.run_single(&prompt));",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/flows/ops/discovery.rs",
- "line": 42,
+ "line": 44,
"text": "use crate::agent::turn_origin::{with_origin, AgentTurnOrigin};",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/flows/ops/discovery.rs",
- "line": 76,
+ "line": 78,
"text": "let run = with_origin(AgentTurnOrigin::Cli, agent.run_single(FLOW_DISCOVER_PROMPT));",
"occurrence": 1
},
@@ -303,14 +303,14 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs",
- "line": 9,
+ "line": 10,
"text": "use crate::agent::turn_origin::with_origin;",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs",
- "line": 194,
+ "line": 195,
"text": "if let Err(e) = with_origin(origin, apply_decision(run, &envelope)).await {",
"occurrence": 1
},
@@ -331,7 +331,7 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/mcp/server/tools/dispatch.rs",
- "line": 373,
+ "line": 374,
"text": "crate::agent::turn_origin::with_origin(origin, agent.run_single(prompt)),",
"occurrence": 1
},
@@ -339,7 +339,7 @@
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/modules/wallet_host.rs",
"line": 697,
- "text": "crate::agent::turn_origin::current().as_ref(),",
+ "text": "x402_request_owner_matches(&request, crate::agent::turn_origin::current().as_ref());",
"occurrence": 1
},
{
@@ -366,28 +366,28 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/skills/runtime/schemas.rs",
- "line": 270,
+ "line": 271,
"text": "let origin = crate::agent::turn_origin::current()",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/skills/runtime/schemas.rs",
- "line": 272,
+ "line": 273,
"text": "let started = crate::agent::turn_origin::with_origin(",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/skills/schemas/handlers.rs",
- "line": 155,
+ "line": 168,
"text": "let origin = crate::agent::turn_origin::current()",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/skills/schemas/handlers.rs",
- "line": 157,
+ "line": 170,
"text": "let started = match crate::agent::turn_origin::with_origin(",
"occurrence": 1
},