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: repair runtime-removal CI and tighten layout limits
Steven Enamakel25365cddc002
diff --git a/README.md b/README.mdindex 2a519d74e4..b447103e70 100644--- a/README.md+++ b/README.md@@ -176,7 +176,7 @@ OpenHuman rethinks the parts that cost the most: how much text the AI has to rea<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/loadable-modules">How plug-ins work</a></p>-<p>Every feature, like search, documents or voice, plugs into one Rust bus, an idea borrowed from the <a href="https://dbus.freedesktop.org/">Linux system bus</a>. A feature loads only when needed, and if one gets stuck, the rest keep working.</p>+<p>Every feature, like search, documents or voice, plugs into one Rust bus, an idea borrowed from the <a href="https://packages.debian.org/stable/dbus">Linux system bus</a>. A feature loads only when needed, and if one gets stuck, the rest keep working.</p></td>diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_recovery_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_recovery_tests.rsnew file mode 100644index 0000000000..9ebbe88ca9--- /dev/null+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery_recovery_tests.rs@@ -0,0 +1,40 @@+use super::*;++#[tokio::test]+async fn a_mixed_batch_that_partly_gives_up_still_retries_the_rest() {+ let _g = test_guard().await;+ let ws = workspace();+ let w = ws.path();+ record(w, "bd-mixed", "sub-old", "old", "thread-mixed").await;+ let router = router_for_workspace(w);+ for _ in 0..(DEFAULT_MAX_ATTEMPTS - 1) {+ try_deliver_with(+ "thread-mixed".into(),+ router.clone(),+ |_t, _n| async move { Err::<String, String>("checkout failed".to_string()) },+ |_t, _n| async move { unreachable!("below the ceiling") },+ )+ .await;+ }+ // A newer result joins the old one, which is on its last attempt.+ record(w, "bd-mixed", "sub-new", "new", "thread-mixed").await;++ let gave_up = Arc::new(Mutex::new(String::new()));+ let sink = Arc::clone(&gave_up);+ let retry = try_deliver_with(+ "thread-mixed".into(),+ router,+ |_t, _n| async move { Err::<String, String>("checkout failed".to_string()) },+ move |_t, notice| async move {+ *sink.lock().expect("sink") = notice;+ },+ )+ .await;++ assert!(gave_up.lock().expect("sink").contains("sub-old"));+ assert!(+ retry.is_some(),+ "the newer record must still be rescheduled"+ );+ assert_eq!(pending_ids(w, "thread-mixed"), ["sub-new"]);+}diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rsindex fb2054dcd7..126e1b6ec9 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs@@ -714,41 +714,5 @@ async fn a_cancelled_turn_does_not_leave_the_thread_busy() {clear_busy(other);}-#[tokio::test]-async fn a_mixed_batch_that_partly_gives_up_still_retries_the_rest() {- let _g = test_guard().await;- let ws = workspace();- let w = ws.path();- record(w, "bd-mixed", "sub-old", "old", "thread-mixed").await;- let router = router_for_workspace(w);- for _ in 0..(DEFAULT_MAX_ATTEMPTS - 1) {- try_deliver_with(- "thread-mixed".into(),- router.clone(),- |_t, _n| async move { Err::<String, String>("checkout failed".to_string()) },- |_t, _n| async move { unreachable!("below the ceiling") },- )- .await;- }- // A newer result joins the old one, which is on its last attempt.- record(w, "bd-mixed", "sub-new", "new", "thread-mixed").await;-- let gave_up = Arc::new(Mutex::new(String::new()));- let sink = Arc::clone(&gave_up);- let retry = try_deliver_with(- "thread-mixed".into(),- router,- |_t, _n| async move { Err::<String, String>("checkout failed".to_string()) },- move |_t, notice| async move {- *sink.lock().expect("sink") = notice;- },- )- .await;-- assert!(gave_up.lock().expect("sink").contains("sub-old"));- assert!(- retry.is_some(),- "the newer record must still be rescheduled"- );- assert_eq!(pending_ids(w, "thread-mixed"), ["sub-new"]);-}+#[path = "background_delivery_recovery_tests.rs"]+mod recovery_tests;diff --git a/docs/README.ar.md b/docs/README.ar.mdindex c5be673e6c..e863d00d9c 100644--- a/docs/README.ar.md+++ b/docs/README.ar.md@@ -210,7 +210,7 @@ irm https://raw.githubusercontent.com/tinyhumansai/openhuman/main/scripts/instal<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/loadable-modules">كيف تعمل الإضافات</a></p>-<p>كل ميزة، مثل البحث أو المستندات أو الصوت، تتصل بناقل Rust واحد، وهي فكرة مستعارة من <a href="https://dbus.freedesktop.org/">ناقل نظام Linux</a>. لا تُحمَّل الميزة إلا عند الحاجة، وإذا تعطلت إحداها تواصل البقية عملها.</p>+<p>كل ميزة، مثل البحث أو المستندات أو الصوت، تتصل بناقل Rust واحد، وهي فكرة مستعارة من <a href="https://packages.debian.org/stable/dbus">ناقل نظام Linux</a>. لا تُحمَّل الميزة إلا عند الحاجة، وإذا تعطلت إحداها تواصل البقية عملها.</p></td>diff --git a/docs/README.de.md b/docs/README.de.mdindex 5f463479f5..b8651314c9 100644--- a/docs/README.de.md+++ b/docs/README.de.md@@ -176,7 +176,7 @@ OpenHuman denkt die teuersten Teile neu: wie viel Text die KI lesen muss, wie si<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/loadable-modules">So funktionieren Plug-ins</a></p>-<p>Jede Funktion, etwa Suche, Dokumente oder Sprache, hängt an einem gemeinsamen Rust-Bus, eine Idee vom <a href="https://dbus.freedesktop.org/">Linux-Systembus</a>. Eine Funktion wird nur bei Bedarf geladen, und wenn eine hängt, arbeiten die anderen weiter.</p>+<p>Jede Funktion, etwa Suche, Dokumente oder Sprache, hängt an einem gemeinsamen Rust-Bus, eine Idee vom <a href="https://packages.debian.org/stable/dbus">Linux-Systembus</a>. Eine Funktion wird nur bei Bedarf geladen, und wenn eine hängt, arbeiten die anderen weiter.</p></td>diff --git a/docs/README.ja-JP.md b/docs/README.ja-JP.mdindex 324c38c82c..4b4c967815 100644--- a/docs/README.ja-JP.md+++ b/docs/README.ja-JP.md@@ -176,7 +176,7 @@ OpenHuman は、最もコストのかかる部分を見直しました。AI が<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/loadable-modules">プラグインのしくみ</a></p>-<p>検索、ドキュメント、音声などの機能はすべて、1本の Rust バスにつながります。これは <a href="https://dbus.freedesktop.org/">Linux のシステムバス</a>から借りた考え方です。機能は必要なときだけ読み込まれ、1つが止まっても他は動き続けます。</p>+<p>検索、ドキュメント、音声などの機能はすべて、1本の Rust バスにつながります。これは <a href="https://packages.debian.org/stable/dbus">Linux のシステムバス</a>から借りた考え方です。機能は必要なときだけ読み込まれ、1つが止まっても他は動き続けます。</p></td>diff --git a/docs/README.ko.md b/docs/README.ko.mdindex 13bbb2e622..d5968859e9 100644--- a/docs/README.ko.md+++ b/docs/README.ko.md@@ -176,7 +176,7 @@ OpenHuman은 비용이 가장 많이 드는 부분을 다시 생각했습니다.<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/loadable-modules">플러그인 작동 방식</a></p>-<p>검색, 문서, 음성 같은 모든 기능이 하나의 Rust 버스에 연결됩니다. <a href="https://dbus.freedesktop.org/">Linux 시스템 버스</a>에서 빌려 온 아이디어입니다. 기능은 필요할 때만 로드되고, 하나가 멈춰도 나머지는 계속 작동합니다.</p>+<p>검색, 문서, 음성 같은 모든 기능이 하나의 Rust 버스에 연결됩니다. <a href="https://packages.debian.org/stable/dbus">Linux 시스템 버스</a>에서 빌려 온 아이디어입니다. 기능은 필요할 때만 로드되고, 하나가 멈춰도 나머지는 계속 작동합니다.</p></td>diff --git a/docs/README.tr.md b/docs/README.tr.mdindex 65e89d34bc..2035d86674 100644--- a/docs/README.tr.md+++ b/docs/README.tr.md@@ -176,7 +176,7 @@ OpenHuman en pahalıya mal olan kısımları yeniden düşünür: yapay zekanın<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/loadable-modules">Eklentiler nasıl çalışır</a></p>-<p>Arama, belgeler ya da ses gibi her özellik tek bir Rust veri yoluna takılır; bu fikir <a href="https://dbus.freedesktop.org/">Linux sistem veri yolundan</a> ödünç alınmıştır. Bir özellik yalnızca gerektiğinde yüklenir ve biri takılırsa diğerleri çalışmaya devam eder.</p>+<p>Arama, belgeler ya da ses gibi her özellik tek bir Rust veri yoluna takılır; bu fikir <a href="https://packages.debian.org/stable/dbus">Linux sistem veri yolundan</a> ödünç alınmıştır. Bir özellik yalnızca gerektiğinde yüklenir ve biri takılırsa diğerleri çalışmaya devam eder.</p></td>diff --git a/docs/README.ur-pk.md b/docs/README.ur-pk.mdindex e41117af91..77aebacf1a 100644--- a/docs/README.ur-pk.md+++ b/docs/README.ur-pk.md@@ -205,7 +205,7 @@ OpenHuman ان حصوں کو نئے سرے سے سوچتا ہے جن پر سب<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/loadable-modules">پلگ اِن کیسے کام کرتے ہیں</a></p>-<p>سرچ، دستاویزات یا آواز جیسا ہر فیچر ایک ہی Rust بس میں جڑتا ہے، یہ خیال <a href="https://dbus.freedesktop.org/">Linux سسٹم بس</a> سے لیا گیا ہے۔ فیچر صرف ضرورت پڑنے پر لوڈ ہوتا ہے، اور اگر کوئی ایک اٹک جائے تو باقی کام کرتے رہتے ہیں۔</p>+<p>سرچ، دستاویزات یا آواز جیسا ہر فیچر ایک ہی Rust بس میں جڑتا ہے، یہ خیال <a href="https://packages.debian.org/stable/dbus">Linux سسٹم بس</a> سے لیا گیا ہے۔ فیچر صرف ضرورت پڑنے پر لوڈ ہوتا ہے، اور اگر کوئی ایک اٹک جائے تو باقی کام کرتے رہتے ہیں۔</p></td>diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.mdindex ad5dcf89f4..abe9d176a4 100644--- a/docs/README.zh-CN.md+++ b/docs/README.zh-CN.md@@ -176,7 +176,7 @@ OpenHuman 重新设计了开销最大的几个环节:AI 要读多少文字、<p><a href="https://tinyhumans.gitbook.io/openhuman/developing/loadable-modules">插件如何工作</a></p>-<p>每个功能,比如搜索、文档或语音,都接入同一条 Rust 总线,这个想法借鉴自 <a href="https://dbus.freedesktop.org/">Linux 系统总线</a>。功能只在需要时才加载,其中一个卡住了,其余的仍能正常工作。</p>+<p>每个功能,比如搜索、文档或语音,都接入同一条 Rust 总线,这个想法借鉴自 <a href="https://packages.debian.org/stable/dbus">Linux 系统总线</a>。功能只在需要时才加载,其中一个卡住了,其余的仍能正常工作。</p></td>diff --git a/scripts/ci/check-openhuman-rust-layout.mjs b/scripts/ci/check-openhuman-rust-layout.mjsindex 322ef42a26..ca436b4f39 100644--- a/scripts/ci/check-openhuman-rust-layout.mjs+++ b/scripts/ci/check-openhuman-rust-layout.mjs@@ -54,8 +54,8 @@ const LEGACY_LIMIT_ENTRIES = [// their current sizes while follow-up work separates their test concerns.// `core/` was pruned from the line limit by name until these pins; its// oversized files are pinned at the size they had when enforcement began.- ["crates/openhuman-core/src/core/all.rs", 1349],- ["crates/openhuman-core/src/core/all_tests.rs", 1522],+ ["crates/openhuman-core/src/core/all.rs", 1340],+ ["crates/openhuman-core/src/core/all_tests.rs", 1492],["crates/openhuman-core/src/core/events.rs", 1789],["crates/openhuman-core/src/core/events_tests.rs", 997],["crates/openhuman-core/src/core/observability.rs", 3493],diff --git a/tests/raw_coverage/automation_scheduling_e2e.rs b/tests/raw_coverage/automation_scheduling_e2e.rsindex f48cad1e36..63e9daafe5 100644--- a/tests/raw_coverage/automation_scheduling_e2e.rs+++ b/tests/raw_coverage/automation_scheduling_e2e.rs@@ -15,7 +15,7 @@use crate::env_guard::EnvVarGuard;use std::net::SocketAddr;use std::path::Path;-use std::sync::{OnceLock};+use std::sync::OnceLock;use std::time::Duration;use axum::http::header::AUTHORIZATION;@@ -48,7 +48,8 @@ fn env_lock() -> tokio::sync::MutexGuard<'static, ()> {async fn env_lock_async() -> tokio::sync::MutexGuard<'static, ()> {ENV_LOCK.get_or_init(|| tokio::sync::Mutex::new(()))- .lock().await+ .lock()+ .await}/// Initialise the process RPC token (idempotent) and return the bearer the@@ -820,8 +821,19 @@ async fn managed_runtime_provisioning_rpcs_are_not_registered() {(2703, "openhuman.harness_init_status", json!({})),] {let response = h.rpc(id, method, params).await;- assert_eq!(response.pointer("/error/code").and_then(Value::as_i64),- Some(-32601), "removed RPC {method} must be unavailable: {response}");+ assert_eq!(+ response.pointer("/error/code").and_then(Value::as_i64),+ Some(-32000),+ "removed RPC {method} must be unavailable: {response}"+ );+ let message = response["error"]["message"]+ .as_str()+ .expect("unknown method error");+ assert!(message.starts_with("unknown method:"), "{response}");+ assert!(+ message.contains(method.trim_start_matches("openhuman.")),+ "{response}"+ );}h.join.abort();}