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(tests): remove unused test files
Steven Enamakel9f05e7f18f10
diff --git a/crates/openhuman-core/src/agent/artifacts/store_tests.rs b/crates/openhuman-core/src/agent/artifacts/store_tests.rsindex 93d3ce29b2..f481156d58 100644--- a/crates/openhuman-core/src/agent/artifacts/store_tests.rs+++ b/crates/openhuman-core/src/agent/artifacts/store_tests.rs@@ -80,7 +80,7 @@ async fn list_pagination() {for i in 0..5_u32 {let ts = Utc- .with_ymd_and_hms(2025, 1, i as u32 + 1, 0, 0, 0)+ .with_ymd_and_hms(2025, 1, i + 1, 0, 0, 0).unwrap();save_artifact_meta(tmp.path(), &make_meta(&format!("id-{i}"), "x", ts)).awaitdiff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rsindex 85c4171c28..d7c1155e80 100644--- a/crates/openhuman-core/src/agent/bus.rs+++ b/crates/openhuman-core/src/agent/bus.rs@@ -435,7 +435,7 @@ wherecrate::core::bus_testing::mock_bus_stub::<AgentTurnRequest, AgentTurnResponse, F, Fut, _>(AGENT_RUN_TURN_METHOD,handler,- || register_agent_handlers(),+ register_agent_handlers,).await}diff --git a/crates/openhuman-core/src/agent/bus_tests.rs b/crates/openhuman-core/src/agent/bus_tests.rsindex 05f006900a..a7b3257808 100644--- a/crates/openhuman-core/src/agent/bus_tests.rs+++ b/crates/openhuman-core/src/agent/bus_tests.rs@@ -106,8 +106,7 @@ async fn register_agent_handlers_exposes_run_turn_on_global_registry() {// other test that installs a handler override (e.g. the channel// dispatch integration tests in `runtime_dispatch.rs`).register_agent_handlers();- let registry = Some(crate::core::bus::BUS.native())- .expect("native registry should be initialized after register_agent_handlers");+ let registry = crate::core::bus::BUS.native();assert!(registry.is_registered(AGENT_RUN_TURN_METHOD),"`{AGENT_RUN_TURN_METHOD}` should be registered on the global native registry"diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rsindex f3a7e128e1..9c99ac6757 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs@@ -14,7 +14,7 @@ use tinyagents_graph::orchestration::OrchestrationTaskStatus;use tinyagents_harness::ids::TaskId;use tinyagents_harness::run_queue::{QueueLane, RunQueue};use tinyagents_harness::steering::{- SteeringCommand, SteeringCommandKind, SteeringHandle, SteeringPolicy,+ SteeringCommand, SteeringHandle,};use tinyagents_orchestration::subagent::FinishedOutcome;use tinyagents_orchestration::subagent::{diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rsindex b7d7104158..f8954723c1 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rs@@ -2,7 +2,7 @@ use super::*;#[test]fn metadata_methods_expose_execute_permission_and_schema() {- let tool = SpawnParallelAgentsTool::default();+ let tool = SpawnParallelAgentsTool;assert_eq!(tool.name(), "spawn_parallel_agents");assert!(tool.description().contains("independent sub-agent tasks"));assert_eq!(tool.permission_level(), PermissionLevel::Execute);@@ -21,7 +21,7 @@ fn ownership_boundary_is_prepended_when_present() {#[test]fn schema_advertises_isolation_and_base_ref() {- let tool = SpawnParallelAgentsTool::default();+ let tool = SpawnParallelAgentsTool;let schema = tool.parameters_schema();let props = &schema["properties"]["tasks"]["items"]["properties"];assert_eq!(props["isolation"]["enum"][0], "none");diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rsindex b8ab842398..d951b004d0 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs@@ -336,8 +336,7 @@ impl ParallelHarnessProvider {sleep(Duration::from_millis(5)).await;}- let response = (|| -> tinyinference_llm::Result<ModelResponse> {- if flattened.contains(RESEARCH_PROMPT_CANARY) {+ let response = (if flattened.contains(RESEARCH_PROMPT_CANARY) {if flattened.contains("research-step-3-ok") {Ok(text_response(RESEARCH_DONE_CANARY))} else if flattened.contains("research-step-2-ok") {@@ -379,8 +378,7 @@ impl ParallelHarnessProvider {Err(tinyinference_llm::Error::Model(format!("unexpected subagent payload: {flattened}")))- }- })();+ });self.state.active_subagent_callsdiff --git a/crates/openhuman-core/src/agent/prompts/mod_tests.rs b/crates/openhuman-core/src/agent/prompts/mod_tests.rsindex 3cf55d1ede..00f92a46f6 100644--- a/crates/openhuman-core/src/agent/prompts/mod_tests.rs+++ b/crates/openhuman-core/src/agent/prompts/mod_tests.rs@@ -247,7 +247,8 @@ fn swapping_deferred_entries_leaves_the_bridge_in_their_place() {visible.contains("tool_search") && !visible.contains("tool_call"),"`tool_search` replaces them; there is no `tool_call` wrapper: {visible:?}");- for name in ["tool_search"] {+ {+ let name = "tool_search";assert!(tools.iter().any(|tool| tool.name == name&& tooldiff --git a/crates/openhuman-core/src/agent/registry/agents/loader_tests_orchestrator_tier_tests.rs b/crates/openhuman-core/src/agent/registry/agents/loader_tests_orchestrator_tier_tests.rsindex ad1c3764ed..3c7a5bfbe1 100644--- a/crates/openhuman-core/src/agent/registry/agents/loader_tests_orchestrator_tier_tests.rs+++ b/crates/openhuman-core/src/agent/registry/agents/loader_tests_orchestrator_tier_tests.rs@@ -103,7 +103,8 @@ fn orchestrator_reaches_mcp_directly_and_skills_through_hand_offs() {}ToolScope::Wildcard => panic!("orchestrator must have a Named tool scope"),}- for specialist in ["skill_setup"] {+ {+ let specialist = "skill_setup";assert!(def.subagents.iter()diff --git a/crates/openhuman-core/src/agent/session_host/typed_transcript_compat_tests.rs b/crates/openhuman-core/src/agent/session_host/typed_transcript_compat_tests.rsindex 54c6062958..545389b954 100644--- a/crates/openhuman-core/src/agent/session_host/typed_transcript_compat_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/typed_transcript_compat_tests.rs@@ -307,8 +307,7 @@ fn typed_and_legacy_rows_bridge_to_identical_model_messages() {AssistantMessage, ContentBlock, ImageRef, Message, ToolMessage, UserMessage,};- let messages = vec![- Message::User(UserMessage {+ let messages = [Message::User(UserMessage {content: vec![ContentBlock::Text("see ".into()),ContentBlock::Image(ImageRef {@@ -329,8 +328,7 @@ fn typed_and_legacy_rows_bridge_to_identical_model_messages() {content: vec![ContentBlock::Text("echo:x".into())],trusted_verbatim: false,artifact: None,- }),- ];+ })];let rows: Vec<_> = messages.iter().filter_map(message_to_native_chat_message)@@ -368,9 +366,7 @@ fn regenerate_typed_session_compat() {let legacy = std::fs::read_to_string(fixture(&format!("{name}.jsonl"))).expect("raw");let tools = legacy.lines()- .filter_map(|line| serde_json::from_str::<Value>(line).ok())- .filter(|value| value.get("kind").and_then(Value::as_str) == Some("tools"))- .next_back()+ .filter_map(|line| serde_json::from_str::<Value>(line).ok()).rfind(|value| value.get("kind").and_then(Value::as_str) == Some("tools")).map(|value| value["tools"].clone()).expect("legacy fixture records its tools");append_tools_record(&path, &tools).expect("tools record");diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph_failed_run_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph_failed_run_tests.rsindex e71deff07b..9cabdbfa1f 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph_failed_run_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph_failed_run_tests.rs@@ -111,7 +111,7 @@ async fn failed_subagent_run_keeps_its_unanswered_round_out_of_history() {.lines().filter_map(|line| serde_json::from_str::<serde_json::Value>(line).ok()).filter(|line| line.get("role").and_then(|role| role.as_str()) == Some("assistant"))- .last()+ .next_back().expect("failure marker line");assert_eq!(marker_line.get("iteration").and_then(|n| n.as_u64()),diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rs b/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rsindex 5cfad3cf5a..615c76aa5b 100644--- a/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rs@@ -62,7 +62,7 @@ fn load_real_toolkit(toolkit: &str) -> Vec<ConnectedIntegrationTool> {fn assert_in_top(actions: &[ConnectedIntegrationTool], hits: &[usize], wanted: &str, label: &str) {let top_names: Vec<&str> = hits.iter().map(|&i| actions[i].name.as_str()).collect();assert!(- top_names.iter().any(|n| *n == wanted),+ top_names.contains(&wanted),"[{label}] '{wanted}' not in top {k}: {top_names:?}",k = hits.len());diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture_tests.rsindex f0325fb438..9fecfe945e 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture_tests.rs@@ -67,7 +67,7 @@ async fn same_tool_calls_keep_completion_and_failure_records_by_call_id() {let recorded = failure_map.lock().expect("failure lookup");assert_eq!(recorded.len(), 2, "same tool names cannot overwrite calls");- assert_eq!(recorded["echo-success"].0, true);- assert_eq!(recorded["echo-failure"].0, false);+ assert!(recorded["echo-success"].0);+ assert!(!recorded["echo-failure"].0);assert!(recorded["echo-failure"].1.is_some());}diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rsindex 97cf016c81..2c4eb7660a 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rs@@ -102,7 +102,7 @@ fn non_owner_middleware_at(allowed: PermissionLevel) -> ToolPolicyMiddleware {};ToolPolicyMiddleware::new(- Arc::new(crate::agent::tool_policy::AllowAllToolPolicy::default()),+ Arc::new(crate::agent::tool_policy::AllowAllToolPolicy),session,vec![tools],"sess".to_string(),@@ -140,7 +140,7 @@ fn desktop_approval_bypass_skips_only_require_approval_channel_verdict() {.collect(),};ToolPolicyMiddleware::new(- Arc::new(crate::agent::tool_policy::AllowAllToolPolicy::default()),+ Arc::new(crate::agent::tool_policy::AllowAllToolPolicy),session,vec![Arc::new(vec![Box::new(RoutingFakeTool(name))])],"sess".to_owned(),@@ -288,7 +288,7 @@ async fn a_session_without_the_delegate_is_not_told_to_call_it() {decisions: [allow(USE_SKILL)].into_iter().collect(),};let mw = ToolPolicyMiddleware::new(- Arc::new(crate::agent::tool_policy::AllowAllToolPolicy::default()),+ Arc::new(crate::agent::tool_policy::AllowAllToolPolicy),session,vec![tools],"sess".to_string(),@@ -349,7 +349,7 @@ async fn use_skill_reaches_a_withheld_packed_tool() {);let mw = ToolPolicyMiddleware::new(- Arc::new(crate::agent::tool_policy::AllowAllToolPolicy::default()),+ Arc::new(crate::agent::tool_policy::AllowAllToolPolicy),session,vec![tools],"sess".to_string(),@@ -411,7 +411,7 @@ async fn a_prompt_hidden_delegate_is_not_offered_as_a_direct_route() {&visible,);let mw = ToolPolicyMiddleware::new(- Arc::new(crate::agent::tool_policy::AllowAllToolPolicy::default()),+ Arc::new(crate::agent::tool_policy::AllowAllToolPolicy),session,vec![tools],"sess".to_string(),diff --git a/crates/openhuman-core/src/backend/transport/install.rs b/crates/openhuman-core/src/backend/transport/install.rsindex d14471f78b..ff84519baf 100644--- a/crates/openhuman-core/src/backend/transport/install.rs+++ b/crates/openhuman-core/src/backend/transport/install.rs@@ -93,7 +93,7 @@ pub fn resolve_backend_transport() -> Result<Arc<dyn BackendTransport>, BackendT}#[cfg(test)]{- return Ok(super::plain::PlainHttpTransport::fresh());+ Ok(super::plain::PlainHttpTransport::fresh())}#[cfg(not(test))]{diff --git a/crates/openhuman-core/src/channels/bus_tests.rs b/crates/openhuman-core/src/channels/bus_tests.rsindex 948a39d410..85848ffd7d 100644--- a/crates/openhuman-core/src/channels/bus_tests.rs+++ b/crates/openhuman-core/src/channels/bus_tests.rs@@ -14,7 +14,7 @@ fn subscriber_metadata_is_stable() {#[tokio::test]async fn unrelated_events_are_ignored() {- ChannelInboundSubscriber::default()+ ChannelInboundSubscriber.handle(&DomainEvent::SystemStartup {component: "test".into(),})diff --git a/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs b/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rsindex 801d45ad56..0c967271a2 100644--- a/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs+++ b/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs@@ -193,8 +193,8 @@ async fn connect_imessage_persists_allowed_contacts() {.iter().filter_map(toml::Value::as_str).collect();- assert!(contacts.iter().any(|c| *c == "+15551234567"));- assert!(contacts.iter().any(|c| *c == "[email protected]"));+ assert!(contacts.contains(&"+15551234567"));+ assert!(contacts.contains(&"[email protected]"));}#[tokio::test]diff --git a/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs b/crates/openhuman-core/src/config/ops_loader_and_search_tests.rsindex c47eccb9ce..22a89930d1 100644--- a/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs+++ b/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs@@ -368,7 +368,7 @@ fn workspace_onboarding_flag_exists_returns_false_for_fresh_workspace() {let tmp = tempdir().unwrap();let res = workspace_onboarding_flag_exists(tmp.path().join("workspace"), "onboarding.done").expect("flag check ok");- assert_eq!(res.value, false);+ assert!(!res.value);}#[test]@@ -390,7 +390,7 @@ fn workspace_onboarding_flag_exists_true_when_file_present() {std::fs::create_dir_all(&ws).unwrap();std::fs::write(ws.join("onboarding.done"), "").unwrap();let res = workspace_onboarding_flag_exists(ws, "onboarding.done").expect("flag check ok");- assert_eq!(res.value, true);+ assert!(res.value);}#[tokio::test]diff --git a/crates/openhuman-core/src/config/schema/agent_memory_window_tests_tests.rs b/crates/openhuman-core/src/config/schema/agent_memory_window_tests_tests.rsindex ad4958840d..e77eb9badc 100644--- a/crates/openhuman-core/src/config/schema/agent_memory_window_tests_tests.rs+++ b/crates/openhuman-core/src/config/schema/agent_memory_window_tests_tests.rs@@ -160,7 +160,7 @@ fn empty_channel_permissions_with_existing_channels_migrates_to_execute() {let mut cfg = AgentConfig::default();assert!(cfg.channel_permissions.is_empty());- let known = vec!["telegram".to_string(), "discord".to_string()];+ let known = ["telegram".to_string(), "discord".to_string()];let migrated = cfg.migrate_channel_permissions_if_legacy(known.iter());assert!(migrated, "legacy install must migrate");@@ -177,8 +177,8 @@ fn empty_channel_permissions_with_existing_channels_migrates_to_execute() {#[test]fn migrate_channel_permissions_idempotent() {let mut cfg = AgentConfig::default();- cfg.migrate_channel_permissions_if_legacy(vec!["telegram".to_string()].iter());- let again = cfg.migrate_channel_permissions_if_legacy(vec!["telegram".to_string()].iter());+ cfg.migrate_channel_permissions_if_legacy(["telegram".to_string()].iter());+ let again = cfg.migrate_channel_permissions_if_legacy(["telegram".to_string()].iter());assert!(!again, "second migration call must be a no-op");}diff --git a/crates/openhuman-core/src/config/schema/load_migration_tests.rs b/crates/openhuman-core/src/config/schema/load_migration_tests.rsindex 7787f845b3..2b5f1ad445 100644--- a/crates/openhuman-core/src/config/schema/load_migration_tests.rs+++ b/crates/openhuman-core/src/config/schema/load_migration_tests.rs@@ -413,7 +413,7 @@ bot_token = "{stale_ciphertext}".as_ref().map(|d| d.bot_token.as_str());assert!(- discord_token.map_or(true, |t| t.is_empty()),+ discord_token.is_none_or(|t| t.is_empty()),"Expected discord.bot_token to be cleared after decryption failure, got: {discord_token:?}");}diff --git a/crates/openhuman-core/src/config/schemas_tests.rs b/crates/openhuman-core/src/config/schemas_tests.rsindex eb23573626..b916aead7c 100644--- a/crates/openhuman-core/src/config/schemas_tests.rs+++ b/crates/openhuman-core/src/config/schemas_tests.rs@@ -270,7 +270,7 @@ fn deserialize_params_parses_workspace_onboarding_flag_set_params() {let mut m = Map::new();m.insert("value".into(), Value::Bool(true));let out: WorkspaceOnboardingFlagSetParams = deserialize_params(m).unwrap();- assert_eq!(out.value, true);+ assert!(out.value);assert!(out.flag_name.is_none());}diff --git a/crates/openhuman-core/src/core/all_tests.rs b/crates/openhuman-core/src/core/all_tests.rsindex 3e47be40c7..31480a13ac 100644--- a/crates/openhuman-core/src/core/all_tests.rs+++ b/crates/openhuman-core/src/core/all_tests.rs@@ -38,7 +38,7 @@ fn grouped(controllers: Vec<RegisteredController>) -> Vec<GroupedController> {#[test]fn validate_registry_rejects_duplicate_namespace_function() {- let declared = vec![schema("dup", "fn", vec![]), schema("dup", "fn", vec![])];+ let declared = [schema("dup", "fn", vec![]), schema("dup", "fn", vec![])];let registered = vec![RegisteredController {schema: declared[0].clone(),@@ -56,7 +56,7 @@ fn validate_registry_rejects_duplicate_namespace_function() {#[test]fn validate_registry_rejects_duplicate_required_inputs() {- let declared = vec![schema(+ let declared = [schema("doctor","models",vec![@@ -85,11 +85,9 @@ fn validate_registry_rejects_duplicate_required_inputs() {#[test]fn validate_registry_accepts_valid_registry() {- let declared = vec![- schema("ns1", "fn1", vec![]),+ let declared = [schema("ns1", "fn1", vec![]),schema("ns1", "fn2", vec![]),- schema("ns2", "fn1", vec![]),- ];+ schema("ns2", "fn1", vec![])];let registered = declared.iter().map(|s| RegisteredController {@@ -767,7 +765,7 @@ fn validate_params_json_type_accepts_anything() {#[test]fn validate_registry_rejects_empty_namespace() {- let declared = vec![schema("", "fn", vec![])];+ let declared = [schema("", "fn", vec![])];let registered = vec![RegisteredController {schema: declared[0].clone(),handler: noop_handler,@@ -778,7 +776,7 @@ fn validate_registry_rejects_empty_namespace() {#[test]fn validate_registry_rejects_empty_function() {- let declared = vec![schema("ns", "", vec![])];+ let declared = [schema("ns", "", vec![])];let registered = vec![RegisteredController {schema: declared[0].clone(),handler: noop_handler,@@ -791,7 +789,7 @@ fn validate_registry_rejects_empty_function() {fn validate_registry_rejects_whitespace_only_namespace() {// `trim().is_empty()` is the invariant — a namespace of " " must// be rejected to prevent `openhuman. _fn` nonsense RPC method names.- let declared = vec![schema(" ", "fn", vec![])];+ let declared = [schema(" ", "fn", vec![])];let registered = vec![RegisteredController {schema: declared[0].clone(),handler: noop_handler,@@ -1441,7 +1439,7 @@ fn domain_group_all_lists_every_variant() {"DomainGroup::ALL and DomainGroup::COUNT disagree — a variant was added \to one but not the other");- let mut seen = vec![false; DomainGroup::COUNT];+ let mut seen = [false; DomainGroup::COUNT];for g in DomainGroup::ALL {let i = g.index();assert!(diff --git a/crates/openhuman-core/src/integrations/composio/client/network_tests.rs b/crates/openhuman-core/src/integrations/composio/client/network_tests.rsindex d1ad278ffd..d44c535eea 100644--- a/crates/openhuman-core/src/integrations/composio/client/network_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/client/network_tests.rs@@ -87,7 +87,7 @@ fn no_proxy_entries_travel_with_the_proxy_only() {let mut without = proxy(None, Some("http://h:2"), None);without.no_proxy = vec!["localhost".into()];let config = with_proxy(without, || module_transport(HTTPS_BASE));- assert!(config.map_or(true, |c| c.no_proxy.is_empty()));+ assert!(config.is_none_or(|c| c.no_proxy.is_empty()));}#[test]diff --git a/crates/openhuman-core/src/integrations/composio/ops_tests.rs b/crates/openhuman-core/src/integrations/composio/ops_tests.rsindex 6e6474f264..ab303374a4 100644--- a/crates/openhuman-core/src/integrations/composio/ops_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/ops_tests.rs@@ -182,7 +182,7 @@ fn integration(toolkit: &str, connected: bool) -> ConnectedIntegration {connected,connections: if connected {vec![IntegrationConnection {- connection_id: format!("c-1"),+ connection_id: "c-1".to_string(),label: None,is_default: true,}]diff --git a/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rs b/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rsindex 4c2de45a60..d62b78a442 100644--- a/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rs@@ -52,7 +52,7 @@ fn list_toolkits_tool_metadata_is_stable() {assert!(s.get("required").and_then(|r| r.as_array())- .map_or(true, |a| a.is_empty()));+ .is_none_or(|a| a.is_empty()));}#[test]diff --git a/crates/openhuman-core/src/integrations/file_storage/tools_tests.rs b/crates/openhuman-core/src/integrations/file_storage/tools_tests.rsindex e00009e183..bd8202cdec 100644--- a/crates/openhuman-core/src/integrations/file_storage/tools_tests.rs+++ b/crates/openhuman-core/src/integrations/file_storage/tools_tests.rs@@ -241,8 +241,8 @@ fn sanitize_filename_strips_separators_and_traversal() {Some("evil.sh"));assert_eq!(sanitize_filename("a/b\\c.txt").as_deref(), Some("c.txt"));- assert_eq!(sanitize_filename("..").is_none(), true);- assert_eq!(sanitize_filename(" ").is_none(), true);+ assert!(sanitize_filename("..").is_none());+ assert!(sanitize_filename(" ").is_none());}// ── End-to-end flows against a mock backend (wiremock) ──────────────diff --git a/crates/openhuman-core/src/media/generation/tools_tests.rs b/crates/openhuman-core/src/media/generation/tools_tests.rsindex 4e46914564..605c8e856a 100644--- a/crates/openhuman-core/src/media/generation/tools_tests.rs+++ b/crates/openhuman-core/src/media/generation/tools_tests.rs@@ -19,7 +19,7 @@ fn tools(action_dir: &Path) -> Vec<Box<dyn Tool>> {},action_dir,&action_dir.join("workspace"),- &action_dir.join("Files"),+ action_dir.join("Files"),tinyagents_harness::tinyinference_video::WaitPolicy::new(std::time::Duration::from_millis(1),std::time::Duration::from_secs(5),diff --git a/crates/openhuman-core/src/memory/auto_recall/auto_recall_tests.rs b/crates/openhuman-core/src/memory/auto_recall/auto_recall_tests.rsindex f9d6f3decc..a39aa93150 100644--- a/crates/openhuman-core/src/memory/auto_recall/auto_recall_tests.rs+++ b/crates/openhuman-core/src/memory/auto_recall/auto_recall_tests.rs@@ -360,7 +360,7 @@ fn render_block_keeps_untrusted_markers_balanced_under_any_budget() {let full = render_block(&[], &hits, None).chars().count();for cap in [0, 10, 60, 120, 200, 300, full - 1, full, full + 50] {let block = render_block(&[], &hits, Some(cap));- assert!(block.chars().count() <= cap.max(0), "cap {cap}: {block}");+ assert!(block.chars().count() <= cap, "cap {cap}: {block}");assert_eq!(block.matches("<untrusted-source ").count(),block.matches("</untrusted-source>").count(),diff --git a/crates/openhuman-core/src/memory/sync/composio/bus_tests.rs b/crates/openhuman-core/src/memory/sync/composio/bus_tests.rsindex 8405b51bd2..a62b27764b 100644--- a/crates/openhuman-core/src/memory/sync/composio/bus_tests.rs+++ b/crates/openhuman-core/src/memory/sync/composio/bus_tests.rs@@ -191,7 +191,7 @@ fn composio_config_triage_disabled_toolkit_match() {assert!(!cfg.triage_disabled_toolkits.iter()- .any(|t| t.to_ascii_lowercase() == "github"),+ .any(|t| t.eq_ignore_ascii_case("github")),"github should not match");}@@ -299,8 +299,8 @@ fn subscriber_default_impls_equal_new() {// Call Default just to cover the impl block. Since both are// unit structs, equality is implicit — we just exercise the// constructor to bump coverage on the Default line.- let _ = ComposioTriggerSubscriber::default();- let _ = ComposioConnectionCreatedSubscriber::default();+ let _ = ComposioTriggerSubscriber;+ let _ = ComposioConnectionCreatedSubscriber;}#[tokio::test]@@ -404,7 +404,7 @@ fn config_changed_subscriber_has_stable_name_and_domain() {let s = ComposioConfigChangedSubscriber::new();assert_eq!(s.name(), "composio::config_changed");assert_eq!(s.domains(), Some(["composio"].as_ref()));- let _ = ComposioConfigChangedSubscriber::default();+ let _ = ComposioConfigChangedSubscriber;}#[test]diff --git a/crates/openhuman-core/src/security/credentials/core_tests.rs b/crates/openhuman-core/src/security/credentials/core_tests.rsindex 8104f2c628..4edf035b80 100644--- a/crates/openhuman-core/src/security/credentials/core_tests.rs+++ b/crates/openhuman-core/src/security/credentials/core_tests.rs@@ -73,7 +73,7 @@ fn state_dir_from_config_falls_back_to_dot_when_no_parent() {let dir = state_dir_from_config(&config);// Either "." (our fallback) or "" (parent of a path with just a// filename) is acceptable — both behave as cwd.- assert!(dir == PathBuf::from(".") || dir.as_os_str().is_empty());+ assert!(dir == *"." || dir.as_os_str().is_empty());}#[test]diff --git a/crates/openhuman-core/src/security/credentials/profiles_owner_only_tests.rs b/crates/openhuman-core/src/security/credentials/profiles_owner_only_tests.rsindex 49f756603a..5bb92dff21 100644--- a/crates/openhuman-core/src/security/credentials/profiles_owner_only_tests.rs+++ b/crates/openhuman-core/src/security/credentials/profiles_owner_only_tests.rs@@ -49,7 +49,7 @@ fn a_saved_store_file_is_owner_only() {#[cfg(unix)]assert_eq!(- mode_of(&path),+ mode_of(path),0o600,"the credential store must not be group/world readable");diff --git a/crates/openhuman-core/src/security/keyring/backend.rs b/crates/openhuman-core/src/security/keyring/backend.rsindex 55ccf48f36..3b33b1de08 100644--- a/crates/openhuman-core/src/security/keyring/backend.rs+++ b/crates/openhuman-core/src/security/keyring/backend.rs@@ -223,6 +223,12 @@ pub struct MockBackend {}#[cfg(test)]+impl Default for MockBackend {+ fn default() -> Self {+ Self::new()+ }+}+impl MockBackend {pub fn new() -> Self {Self {diff --git a/crates/openhuman-core/src/security/keyring/encrypted_store_key_management_tests.rs b/crates/openhuman-core/src/security/keyring/encrypted_store_key_management_tests.rsindex 77c5e95c35..092bc793f7 100644--- a/crates/openhuman-core/src/security/keyring/encrypted_store_key_management_tests.rs+++ b/crates/openhuman-core/src/security/keyring/encrypted_store_key_management_tests.rs@@ -253,7 +253,7 @@ fn malformed_key_file_rejected_not_panic() {let store = SecretStore::new(tmp.path(), true);// Write a 30-byte hex key (60 chars, even, decodes cleanly, wrong length).- fs::create_dir_all(&tmp.path()).unwrap();+ fs::create_dir_all(tmp.path()).unwrap();fs::write(&store.key_path, "aa".repeat(30)).unwrap();super::super::clear_cached_key(&store.key_path);diff --git a/crates/openhuman-core/src/security/policy/policy_action_dir_tests.rs b/crates/openhuman-core/src/security/policy/policy_action_dir_tests.rsindex d2e3a16399..3a10f40422 100644--- a/crates/openhuman-core/src/security/policy/policy_action_dir_tests.rs+++ b/crates/openhuman-core/src/security/policy/policy_action_dir_tests.rs@@ -6,7 +6,6 @@use super::*;use std::fs;-use std::path::Path as StdPath;/// The configured `action_dir` must be a read-write trusted root.///diff --git a/crates/openhuman-core/src/skills/preflight_tests.rs b/crates/openhuman-core/src/skills/preflight_tests.rsindex 8ce80e6d59..f59f6c5128 100644--- a/crates/openhuman-core/src/skills/preflight_tests.rs+++ b/crates/openhuman-core/src/skills/preflight_tests.rs@@ -227,7 +227,7 @@ async fn gate_passes_none_without_consulting_identity() {let calls = probes.calls.lock().unwrap();// The identity probe must not have been called.assert!(- !calls.iter().any(|c| *c == "composio_identity"),+ !calls.contains(&"composio_identity"),"identity_match=none must not probe identity, got {calls:?}");}diff --git a/crates/openhuman-core/src/skills/run_log_tests.rs b/crates/openhuman-core/src/skills/run_log_tests.rsindex 2c4ce1e8d8..73f77f87cb 100644--- a/crates/openhuman-core/src/skills/run_log_tests.rs+++ b/crates/openhuman-core/src/skills/run_log_tests.rs@@ -19,18 +19,14 @@ fn detect_repeated_line_catches_real_failure_modes() {// The exact text shapes we observed in run adcd2dfd (×23) and// dffae55d (×8). With defaults (min_len=30, min_count=4) both must// trip and the worst offender is returned.- let adcd = std::iter::repeat(- "Now I understand the structure. The keys need to go into the chunk files.",- )- .take(23)+ let adcd = std::iter::repeat_n("Now I understand the structure. The keys need to go into the chunk files.", 23).collect::<Vec<_>>().join("\n");let (line, n) = detect_repeated_line(&adcd, 30, 4).expect("must trip");assert_eq!(n, 23);assert!(line.contains("Now I understand the structure"));- let dffae = std::iter::repeat("Good, the repo is cloned. Let me narrow down the search.")- .take(8)+ let dffae = std::iter::repeat_n("Good, the repo is cloned. Let me narrow down the search.", 8).collect::<Vec<_>>().join("\n");let (_, n2) = detect_repeated_line(&dffae, 30, 4).expect("must trip");diff --git a/crates/openhuman-core/src/skills/runtime/run_machinery_tests.rs b/crates/openhuman-core/src/skills/runtime/run_machinery_tests.rsindex 4563e55b7b..e69de29bb2 100644--- a/crates/openhuman-core/src/skills/runtime/run_machinery_tests.rs+++ b/crates/openhuman-core/src/skills/runtime/run_machinery_tests.rs@@ -1 +0,0 @@-use super::*;diff --git a/crates/openhuman-core/src/skills/webhooks/bus_tests.rs b/crates/openhuman-core/src/skills/webhooks/bus_tests.rsindex 685c378257..910d1f3140 100644--- a/crates/openhuman-core/src/skills/webhooks/bus_tests.rs+++ b/crates/openhuman-core/src/skills/webhooks/bus_tests.rs@@ -26,7 +26,7 @@ fn error_body_is_base64_of_json_envelope() {#[test]fn default_equals_new_and_is_zero_sized() {// Both constructors produce the same unit-variant struct.- let _a = WebhookRequestSubscriber::default();+ let _a = WebhookRequestSubscriber;let _b = WebhookRequestSubscriber::new();// Zero-sized type — just asserting both compile and construct.assert_eq!(std::mem::size_of::<WebhookRequestSubscriber>(), 0);diff --git a/crates/openhuman-core/src/tools/impl/system/update_check_tests.rs b/crates/openhuman-core/src/tools/impl/system/update_check_tests.rsindex 06b2120175..c62d080cb0 100644--- a/crates/openhuman-core/src/tools/impl/system/update_check_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/update_check_tests.rs@@ -30,7 +30,7 @@ fn description_mentions_safety_and_companion_tool() {#[test]fn default_constructs_same_as_new() {- let a = UpdateCheckTool::default();+ let a = UpdateCheckTool;let b = UpdateCheckTool::new();assert_eq!(a.name(), b.name());}diff --git a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rsindex 21692d191f..3274dd0075 100644--- a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs+++ b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs@@ -336,10 +336,8 @@ fn a_direct_hand_off_closes_its_owners_pack_and_nothing_else() {// `hand_off_to_skill_setup` is a hypothetical UNPACKED hand-off to the// skills pack's owner (the real one, `setup_skills`, is packed now; see// `a_packed_hand_off_leaves_its_owners_pack_open`).- let delegates = vec![- delegate("hand_off_to_skill_setup", "skill_setup"),- delegate("create_image", "image_agent"),- ];+ let delegates = [delegate("hand_off_to_skill_setup", "skill_setup"),+ delegate("create_image", "image_agent")];let raw = registry_with_all(&["skill_registry_install","media_generate_image",diff --git a/crates/openhuman-core/src/web_chat/web_tests_rate_limit_classification_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_rate_limit_classification_tests.rsindex 7dd7981b7f..f2e673deee 100644--- a/crates/openhuman-core/src/web_chat/web_tests_rate_limit_classification_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests_rate_limit_classification_tests.rs@@ -149,8 +149,8 @@ fn classify_inference_error_rate_limited_returns_structured_retry_after_ms() {classified.source, "provider","upstream 429 must classify source=provider, not openhuman_budget");- assert_eq!(- classified.retryable, true,+ assert!(+ classified.retryable,"transient upstream 429 must allow same-thread retry");assert_eq!(