Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Merge remote-tracking branch 'origin/main' into epic-8089-228-tool-registry

Steven Enamakele98e996de0ed
diff --cc app/test/playwright/specs/chat-thread-list-lifecycle.spec.ts
index 893bb2fae2,49874d3f15..ef0c2935cb
--- a/app/test/playwright/specs/chat-thread-list-lifecycle.spec.ts
+++ b/app/test/playwright/specs/chat-thread-list-lifecycle.spec.ts
@@@ -91,8 -92,11 +92,11 @@@ async function selectThreadAction(page
}
test.describe('Chat thread list — create, deep link, rename, delete', () => {
- test.beforeEach(async () => {
- test.beforeEach(async (fixtures, testInfo) => {
- void fixtures;
++ test.beforeEach(async ({ page }, testInfo) => {
++ void page;
await resetMock();
+ const title = testInfo.title.toLowerCase().replace(/[^a-z0-9]+/g, '-');
+ userId = `${USER_ID_PREFIX}-${title}`;
});
test('the sidebar creates a thread and selects it', async ({ page }) => {
diff --cc crates/openhuman-core/src/core/observability_connectivity.rs
index 0000000000,a155d9f2f2..71e3860c14
mode 000000,100644..100644
--- a/crates/openhuman-core/src/core/observability_connectivity.rs
+++ b/crates/openhuman-core/src/core/observability_connectivity.rs
@@@ -1,0 -1,97 +1,96 @@@
+ pub fn is_connectivity_event(event: &sentry::protocol::Event<'_>) -> bool {
+ let texts: Vec<&str> = {
+ let mut v = Vec::with_capacity(2 + event.exception.values.len());
+ if let Some(msg) = event.message.as_deref() {
+ v.push(msg);
+ }
+ if let Some(log) = event.logentry.as_ref().map(|l| l.message.as_str()) {
+ v.push(log);
+ }
+ for exc in &event.exception.values {
+ if let Some(val) = exc.value.as_deref() {
+ v.push(val);
+ }
+ }
+ v
+ };
+ if texts.is_empty() {
+ return false;
+ }
+
+ let lower = texts.join(" ").to_ascii_lowercase();
+
+ // Core HTTP transport errors
+ if lower.contains("connection refused")
+ || lower.contains("connection reset")
+ || lower.contains("connection closed before")
+ || lower.contains("broken pipe")
+ || lower.contains("tls handshake eof")
+ {
+ return true;
+ }
+
+ // Backend / provider gateway errors
+ if lower.contains("502 bad gateway")
+ || lower.contains("504 gateway timeout")
+ || lower.contains("502 gateway timeout")
+ || lower.contains("timeout: 503")
+ || lower.contains("upstream connect error")
+ {
+ return true;
+ }
+
+ // CoreRpcError / HTTP 401 (from frontend — user session issue, not code defect)
+ // Only match bare HTTP 401 (CoreRpcError / fetch), not llm_provider 401
+ // which is handled by the session-expired classifier
+ let domain = event.tags.get("domain").map(String::as_str);
+ if domain != Some("llm_provider")
+ && domain != Some("backend_api")
+ && (lower.contains("http 401")
+ || lower.contains("status: 401")
+ || lower.contains("401 unauthorized"))
+ {
+ return true;
+ }
+
+ // Timeout patterns — scoped to known transient forms so genuine
+ // non-transport timeouts (database locks, inference hangs) still
+ // reach Sentry for investigation.
+ if lower.contains("connection timed out")
+ || lower.contains("request timed out")
+ || lower.contains("deadline has elapsed")
+ || lower.contains("timeout after")
+ {
+ return true;
+ }
+
+ false
+ }
+
+ /// Filter out events from **stale releases** — releases older than
+ /// `MAX_AGE_MINOR_VERSIONS` minor versions behind the current build.
+ ///
+ /// Ancient-client errors are not actionable against the current codebase.
+ /// Target: ~4 issues from releases like v0.54.0 against current v0.58+.
+ #[cfg(feature = "crash-reporting")]
+ pub fn is_stale_release_event(event: &sentry::protocol::Event<'_>) -> bool {
+ // Maximum number of minor versions behind the current release to accept.
+ // Events from clients on releases older than this are dropped.
+ const MAX_AGE_MINOR_VERSIONS: u32 = 6;
+
+ let Some(release) = event.release.as_ref() else {
+ return false;
+ };
+
+ let current = env!("CARGO_PKG_VERSION");
+ parse_version(current).is_some_and(|(current_major, current_minor)| {
+ parse_release_tag(release).is_some_and(|(event_major, event_minor)| {
+ if event_major != current_major {
+ // Different major version = definitely stale (or from the future)
+ return event_major < current_major;
+ }
+ // Same major: check minor version gap
+ current_minor.saturating_sub(event_minor) > MAX_AGE_MINOR_VERSIONS
+ })
+ })
+ }
-
diff --cc crates/openhuman-core/src/web_chat/progress_bridge_attribution.rs
index 0000000000,c393395fd9..cd8ce211c0
mode 000000,100644..100644
--- a/crates/openhuman-core/src/web_chat/progress_bridge_attribution.rs
+++ b/crates/openhuman-core/src/web_chat/progress_bridge_attribution.rs
@@@ -1,0 -1,38 +1,37 @@@
+ /// Build the worktree-isolation slice of a `subagent_completed`
+ /// [`SubagentProgressDetail`] (#3376). An empty `changed_files` collapses to
+ /// `None` so the renderer omits an empty "changed files" list rather than
+ /// showing "0 files"; a non-empty list is forwarded verbatim. `worktree_path`
+ /// / `dirty_status` pass through (`None` for non-isolated workers). Split out
+ /// so the empty/non-empty branch is unit-testable without a live DB + channel.
+ fn subagent_worktree_detail(
+ worktree_path: Option<String>,
+ changed_files: Vec<String>,
+ dirty_status: Option<bool>,
+ ) -> SubagentProgressDetail {
+ SubagentProgressDetail {
+ worktree_path,
+ changed_files: if changed_files.is_empty() {
+ None
+ } else {
+ Some(changed_files)
+ },
+ dirty_status,
+ ..Default::default()
+ }
+ }
+
+ /// Trace user attribution for a turn whose stored user payload carries no identity
+ /// (headless / autonomous / freshly booted cores): read the on-disk
+ /// app-session profile and return the user's email (preferred) or backend
+ /// user id. `None` when signed out or the profile is unreadable.
+ fn session_profile_user_attribution(config: &crate::config::Config) -> Option<String> {
+ let state = crate::security::credentials::session_support::build_session_state(config).ok()?;
+ state
+ .user
+ .as_ref()
+ .and_then(|u| u.get("email"))
+ .and_then(serde_json::Value::as_str)
+ .map(str::to_string)
+ .or(state.user_id)
+ }
-
diff --cc crates/openhuman-tinyhumans/src/doctor/hosted_checks_tests.rs
index 916bf9a1cc,c71675d5cf..feb9ac62ac
--- a/crates/openhuman-tinyhumans/src/doctor/hosted_checks_tests.rs
+++ b/crates/openhuman-tinyhumans/src/doctor/hosted_checks_tests.rs
@@@ -2,10 -2,9 +2,9 @@@ use super::*
use crate::session::test_support::{EXPIRED_JWT, LIVE_JWT};
use openhuman_embed::__host::config::Config;
use openhuman_embed::__host::core::runtime::CoreContext;
-use openhuman_embed::__host::doctor::{registered_checks, DoctorCheck};
+use openhuman_embed::__host::doctor::{registered_checks, ComponentId, DoctorCheck};
use openhuman_embed::{CoreBuilder, DomainSet, HostKind, ServiceSet};
use serde_json::json;
- use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use tempfile::TempDir;
diff --cc scripts/__tests__/e2e-web-bundle-guard.test.mjs
index c7cc87cce1,a4d4b58552..e900c3a9d5
--- a/scripts/__tests__/e2e-web-bundle-guard.test.mjs
+++ b/scripts/__tests__/e2e-web-bundle-guard.test.mjs
@@@ -339,16 -341,8 +341,16 @@@ test("e2e-web-build.sh marks the bundl
const recorded = fs.readFileSync(marker, "utf8");
assert.match(recorded, /^VITE_OPENHUMAN_TARGET=web$/m);
assert.match(recorded, /^VITE_OPENHUMAN_E2E_DEFAULT_CORE_MODE=cloud$/m);
- assert.match(recorded, /^VITE_BACKEND_URL=http:\/\/127\.0\.0\.1:18473$/m);
- assert.match(recorded, /^VITE_OPENHUMAN_CORE_RPC_URL=http:\/\/127\.0\.0\.1:17788\/rpc$/m);
+ assert.ok(recorded.includes(`VITE_BACKEND_URL=http://127.0.0.1:${TEST_PORT_BASE}\n`));
+ assert.ok(recorded.includes(`VITE_OPENHUMAN_CORE_RPC_URL=http://127.0.0.1:${TEST_PORT_BASE + 1}/rpc\n`));
+ const cargoBuild = tree.calls().find((call) => call.startsWith("cargo "));
+ assert.ok(cargoBuild, "web E2E build invokes Cargo for the standalone core");
+ assert.ok(
+ cargoBuild.includes(`--target-dir ${path.join(tree.root, "target")}`),
+ `web E2E build should honor E2E_WEB_CORE_TARGET_DIR: ${cargoBuild}`,
+ );
+ assert.match(cargoBuild, /--features voice,e2e-test-support/);
+ assert.doesNotMatch(cargoBuild, /CARGO_TARGET_DIR=/);
} finally {
tree.cleanup();
}
diff --cc vendor/tinyagents
index 1924548f85,adce99bede..c899bbbab1
--- a/vendor/tinyagents
+++ b/vendor/tinyagents
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 1924548f85a1664a12d0ee48740c1ab317d33604
-Subproject commit adce99bede0c182c98daa1a93fe41f13144e5f58
++Subproject commit c899bbbab130688470f6b94f4f33cdbdf510edf8
diff --cc vendor/tinymemory
index 76da3a4515,d98ec4f0ef..f1cb0ad0fc
--- a/vendor/tinymemory
+++ b/vendor/tinymemory
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 76da3a4515c8695d2a63f404a0ef40021fe733c4
-Subproject commit d98ec4f0efbc20970bcea2db48b83b23465acb83
++Subproject commit f1cb0ad0fc1339ec685124f7bb9bca0450f117c2