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(archivist): surface user notification on local embedding failure\n\nWhen Ollama/archivist embedding fails during tree ingest, the else\nbranch at tree_ingest.rs:204-209 only logged tracing::warn!, giving\nthe user no signal that their local model is misconfigured. Add\nnotice_local_model_unavailable_once() — an AtomicBool-latched\nonce-per-process publisher — and call it on every non-corruption\ningest failure so the frontend can prompt the user to fix their\nlocal model configuration.\n\nCloses #5867\n
shanu57bd62230acd
diff --git a/src/openhuman/agent/harness/archivist/tree_ingest.rs b/src/openhuman/agent/harness/archivist/tree_ingest.rsindex bfee67a266..81b0511cbf 100644--- a/src/openhuman/agent/harness/archivist/tree_ingest.rs+++ b/src/openhuman/agent/harness/archivist/tree_ingest.rs@@ -206,6 +206,13 @@ impl ArchivistHook {"[archivist] tree ingest failed (non-fatal): source_id={source_id} \session={session_id} segment={segment_id} error={rendered}");+ // Surface a once-per-process user notification so the+ // frontend can prompt the user to check their local model+ // configuration (openhuman#5867). Without this the failure+ // is silent beyond the log line above.+ crate::openhuman::memory::tree::health::user_error::notice_local_model_unavailable_once(+ "archivist tree ingest",+ );}}}diff --git a/src/openhuman/memory/tree/health/user_error.rs b/src/openhuman/memory/tree/health/user_error.rsindex 2923dd315d..85d1668d1a 100644--- a/src/openhuman/memory/tree/health/user_error.rs+++ b/src/openhuman/memory/tree/health/user_error.rs@@ -108,6 +108,27 @@ pub(crate) fn notice_memory_module_unavailable_once(reason: &str) {});}+/// Once-per-process notice for an archivist embedding failure that indicates the+/// local model runtime is unavailable (openhuman#5867).+///+/// The archivist runs one embedding call per conversation segment; a broken+/// local runtime produces one failure per segment. Bounding the notification to+/// once-per-process matches the rationale of [`notice_corrupt_store_once`]:+/// per-segment notices would be a banner storm. `origin` names the producing+/// path — logged, never sent to the frontend.+pub(crate) fn notice_local_model_unavailable_once(origin: &str) {+ use std::sync::atomic::{AtomicBool, Ordering};+ static EMBED_UNAVAILABLE_NOTICED: AtomicBool = AtomicBool::new(false);+ if EMBED_UNAVAILABLE_NOTICED.swap(true, Ordering::Relaxed) {+ return;+ }+ log::warn!(+ "[archivist] action=broadcast_user_error kind={LOCAL_MODEL_UNAVAILABLE_KIND} \+ source={MEMORY_USER_ERROR_SOURCE} origin={origin}"+ );+ crate::openhuman::web_chat::publish_web_channel_event(local_model_unavailable_user_error());+}+/// host-side fallback for paths that only ever see text.pub(crate) fn is_corrupt_store_error(message: &str) -> bool {let msg = message.to_ascii_lowercase();diff --git a/src/openhuman/memory/tree/health/user_error_tests.rs b/src/openhuman/memory/tree/health/user_error_tests.rsindex 53081f2548..2bc0f3c51f 100644--- a/src/openhuman/memory/tree/health/user_error_tests.rs+++ b/src/openhuman/memory/tree/health/user_error_tests.rs@@ -99,6 +99,34 @@ fn wire_notice_is_latched_once_per_process() {notice_corrupt_store_once("test detector");}+/// Once-latch for the archivist embedding failure path (openhuman#5867):+/// one failed embedding per segment must not become one banner per segment.+#[test]+fn local_model_unavailable_notice_is_latched_once_per_process() {+ // Same contract as the corrupt-store latch: calling twice is safe and+ // the second invocation returns immediately on the latch path.+ notice_local_model_unavailable_once("test archivist");+ notice_local_model_unavailable_once("test archivist duplicate");+}++/// The local-model-unavailable payload carries the same no-leak contract as+/// its siblings: stable kind + source, never raw provider text or model ids.+#[test]+fn local_model_unavailable_payload_is_metadata_only() {+ let event = local_model_unavailable_user_error();+ assert_eq!(event.event, "user_error");+ assert_eq!(event.client_id, "system");+ assert_eq!(+ event.error_type.as_deref(),+ Some(LOCAL_MODEL_UNAVAILABLE_KIND)+ );+ assert_eq!(+ event.error_source.as_deref(),+ Some(MEMORY_USER_ERROR_SOURCE)+ );+ assert!(event.message.is_none(), "must not carry raw error prose");+}+// ── memory module unavailable ────────────────────────────────────────────────/// Same no-leak contract as the corrupt-store payload: stable kind + source,