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
fix(rpc): stop re-reporting cached module load failures
Steven Enamakel77bfa2a711b8
diff --git a/crates/openhuman-rpc/src/server/classify.rs b/crates/openhuman-rpc/src/server/classify.rsindex fa36fa7bbd..2c8205006a 100644--- a/crates/openhuman-rpc/src/server/classify.rs+++ b/crates/openhuman-rpc/src/server/classify.rs@@ -62,6 +62,14 @@ pub(super) enum FailureDisposition {/// error message (CodeRabbit on #4153), so the handler replaces it with/// [`USAGE_BACKOFF_CLIENT_MESSAGE`].UsageProbeBackoff,+ /// A native module failed to load earlier in this process and the cached+ /// failure is being returned again. tinybus never unloads a library, so+ /// the outcome cannot change before a restart; the load failure itself was+ /// reported once when the module resolved+ /// (`modules::ops::report_resolution_failure`). Re-reporting it on every+ /// call was the TAURI-RUST-117K flood (~1M events). Core's+ /// `ExpectedErrorKind::ModuleUnavailable` decides what qualifies.+ ModuleUnavailable,/// A downstream call (backend_api / integrations / provider) already/// demoted the underlying transient failure to a warn. Re-reporting at/// error level would re-create the Sentry noise the lower-layer demote was@@ -107,6 +115,10 @@ pub(super) fn classify_failure(message: &str, expected_user_state: bool) -> FailFailureDisposition::SessionExpired} else if observability::is_suppressed_usage_probe_backoff(message) {FailureDisposition::UsageProbeBackoff+ } else if observability::expected_error_kind(message)+ == Some(observability::ExpectedErrorKind::ModuleUnavailable)+ {+ FailureDisposition::ModuleUnavailable} else if observability::is_transient_message_failure(message) {FailureDisposition::TransientDownstream} else if let Some(unknown_method) =diff --git a/crates/openhuman-rpc/src/server/classify_tests.rs b/crates/openhuman-rpc/src/server/classify_tests.rsindex 1e64b80f48..015fbb2a72 100644--- a/crates/openhuman-rpc/src/server/classify_tests.rs+++ b/crates/openhuman-rpc/src/server/classify_tests.rs@@ -117,9 +117,9 @@ fn classify_failure_does_not_page_on_a_cached_module_load_failure() {"store_stats: backend failed: memory is unavailable: the memory module failed to load. \Restart the app to retry; the reason is in the log.",] {- assert_ne!(+ assert_eq!(classify_failure(message, false),- FailureDisposition::Unexpected,+ FailureDisposition::ModuleUnavailable,"{message}");}diff --git a/crates/openhuman-rpc/src/server/http/rpc_handler.rs b/crates/openhuman-rpc/src/server/http/rpc_handler.rsindex 14bc56a98b..4d5d731c2b 100644--- a/crates/openhuman-rpc/src/server/http/rpc_handler.rs+++ b/crates/openhuman-rpc/src/server/http/rpc_handler.rs@@ -94,6 +94,15 @@ pub async fn rpc_handler(State(state): State<AppState>, Json(req): Json<RpcReque);display_message = USAGE_BACKOFF_CLIENT_MESSAGE.to_string();}+ FailureDisposition::ModuleUnavailable => {+ tracing::warn!(+ method = %method,+ elapsed_ms = ms as u64,+ error = %display_message,+ "[rpc] cached module-load failure (reported once at resolution) — \+ not reporting to Sentry"+ );+ }FailureDisposition::TransientDownstream => {let redacted =tinyinference_core::sanitize::sanitize_api_error(&display_message);