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
test(search): move error classification tests to their owning crate
Steven Enamakel5f2a09cb0cef
diff --git a/crates/openhuman-core/src/search/providers_tests.rs b/crates/openhuman-core/src/search/providers_tests.rsindex c804cc8829..bedb89026a 100644--- a/crates/openhuman-core/src/search/providers_tests.rs+++ b/crates/openhuman-core/src/search/providers_tests.rs@@ -1,4 +1,5 @@use super::*;+use tinysearch_bus::{parse_role, role_key, ROLES};use crate::config::{SearchProviderSettings, SEARCH_ROLES};fn config_with(providers: &[(&str, SearchProviderSettings)]) -> Config {diff --git a/crates/openhuman-core/src/search/tools_tests.rs b/crates/openhuman-core/src/search/tools_tests.rsindex 0d1a66959c..7681f39116 100644--- a/crates/openhuman-core/src/search/tools_tests.rs+++ b/crates/openhuman-core/src/search/tools_tests.rs@@ -30,11 +30,6 @@ fn classified_errors_become_actionable_messages() {"The search request was rejected: urls must not be empty");assert_eq!(user_facing_error("boom"), "Web search failed: boom");- assert_eq!(- error_code("x tinysearch.rate_limited: y"),- Some("rate_limited")- );- assert_eq!(error_code("plain"), None);}#[test]@@ -145,21 +140,6 @@ fn the_unavailable_verdict_tells_the_model_to_stop_rather_than_wait() {);}-#[test]-fn only_the_exhaustion_verdict_is_treated_as_final() {- // A rate limit clears on its own; a low balance and a rejected argument- // each have a message naming what to change. None of them may latch.- assert!(exhausts_providers(- "tinysearch.provider_unavailable: all down"- ));- assert!(!exhausts_providers("tinysearch.rate_limited: slow down"));- assert!(!exhausts_providers("tinysearch.insufficient_balance: 402"));- assert!(!exhausts_providers(- "tinysearch.invalid_arguments: urls must not be empty"- ));- assert!(!exhausts_providers("boom"));-}-#[test]fn a_tool_starts_with_nothing_recorded() {let config = nothing_usable_config();@@ -247,7 +227,7 @@ fn a_rejected_provider_key_names_the_provider_and_the_fix() {"Web search is unavailable: tavily rejected the configured API key (HTTP 401). Update \the key under Connections → Search, or remove it to use managed search.");- assert!(!exhausts_providers(+ assert!(!tinysearch_bus::errors::exhausts_providers("tinysearch.provider_unauthorized: tavily rejected the configured API key (HTTP 401)"));}@@ -262,7 +242,7 @@ fn a_rejected_backend_credential_asks_for_the_right_fix() {let key = backend_unauthorized_message(true);assert!(key.contains("rejected the configured API key"), "{key}");assert!(!key.contains("Sign in again"), "{key}");- assert!(!exhausts_providers(+ assert!(!tinysearch_bus::errors::exhausts_providers("tinysearch.backend_unauthorized: rejected"));}