The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed crates/openhuman-core/src/core/runtime/services_tests.rs,crates/openhuman-core/
Steven Enamakel9a382f80df01
diff --git a/crates/openhuman-core/src/core/runtime/services_tests.rs b/crates/openhuman-core/src/core/runtime/services_tests.rsindex fae6bde3bc..777b00a732 100644--- a/crates/openhuman-core/src/core/runtime/services_tests.rs+++ b/crates/openhuman-core/src/core/runtime/services_tests.rs@@ -154,12 +154,10 @@ async fn stopping_service_tasks_aborts_every_tracked_task() {tasks.stop();assert_eq!(tasks.len(), 0);// The sender drops when the aborted task is torn down.- assert!(- tokio::time::timeout(std::time::Duration::from_secs(5), rx)- .await- .expect("the aborted task is torn down")- .is_err()- );+ assert!(tokio::time::timeout(std::time::Duration::from_secs(5), rx)+ .await+ .expect("the aborted task is torn down")+ .is_err());}#[tokio::test]@@ -175,12 +173,10 @@ async fn dropping_service_tasks_aborts_them() {}),);}- assert!(- tokio::time::timeout(std::time::Duration::from_secs(5), rx)- .await- .expect("the aborted task is torn down")- .is_err()- );+ assert!(tokio::time::timeout(std::time::Duration::from_secs(5), rx)+ .await+ .expect("the aborted task is torn down")+ .is_err());}#[test]diff --git a/crates/openhuman-core/src/flows/authoring_host_tests.rs b/crates/openhuman-core/src/flows/authoring_host_tests.rsindex e4939de6dc..5a58e9e502 100644--- a/crates/openhuman-core/src/flows/authoring_host_tests.rs+++ b/crates/openhuman-core/src/flows/authoring_host_tests.rs@@ -29,7 +29,7 @@ fn nested_conditional_fan_in() -> Value {#[tokio::test]async fn saved_workflow_callback_uses_its_captured_profile_over_the_bus() {use crate::core::runtime::{ContextOverlay, CoreContext, DispatchCtx, DomainSet};- use crate::integrations::composio::catalog::{ToolContract, seed_live_catalog_cache};+ use crate::integrations::composio::catalog::{seed_live_catalog_cache, ToolContract};use crate::tools::toolpacks::ToolGroups;let tmp = tempfile::tempdir().expect("temporary workspace");diff --git a/crates/openhuman-core/src/flows/builder_host.rs b/crates/openhuman-core/src/flows/builder_host.rsindex 63d0ad0624..96723e8b99 100644--- a/crates/openhuman-core/src/flows/builder_host.rs+++ b/crates/openhuman-core/src/flows/builder_host.rs@@ -4,7 +4,7 @@ use std::future::Future;use std::sync::Arc;use serde::de::DeserializeOwned;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinybus::Result as BusResult;use tinyflows_bus::copilot::{self, CopilotHost, PortOperation};diff --git a/crates/openhuman-core/src/flows/caps_host/agent.rs b/crates/openhuman-core/src/flows/caps_host/agent.rsindex a2fcb55d5e..f747716cff 100644--- a/crates/openhuman-core/src/flows/caps_host/agent.rs+++ b/crates/openhuman-core/src/flows/caps_host/agent.rs@@ -10,19 +10,19 @@use std::sync::Arc;-use serde_json::{Value, json};+use serde_json::{json, Value};use super::*;use crate::config::Config;use crate::flows::agent_route::{- AgentRoute, harness_model_default_override, route_custom_entry_lookup, route_for_agent_ref,+ harness_model_default_override, route_custom_entry_lookup, route_for_agent_ref, AgentRoute,};use crate::modules::tinyflows as module;-#[path = "agent_harness.rs"]-mod harness;#[path = "agent_fallback.rs"]mod fallback;+#[path = "agent_harness.rs"]+mod harness;/// [`AgentRunner`] backing an `agent` node's `agent_ref`. It runs the selected/// agent kind by one of two paths, chosen by [`route_for_agent_ref`]:@@ -296,9 +296,7 @@ impl OpenHumanAgentRunner {}}-impl OpenHumanAgentRunner {--}+impl OpenHumanAgentRunner {}#[cfg(test)]#[path = "agent_tests.rs"]diff --git a/crates/openhuman-core/src/flows/caps_host/agent_fallback.rs b/crates/openhuman-core/src/flows/caps_host/agent_fallback.rsindex 4a7f951d82..42e70df80c 100644--- a/crates/openhuman-core/src/flows/caps_host/agent_fallback.rs+++ b/crates/openhuman-core/src/flows/caps_host/agent_fallback.rs@@ -70,4 +70,5 @@ impl OpenHumanAgentRunner {}.complete_with_format_request(completion_request, request, conn).await- }}+ }+}diff --git a/crates/openhuman-core/src/flows/caps_host/agent_harness.rs b/crates/openhuman-core/src/flows/caps_host/agent_harness.rsindex e7f385e7a1..1a18817acd 100644--- a/crates/openhuman-core/src/flows/caps_host/agent_harness.rs+++ b/crates/openhuman-core/src/flows/caps_host/agent_harness.rs@@ -214,5 +214,4 @@ impl OpenHumanAgentRunner {self.format_agent_result(agent_ref, request, final_text).await}-}diff --git a/crates/openhuman-core/src/flows/caps_host/code.rs b/crates/openhuman-core/src/flows/caps_host/code.rsindex c00a23b368..2b307277ae 100644--- a/crates/openhuman-core/src/flows/caps_host/code.rs+++ b/crates/openhuman-core/src/flows/caps_host/code.rs@@ -8,7 +8,7 @@use crate::core::runtime::DispatchCtx;use std::sync::Arc;-use serde_json::{Value, json};+use serde_json::{json, Value};use super::*;use crate::config::Config;diff --git a/crates/openhuman-core/src/flows/caps_host/http.rs b/crates/openhuman-core/src/flows/caps_host/http.rsindex 84651017ae..5f0033636f 100644--- a/crates/openhuman-core/src/flows/caps_host/http.rs+++ b/crates/openhuman-core/src/flows/caps_host/http.rs@@ -11,21 +11,21 @@use std::sync::Arc;-use serde_json::{Value, json};+use serde_json::{json, Value};use super::*;use crate::config::{Config, HttpRequestConfig};use crate::modules::tinyflows as module;-use crate::security::SecurityPolicy;use crate::security::credentials::{HttpCredential, HttpCredentialsStore};+use crate::security::SecurityPolicy;use crate::tools::http_request_tool;use tinybox_bus::CommandClass;use tinytools::Tool as _;-use super::{EngineError, Result};use super::{close_audit, enforce_current_node_tier_gate, enforce_node_tier_gate, gate_call_for_tier,};+use super::{EngineError, Result};/// [`HttpClient`] adapter over `HttpRequestTool`/// (`tinytools_std::network::HttpRequestTool`, built by `tools/impl/network/host.rs`). Allowlist + DNS-rebinddiff --git a/crates/openhuman-core/src/flows/caps_host/llm.rs b/crates/openhuman-core/src/flows/caps_host/llm.rsindex 9bf006abfe..903263d594 100644--- a/crates/openhuman-core/src/flows/caps_host/llm.rs+++ b/crates/openhuman-core/src/flows/caps_host/llm.rs@@ -7,7 +7,7 @@use std::sync::Arc;-use serde_json::{Value, json};+use serde_json::{json, Value};use super::*;use crate::config::Config;diff --git a/crates/openhuman-core/src/flows/caps_host/memory.rs b/crates/openhuman-core/src/flows/caps_host/memory.rsindex dc6955ddab..44fd80dbb9 100644--- a/crates/openhuman-core/src/flows/caps_host/memory.rs+++ b/crates/openhuman-core/src/flows/caps_host/memory.rs@@ -33,25 +33,25 @@use std::sync::Arc;-use serde_json::{Value, json};+use serde_json::{json, Value};#[cfg(test)]use crate::agent::turn_origin;use crate::agent::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};use crate::config::Config;use crate::flows::{- FLOWS_TAG, cross_flow_filter, flow_filter, flow_key_of, flow_key_tag, forget_matching,- remember_keyed,+ cross_flow_filter, flow_filter, flow_key_of, flow_key_tag, forget_matching, remember_keyed,+ FLOWS_TAG,};use crate::memory::types::{FetchParams, RecallParams};+use crate::security::approval::{redact_args, summarize_action, GateOutcome};use crate::security::SecurityPolicy;-use crate::security::approval::{GateOutcome, redact_args, summarize_action};use tinybox_bus::CommandClass;-use tinymemory_api::Error;use tinymemory_api::wrap_untrusted_for_agent;+use tinymemory_api::Error;use tinymemory_api::{Hit, LearningKind, MemoryMeta, MetaFilter, SourceKind};-use super::{EngineError, Result, enforce_current_node_tier_gate, gate_call_for_tier};+use super::{enforce_current_node_tier_gate, gate_call_for_tier, EngineError, Result};/// Stable `tracing` grep prefix for every log line this adapter emits. Never/// logs memory *content* or PII — only operation names, scopes, resolveddiff --git a/crates/openhuman-core/src/flows/caps_host/mod.rs b/crates/openhuman-core/src/flows/caps_host/mod.rsindex 01180da403..19c27a9f2e 100644--- a/crates/openhuman-core/src/flows/caps_host/mod.rs+++ b/crates/openhuman-core/src/flows/caps_host/mod.rs@@ -17,11 +17,11 @@ pub(crate) mod tools;mod binding_tests;pub(crate) use agent::OpenHumanAgentRunner;-pub(crate) use binding::{CapsHostRegistration, serve};+pub(crate) use binding::{serve, CapsHostRegistration};pub(crate) use code::OpenHumanCode;pub(crate) use error::{CapsError, EngineError, Result};-pub(crate) use http::{OpenHumanHttp, resolve_http_credential};-pub(crate) use llm::{OpenHumanLlm, resolve_host_model};+pub(crate) use http::{resolve_http_credential, OpenHumanHttp};+pub(crate) use llm::{resolve_host_model, OpenHumanLlm};pub(crate) use memory::OpenHumanMemory;pub(crate) use prompt::model_response_to_completion_value;pub(crate) use service::CapsHostService;@@ -30,7 +30,7 @@ pub(crate) use tier::{gate_call_for_tier,};pub(crate) use tools::OpenHumanTools;-pub(crate) use tools::{NATIVE_TOOL_PREFIX, classify_composio_action_for_tier};+pub(crate) use tools::{classify_composio_action_for_tier, NATIVE_TOOL_PREFIX};#[cfg(test)]#[path = "ops_tests.rs"]diff --git a/crates/openhuman-core/src/flows/caps_host/ops_tests.rs b/crates/openhuman-core/src/flows/caps_host/ops_tests.rsindex 7fa5dd7717..4373760195 100644--- a/crates/openhuman-core/src/flows/caps_host/ops_tests.rs+++ b/crates/openhuman-core/src/flows/caps_host/ops_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::config::Config;-use crate::security::SecurityPolicy;use crate::security::credentials::{HttpCredential, HttpCredentialsStore};+use crate::security::SecurityPolicy;fn http_cred_store() -> (tempfile::TempDir, HttpCredentialsStore) {let dir = tempfile::tempdir().expect("tempdir");diff --git a/crates/openhuman-core/src/flows/caps_host/ops_tier_gate_and_timeouts_tests.rs b/crates/openhuman-core/src/flows/caps_host/ops_tier_gate_and_timeouts_tests.rsindex dd1f541066..ee4d22e1d3 100644--- a/crates/openhuman-core/src/flows/caps_host/ops_tier_gate_and_timeouts_tests.rs+++ b/crates/openhuman-core/src/flows/caps_host/ops_tier_gate_and_timeouts_tests.rs@@ -26,22 +26,18 @@ fn http_request_node_tier_gate_blocks_readonly_allows_higher() {// Supervised/full do not hard-block — they fall through to the// ApprovalGate (which performs the Prompt round-trip).- assert!(- enforce_node_tier_gate(- &policy(AutonomyLevel::Supervised),- CommandClass::Network,- "http_request"- )- .is_ok()- );- assert!(- enforce_node_tier_gate(- &policy(AutonomyLevel::Full),- CommandClass::Network,- "http_request"- )- .is_ok()- );+ assert!(enforce_node_tier_gate(+ &policy(AutonomyLevel::Supervised),+ CommandClass::Network,+ "http_request"+ )+ .is_ok());+ assert!(enforce_node_tier_gate(+ &policy(AutonomyLevel::Full),+ CommandClass::Network,+ "http_request"+ )+ .is_ok());}/// The tier gate a `code` (Write-class) node calls: BLOCKED under read-only,@@ -50,22 +46,18 @@ fn http_request_node_tier_gate_blocks_readonly_allows_higher() {fn code_node_tier_gate_blocks_readonly_allows_full() {use crate::security::AutonomyLevel;- assert!(- enforce_node_tier_gate(- &policy(AutonomyLevel::ReadOnly),- CommandClass::Write,- "code"- )- .is_err()- );- assert!(- enforce_node_tier_gate(- &policy(AutonomyLevel::Supervised),- CommandClass::Write,- "code"- )- .is_ok()- );+ assert!(enforce_node_tier_gate(+ &policy(AutonomyLevel::ReadOnly),+ CommandClass::Write,+ "code"+ )+ .is_err());+ assert!(enforce_node_tier_gate(+ &policy(AutonomyLevel::Supervised),+ CommandClass::Write,+ "code"+ )+ .is_ok());assert!(enforce_node_tier_gate(&policy(AutonomyLevel::Full), CommandClass::Write, "code").is_ok());@@ -288,20 +280,22 @@ fn prompt_decision_escalates_default_workflow_origin() {/// escalation — it's already forced through the parking flow.#[test]fn prompt_decision_does_not_re_escalate_already_gated_workflow() {- assert!(- escalated_origin_for_prompt(GateDecision::Prompt, Some(workflow_origin("flow-1", true)))- .is_none()- );+ assert!(escalated_origin_for_prompt(+ GateDecision::Prompt,+ Some(workflow_origin("flow-1", true))+ )+ .is_none());}/// An `Allow` tier decision never escalates, regardless of the workflow's/// `require_approval` toggle — Full-tier runs keep running unattended.#[test]fn allow_decision_never_escalates() {- assert!(- escalated_origin_for_prompt(GateDecision::Allow, Some(workflow_origin("flow-1", false)))- .is_none()- );+ assert!(escalated_origin_for_prompt(+ GateDecision::Allow,+ Some(workflow_origin("flow-1", false))+ )+ .is_none());}/// No scoped origin (or a non-Workflow origin) never escalates — there isdiff --git a/crates/openhuman-core/src/flows/caps_host/ops_tier_live_config_tests.rs b/crates/openhuman-core/src/flows/caps_host/ops_tier_live_config_tests.rsindex 7e9613c657..091c9bf0a4 100644--- a/crates/openhuman-core/src/flows/caps_host/ops_tier_live_config_tests.rs+++ b/crates/openhuman-core/src/flows/caps_host/ops_tier_live_config_tests.rs@@ -190,17 +190,15 @@ async fn captured_agent_and_config_fn_tiers_are_not_replaced_by_parent_file() {&captured.workspace_dir,&captured.action_dir,);- assert!(- enforce_current_node_tier_gate(- &captured_ctx,- &captured,- &captured_policy,- CommandClass::Write,- "code"- )- .await- .is_err()- );+ assert!(enforce_current_node_tier_gate(+ &captured_ctx,+ &captured,+ &captured_policy,+ CommandClass::Write,+ "code"+ )+ .await+ .is_err());// A fixed ceiling contributes independently of a disabled file tier.parent_file.autonomy.enabled = false;diff --git a/crates/openhuman-core/src/flows/caps_host/prompt.rs b/crates/openhuman-core/src/flows/caps_host/prompt.rsindex 05ace67eb9..bf410a013d 100644--- a/crates/openhuman-core/src/flows/caps_host/prompt.rs+++ b/crates/openhuman-core/src/flows/caps_host/prompt.rs@@ -1,6 +1,6 @@//! Host-side inference message and response projection.-use serde_json::{Value, json};+use serde_json::{json, Value};use tinyagents_session::transcript::TranscriptMessage;use tinyflows_bus::portability::CompletionMessage;diff --git a/crates/openhuman-core/src/flows/caps_host/service_helpers.rs b/crates/openhuman-core/src/flows/caps_host/service_helpers.rsindex b8eaa9ce8b..8c85984f98 100644--- a/crates/openhuman-core/src/flows/caps_host/service_helpers.rs+++ b/crates/openhuman-core/src/flows/caps_host/service_helpers.rs@@ -4,8 +4,8 @@ use std::sync::Arc;use tinyflows_bus::runs;-use super::super::OpenHumanMemory;use super::super::binding::CapsHostBinding;+use super::super::OpenHumanMemory;pub(super) fn memory(binding: &CapsHostBinding) -> OpenHumanMemory {OpenHumanMemory {diff --git a/crates/openhuman-core/src/flows/caps_host/service_tests.rs b/crates/openhuman-core/src/flows/caps_host/service_tests.rsindex f1d20dd83f..0a314bae04 100644--- a/crates/openhuman-core/src/flows/caps_host/service_tests.rs+++ b/crates/openhuman-core/src/flows/caps_host/service_tests.rs@@ -129,10 +129,8 @@ async fn agent_run_rejects_an_identity_from_another_bound_run() {#[tokio::test]async fn late_agent_run_after_cancel_ack_returns_cancelled_handle_without_starting_work() {let temp = tempfile::TempDir::new().unwrap();- let binding = super::super::binding_tests::binding(- crate::core::runtime::DispatchCtx::unbound(),- &temp,- );+ let binding =+ super::super::binding_tests::binding(crate::core::runtime::DispatchCtx::unbound(), &temp);let service = CapsHostService::new(Arc::new(binding));let cancel_member = tinybus::MemberName::new(runs::caps::AGENT_CANCEL).unwrap();let run_member = tinybus::MemberName::new(runs::caps::AGENT_RUN).unwrap();diff --git a/crates/openhuman-core/src/flows/caps_host/tools/mod.rs b/crates/openhuman-core/src/flows/caps_host/tools/mod.rsindex d1a3a940b8..4add2c5919 100644--- a/crates/openhuman-core/src/flows/caps_host/tools/mod.rs+++ b/crates/openhuman-core/src/flows/caps_host/tools/mod.rs@@ -32,8 +32,8 @@ use serde_json::Value;use crate::config::Config;use crate::core::runtime::DispatchCtx;-use crate::security::SecurityPolicy;use crate::security::approval::ApprovalTurnContext;+use crate::security::SecurityPolicy;use super::{EngineError, Result};diff --git a/crates/openhuman-core/src/flows/caps_host/tools/native.rs b/crates/openhuman-core/src/flows/caps_host/tools/native.rsindex a15d63eccb..dca54ef54f 100644--- a/crates/openhuman-core/src/flows/caps_host/tools/native.rs+++ b/crates/openhuman-core/src/flows/caps_host/tools/native.rs@@ -5,7 +5,7 @@ use async_trait::async_trait;use serde_json::Value;use tinybox_bus::CommandClass;-use super::{NATIVE_TOOL_PREFIX, ToolBackend, ToolCallCtx};+use super::{ToolBackend, ToolCallCtx, NATIVE_TOOL_PREFIX};pub(crate) struct NativeToolBackend;diff --git a/crates/openhuman-core/src/flows/mod.rs b/crates/openhuman-core/src/flows/mod.rsindex 88b83597ed..487f7f2d9d 100644--- a/crates/openhuman-core/src/flows/mod.rs+++ b/crates/openhuman-core/src/flows/mod.rs@@ -36,8 +36,8 @@ pub(crate) mod host_gates;pub mod memory_tools;pub mod node_contracts;pub mod ops;-pub(crate) mod registration;pub(crate) mod recovery;+pub(crate) mod registration;pub(crate) mod runs_adapter;mod schemas;mod store;@@ -56,6 +56,6 @@ pub use {node_contracts::all_node_kind_contracts, node_contracts::node_kind_cont// subscriber, `flows_delete` and the tinyflows `memory` node adapter reach the// same helpers through these re-exports so every caller tags identically.pub use memory_tools::{- FLOWS_TAG, cross_flow_filter, flow_filter, flow_key_of, flow_key_tag, flow_meta, flow_tag,- forget_matching, remember_keyed,+ cross_flow_filter, flow_filter, flow_key_of, flow_key_tag, flow_meta, flow_tag,+ forget_matching, remember_keyed, FLOWS_TAG,};diff --git a/crates/openhuman-core/src/flows/ops.rs b/crates/openhuman-core/src/flows/ops.rsindex eb0a5a04aa..0b394e44be 100644--- a/crates/openhuman-core/src/flows/ops.rs+++ b/crates/openhuman-core/src/flows/ops.rs@@ -34,7 +34,7 @@use std::collections::HashSet;use std::sync::{Arc, LazyLock};-use serde_json::{Value, json};+use serde_json::{json, Value};use tinyflows::model::{NodeKind, TriggerKind, WorkflowGraph};// Generic graph analysis used for UI notes and authoring summaries comes from// the TinyFlows bus. OpenHuman-specific save and dispatch policy stays here.diff --git a/crates/openhuman-core/src/flows/ops/resume.rs b/crates/openhuman-core/src/flows/ops/resume.rsindex 4e0809e9c2..7313d6c49a 100644--- a/crates/openhuman-core/src/flows/ops/resume.rs+++ b/crates/openhuman-core/src/flows/ops/resume.rs@@ -67,7 +67,7 @@ async fn current_workflow_for_resume(config: &Config,flow_id: &str,) -> Result<ResumeWorkflow, String> {- use tinyflows_bus::catalog::{Workflow, members};+ use tinyflows_bus::catalog::{members, Workflow};let storage = crate::flows::catalog_storage::register(ctx, config).await?diff --git a/crates/openhuman-core/src/flows/ops_builder_repair_tests.rs b/crates/openhuman-core/src/flows/ops_builder_repair_tests.rsindex 8ad1591bdd..0319800102 100644--- a/crates/openhuman-core/src/flows/ops_builder_repair_tests.rs+++ b/crates/openhuman-core/src/flows/ops_builder_repair_tests.rs@@ -3,60 +3,48 @@ use super::*;use crate::core::runtime::DispatchCtx;use crate::{config::Config,- flows::ops::{FlowStreamTarget, flows_build_with_extra_hidden_tools},+ flows::ops::{flows_build_with_extra_hidden_tools, FlowStreamTarget},};#[tokio::test]async fn classifies_backend_failures_without_classifying_graph_timeouts() {let config = Config::default();- assert!(- is_backend_or_infrastructure_failure(- &config,- "File upload failed: Backend returned 500 Internal Server Error"- )- .await- .unwrap()- );- assert!(- !is_backend_or_infrastructure_failure(- &config,- "File upload failed: Backend returned 400 Bad Request"- )- .await- .unwrap()- );- assert!(- is_backend_or_infrastructure_failure(- &config,- "connection timed out while calling file storage"- )- .await- .unwrap()- );- assert!(- is_backend_or_infrastructure_failure(- &config,- "POST https://api.example.test/files failed: connection timed out"- )- .await- .unwrap()- );- assert!(- !is_backend_or_infrastructure_failure(- &config,- "agent node fetch_profile timed out after 30 seconds"- )- .await- .unwrap()- );- assert!(- !is_backend_or_infrastructure_failure(- &config,- "required argument resolved null: nodes.get_link.item.json.url"- )- .await- .unwrap()- );+ assert!(is_backend_or_infrastructure_failure(+ &config,+ "File upload failed: Backend returned 500 Internal Server Error"+ )+ .await+ .unwrap());+ assert!(!is_backend_or_infrastructure_failure(+ &config,+ "File upload failed: Backend returned 400 Bad Request"+ )+ .await+ .unwrap());+ assert!(is_backend_or_infrastructure_failure(+ &config,+ "connection timed out while calling file storage"+ )+ .await+ .unwrap());+ assert!(is_backend_or_infrastructure_failure(+ &config,+ "POST https://api.example.test/files failed: connection timed out"+ )+ .await+ .unwrap());+ assert!(!is_backend_or_infrastructure_failure(+ &config,+ "agent node fetch_profile timed out after 30 seconds"+ )+ .await+ .unwrap());+ assert!(!is_backend_or_infrastructure_failure(+ &config,+ "required argument resolved null: nodes.get_link.item.json.url"+ )+ .await+ .unwrap());}#[tokio::test]@@ -68,15 +56,13 @@ async fn backend_repair_message_explains_why_the_graph_was_preserved() {assert!(message.contains("workflow was not changed"));assert!(message.contains("HTTP 503 from file storage"));- assert!(- backend_repair_message(- &Config::default(),- "agent node fetch_profile timed out after 30 seconds",- )- .await- .unwrap()- .is_none()- );+ assert!(backend_repair_message(+ &Config::default(),+ "agent node fetch_profile timed out after 30 seconds",+ )+ .await+ .unwrap()+ .is_none());}#[test]@@ -111,12 +97,10 @@ fn repair_backend_failure_returns_no_proposal_before_starting_the_builder() {assert_eq!(outcome.value["proposal"], Value::Null);assert_eq!(outcome.value["error"], Value::Null);- assert!(- outcome.value["assistant_text"]- .as_str()- .expect("assistant text")- .contains("workflow was not changed")- );+ assert!(outcome.value["assistant_text"]+ .as_str()+ .expect("assistant text")+ .contains("workflow was not changed"));let request_id = format!("backend-repair-{}", uuid::Uuid::new_v4());let stream = FlowStreamTarget {@@ -144,11 +128,10 @@ fn repair_backend_failure_returns_no_proposal_before_starting_the_builder() {};assert_eq!(done.event, "chat_done");assert_eq!(done.thread_id, "backend-repair-thread");- assert!(- done.full_response- .as_deref()- .expect("terminal response text")- .contains("workflow was not changed")- );+ assert!(done+ .full_response+ .as_deref()+ .expect("terminal response text")+ .contains("workflow was not changed"));});}diff --git a/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs b/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rsindex 0bd6d8eebd..4f1878ba28 100644--- a/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs+++ b/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs@@ -334,15 +334,13 @@ async fn flows_update_does_not_force_require_approval_on_readonly_graph() {async fn strict_gate_passes_a_valid_graph_and_rejects_a_structurally_invalid_one() {let config = Config::default();// A trigger-only graph is structurally valid and has no outbound gates.- assert!(- strict_gate(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &trigger_only_graph()- )- .await- .is_ok()- );+ assert!(strict_gate(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &trigger_only_graph()+ )+ .await+ .is_ok());// No trigger → structural failure surfaced by strict mode.let bad = json!({@@ -474,16 +472,14 @@ async fn referenced_child_compatibility_stops_at_saved_workflow_cycles() {.unwrap();let candidate = structurally_valid_graph(referenced_child_graph(&flow_a.id));- assert!(- config_aware_engine_compatibility_errors(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- serde_json::to_value(candidate).unwrap(),- )- .await- .unwrap()- .is_empty()- );+ assert!(config_aware_engine_compatibility_errors(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ serde_json::to_value(candidate).unwrap(),+ )+ .await+ .unwrap()+ .is_empty());}// ── core-managed drafts (F5) ─────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/flows/ops_resume_compatibility_tests.rs b/crates/openhuman-core/src/flows/ops_resume_compatibility_tests.rsindex 2ed0e9975d..a9d2e06784 100644--- a/crates/openhuman-core/src/flows/ops_resume_compatibility_tests.rs+++ b/crates/openhuman-core/src/flows/ops_resume_compatibility_tests.rs@@ -141,12 +141,10 @@ async fn flows_resume_marks_a_checkpoint_with_an_incompatible_saved_child_failedlet run_row = flows_get_run(&config, &thread_id).await.unwrap().value;assert_eq!(run_row.status, "failed");assert!(run_row.pending_approvals.is_empty());- assert!(- run_row- .error- .as_deref()- .is_some_and(|value| value.contains(UNSUPPORTED_NESTED_CONDITIONAL_FAN_IN))- );+ assert!(run_row+ .error+ .as_deref()+ .is_some_and(|value| value.contains(UNSUPPORTED_NESTED_CONDITIONAL_FAN_IN)));let flow = flows_get(&config, &created.value.id).await.unwrap().value;assert_eq!(flow.last_status.as_deref(), Some("failed"));}diff --git a/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs b/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rsindex 24bbeac9bf..7a946119ae 100644--- a/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs+++ b/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs@@ -3,19 +3,17 @@ use super::*;fn insert_parked_run(config: &Config, flow_id: &str, run_id: &str) {let now = Utc::now().to_rfc3339();store::insert_flow_run(config, run_id, flow_id, run_id, &now).unwrap();- assert!(- store::finish_flow_run(- config,- run_id,- "pending_approval",- &now,- &[],- &["gate".into()],- None,- Some("parked-graph"),- )- .unwrap()- );+ assert!(store::finish_flow_run(+ config,+ run_id,+ "pending_approval",+ &now,+ &[],+ &["gate".into()],+ None,+ Some("parked-graph"),+ )+ .unwrap());}#[tokio::test]diff --git a/crates/openhuman-core/src/flows/ops_tests.rs b/crates/openhuman-core/src/flows/ops_tests.rsindex 0b880a5450..c45fd87db2 100644--- a/crates/openhuman-core/src/flows/ops_tests.rs+++ b/crates/openhuman-core/src/flows/ops_tests.rs@@ -342,7 +342,7 @@ fn graph(value: Value) -> WorkflowGraph {fn seed_app_session_for_gate_test(tmp: &TempDir) {use crate::security::credentials::{- APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME,+ AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME,};// `verify_session_active` reads from `config.config_path.parent()`, which// `test_config` sets to `tmp.path()` itself (distinct from@@ -365,7 +365,7 @@ fn seed_app_session_for_gate_test(tmp: &TempDir) {// so none of this touches a live Composio backend.use crate::integrations::composio::catalog::{- ProbedOutputSample, ToolContract, seed_live_catalog_cache, seed_probe_cache,+ seed_live_catalog_cache, seed_probe_cache, ProbedOutputSample, ToolContract,};fn seeded_slack_send_contract() -> ToolContract {diff --git a/crates/openhuman-core/src/flows/ops_tool_contract_and_wiring_warnings_tests.rs b/crates/openhuman-core/src/flows/ops_tool_contract_and_wiring_warnings_tests.rsindex 877a4c1ef9..39f95c8e94 100644--- a/crates/openhuman-core/src/flows/ops_tool_contract_and_wiring_warnings_tests.rs+++ b/crates/openhuman-core/src/flows/ops_tool_contract_and_wiring_warnings_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::integrations::composio::catalog::{ToolContract, seed_live_catalog_cache};+use crate::integrations::composio::catalog::{seed_live_catalog_cache, ToolContract};fn seeded_alias_contract() -> ToolContract {ToolContract {diff --git a/crates/openhuman-core/src/flows/recovery.rs b/crates/openhuman-core/src/flows/recovery.rsindex 9d4a06c16d..8fe1655cf4 100644--- a/crates/openhuman-core/src/flows/recovery.rs+++ b/crates/openhuman-core/src/flows/recovery.rs@@ -39,13 +39,9 @@ pub(crate) async fn expire_parked_runs(ctx: &DispatchCtx, config: &Config) -> us/// callback. The module applies the boot floor and live-actor/lease checks and/// returns only rows it changed; the runs adapter handles event projection and/// releases retained callback state for those rows.-pub(crate) async fn sweep_orphaned_runs_on_boot(- ctx: &DispatchCtx,- config: &Config,-) -> usize {- if tinyflows_catalog::run_management::boot_sweep_plan(- crate::storage::installed_is_shared(),- ) == tinyflows_catalog::run_management::BootSweepPlan::Nothing+pub(crate) async fn sweep_orphaned_runs_on_boot(ctx: &DispatchCtx, config: &Config) -> usize {+ if tinyflows_catalog::run_management::boot_sweep_plan(crate::storage::installed_is_shared())+ == tinyflows_catalog::run_management::BootSweepPlan::Nothing{tracing::info!(target: "flows", "[flows] boot sweep: skipped, the storage backend is shared");return 0;@@ -61,14 +57,17 @@ pub(crate) async fn sweep_orphaned_runs_on_boot(}async fn sweep_one_scope(ctx: &DispatchCtx, config: &Config) -> usize {- let storage: Arc<CatalogStorageRegistration> =- match crate::flows::catalog_storage::register(ctx, config).await {- Ok(storage) => storage,- Err(error) => {- tracing::warn!(target: "flows", %error, "[flows] boot sweep: CatalogStorage registration failed");- return 0;- }- };+ let storage: Arc<CatalogStorageRegistration> = match crate::flows::catalog_storage::register(+ ctx, config,+ )+ .await+ {+ Ok(storage) => storage,+ Err(error) => {+ tracing::warn!(target: "flows", %error, "[flows] boot sweep: CatalogStorage registration failed");+ return 0;+ }+ };match runs_adapter::boot_sweep(ctx, config, storage).await {Ok(response) => response.interrupted.len(),diff --git a/crates/openhuman-core/src/flows/store.rs b/crates/openhuman-core/src/flows/store.rsindex 040f248315..8bd3ccb0f7 100644--- a/crates/openhuman-core/src/flows/store.rs+++ b/crates/openhuman-core/src/flows/store.rs@@ -5,8 +5,8 @@//! requests and back. Run lifecycle and checkpoint records are owned by the//! Runs adapter, not this definition client.-use anyhow::{Result, anyhow};-use serde::{Serialize, de::DeserializeOwned};+use anyhow::{anyhow, Result};+use serde::{de::DeserializeOwned, Serialize};use serde_json::Value;use std::path::PathBuf;use tinyflows_bus::catalog::{diff --git a/crates/openhuman-core/src/modules/tinyflows.rs b/crates/openhuman-core/src/modules/tinyflows.rsindex 1e6bfb7338..96e07fc616 100644--- a/crates/openhuman-core/src/modules/tinyflows.rs+++ b/crates/openhuman-core/src/modules/tinyflows.rs@@ -57,7 +57,7 @@ pub(crate) fn disabled_message() -> String {mod imp {#[cfg(not(test))]use super::MODULE_ID;- use super::{HOST_BUS_NAME, ServedObjectRegistration, disabled_message};+ use super::{disabled_message, ServedObjectRegistration, HOST_BUS_NAME};use crate::config::Config;#[cfg(not(test))]use crate::modules::ops;@@ -387,7 +387,7 @@ pub(crate) use imp::{#[cfg(not(feature = "modules"))]mod imp {- use super::{ServedObjectRegistration, disabled_message};+ use super::{disabled_message, ServedObjectRegistration};use crate::config::Config;fn unavailable(config: &Config) -> String {diff --git a/crates/openhuman-core/src/modules/tinyflows_fixture.rs b/crates/openhuman-core/src/modules/tinyflows_fixture.rsindex ab94e8cf2d..f1c2a78ae7 100644--- a/crates/openhuman-core/src/modules/tinyflows_fixture.rs+++ b/crates/openhuman-core/src/modules/tinyflows_fixture.rs@@ -1,8 +1,8 @@//! The tinyflows module linked into the test binary: the `static-link` build of//! `tinyflows-module`, attached once to the process-wide module host.-use crate::config::Config;use crate::config::schema::ModuleSourceMode;+use crate::config::Config;use crate::modules::{linked::register_linked, ops};use tokio::sync::OnceCell;diff --git a/crates/openhuman-core/src/modules/tinyflows_tests.rs b/crates/openhuman-core/src/modules/tinyflows_tests.rsindex 62870ddaa3..c54d5bcb84 100644--- a/crates/openhuman-core/src/modules/tinyflows_tests.rs+++ b/crates/openhuman-core/src/modules/tinyflows_tests.rs@@ -334,12 +334,10 @@ async fn serving_caps_host_advertises_v2_without_replacing_other_peer_manifest_eassert_eq!(caps_host.speaks, tinybus::Version::new(2, 0, 0));assert_eq!(announced.name, prior_name);assert_eq!(announced.version, prior_version);- assert!(- announced- .provides- .iter()- .any(|item| item.interface.as_str() == "ai.tinyhumans.openhuman.TestPreserved")- );+ assert!(announced+ .provides+ .iter()+ .any(|item| item.interface.as_str() == "ai.tinyhumans.openhuman.TestPreserved"));assert_eq!(announced.consumes, prior_consumes);let proxy = connection