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: restore CI and E2E compatibility
Steven Enamakel032eef5c1377
diff --git a/app/src/services/api/embeddingsApi.test.ts b/app/src/services/api/embeddingsApi.test.tsnew file mode 100644index 0000000000..90d481f3e5--- /dev/null+++ b/app/src/services/api/embeddingsApi.test.ts@@ -0,0 +1,23 @@+import { beforeEach, describe, expect, it, vi } from 'vitest';++import { callCoreRpc } from '../coreRpcClient';+import { updateEmbeddingsSettings } from './embeddingsApi';++vi.mock('../coreRpcClient', () => ({ callCoreRpc: vi.fn() }));++const mockCall = vi.mocked(callCoreRpc);++describe('updateEmbeddingsSettings', () => {+ beforeEach(() => mockCall.mockReset());++ it('omits the retired confirmation flag from the core RPC', async () => {+ mockCall.mockResolvedValueOnce({ result: { provider: 'none' } });++ await updateEmbeddingsSettings({ provider: 'none', confirm_wipe: true });++ expect(mockCall).toHaveBeenCalledWith({+ method: 'openhuman.embeddings_update_settings',+ params: { provider: 'none' },+ });+ });+});diff --git a/app/src/services/api/embeddingsApi.ts b/app/src/services/api/embeddingsApi.tsindex 23befa054f..546ef4b1af 100644--- a/app/src/services/api/embeddingsApi.ts+++ b/app/src/services/api/embeddingsApi.ts@@ -90,9 +90,14 @@ export async function updateEmbeddingsSettings(params: {rate_limit_per_min?: number;confirm_wipe?: boolean;}): Promise<EmbeddingsUpdateResult> {+ // Memory v2 no longer ties stored vectors to this provider signature, so the+ // core RPC removed `confirm_wipe`. Keep accepting the UI's legacy flag while+ // its confirmation flow is retired, but never send the unsupported field.+ const rpcParams = { ...params };+ delete rpcParams.confirm_wipe;const raw = await callCoreRpc<EmbeddingsUpdateResult | { result: EmbeddingsUpdateResult }>({method: CORE_RPC_METHODS.embeddingsUpdateSettings,- params,+ params: rpcParams,});return 'result' in raw ? raw.result : raw;}diff --git a/app/test/playwright/helpers/core-rpc.ts b/app/test/playwright/helpers/core-rpc.tsindex 72975e2d88..a1cff0d2cf 100644--- a/app/test/playwright/helpers/core-rpc.ts+++ b/app/test/playwright/helpers/core-rpc.ts@@ -149,7 +149,11 @@ export async function signInViaCallbackToken(page: Page, token: string): Promiseawait waitForAppReady(page);}-export async function signInViaBypassUser(page: Page, userId: string): Promise<void> {+export async function signInViaBypassUser(+ page: Page,+ userId: string,+ options: { waitForInitialThread?: boolean } = {}+): Promise<void> {await resetCoreForWebUser(userId);await applyBrowserCoreModeInPage(page);await page.goto('/#/home');@@ -160,6 +164,20 @@ export async function signInViaBypassUser(page: Page, userId: string): Promise<v}).toMatch(/^#\/chat/);await waitForAppReady(page);+ if (options.waitForInitialThread) {+ // Some fresh profiles create an initial thread asynchronously; others+ // leave the valid `/chat` landing route without one. Route-only tests need+ // a settled thread route before setting another hash, so select the chat+ // surface's New Conversation action when no thread is selected yet.+ if (!(await page.evaluate(() => /^#\/chat\/thread-[^/?]+/.test(window.location.hash)))) {+ await page.getByTestId('new-thread-button').click({ force: true });+ }+ await expect+ .poll(async () => page.evaluate(() => window.location.hash), {+ timeout: AUTH_CALLBACK_HOME_TIMEOUT_MS,+ })+ .toMatch(/^#\/chat\/thread-[^/?]+/);+ }}export async function bootAuthenticatedPage(diff --git a/app/test/playwright/specs/chat-management-functional.spec.ts b/app/test/playwright/specs/chat-management-functional.spec.tsindex 196b30343f..568a5b2862 100644--- a/app/test/playwright/specs/chat-management-functional.spec.ts+++ b/app/test/playwright/specs/chat-management-functional.spec.ts@@ -64,23 +64,6 @@ async function openChat(page: Page, userId: string): Promise<void> {await expect(page.getByTestId('chat-message-input')).toBeVisible();}-async function newThread(page: Page): Promise<string> {- // The sidebar "new thread" control now reads "New Conversation" (was "New"),- // so anchor on its stable testid rather than the accessible name.- //- // chat-as-home may already have a non-null selectedThreadId (an auto-created- // empty thread) before this click, so waiting only for "non-null" could- // return that stale id while the click-created thread is still racing in.- // Capture the prior id and wait for the selection to advance to the freshly- // created thread (handleCreateNewThread always creates a new unique id).- const before = await selectedThreadId(page);- await page.getByTestId('new-thread-button').click({ force: true });- await expect.poll(() => selectedThreadId(page), { timeout: 10_000 }).not.toBe(before);- const created = await selectedThreadId(page);- expect(created).not.toBeNull();- return created!;-}-test.describe('Chat management functional coverage', () => {test('attachment preview, remove, and document send path remain interactive', async ({page,@@ -91,7 +74,7 @@ test.describe('Chat management functional coverage', () => {llmStreamChunkDelayMs: '5',});await openChat(page, 'pw-chat-attachments');- await newThread(page);+ await expect.poll(() => selectedThreadId(page)).not.toBeNull();const fileInput = page.locator('input[type="file"]');await expect(fileInput).toHaveCount(1);@@ -134,7 +117,7 @@ test.describe('Chat management functional coverage', () => {},{ timeout: 10_000 })- .toContain('[FILE-EXTRACTED:');+ .toContain('[DOCUMENT:');const log = await requests();const completionBody =@@ -152,8 +135,7 @@ test.describe('Chat management functional coverage', () => {// in the payload (e.g. the system prompt) can't mask a regression.const completionModel = String(JSON.parse(completionBody).model ?? '');expect(completionModel).not.toContain('reasoning');- expect(completionBody).toContain('[FILE-EXTRACTED:');- expect(completionBody).toContain('renderer uploaded text document');+ expect(completionBody).toContain('[DOCUMENT:');});// NOTE: image attachments require a vision-capable model. Managed tiers are@@ -167,7 +149,9 @@ test.describe('Chat management functional coverage', () => {test('thread rename and delete remain usable from the conversation UI', async ({ page }) => {await resetMock();await openChat(page, 'pw-chat-rename-delete');- const threadId = await newThread(page);+ await expect.poll(() => selectedThreadId(page)).not.toBeNull();+ const threadId = await selectedThreadId(page);+ expect(threadId).not.toBeNull();const title = `Playwright thread ${Date.now()}`;const threadRow = page.getByTestId(`thread-row-${threadId}`);await expect(threadRow).toBeVisible({ timeout: 10_000 });diff --git a/app/test/playwright/specs/connections-tab-aliases.spec.ts b/app/test/playwright/specs/connections-tab-aliases.spec.tsindex b0930a529e..4e210f8eca 100644--- a/app/test/playwright/specs/connections-tab-aliases.spec.ts+++ b/app/test/playwright/specs/connections-tab-aliases.spec.ts@@ -72,7 +72,7 @@ async function openConnections(route: string) {await bootRuntimeReadyGuestPage(page);- await signInViaBypassUser(page, userId);+ await signInViaBypassUser(page, userId, { waitForInitialThread: true });await page.evaluate(target => {try {localStorage.setItem('openhuman:walkthrough_completed', 'true');diff --git a/app/test/playwright/specs/connections-tab-deeplinks.spec.ts b/app/test/playwright/specs/connections-tab-deeplinks.spec.tsindex 5ba30c5e65..e88c686a65 100644--- a/app/test/playwright/specs/connections-tab-deeplinks.spec.ts+++ b/app/test/playwright/specs/connections-tab-deeplinks.spec.ts@@ -57,7 +57,7 @@ async function openRoute(// from the same deterministic guest-to-user transition used by the alias// coverage instead.await bootRuntimeReadyGuestPage(page);- await signInViaBypassUser(page, userId);+ await signInViaBypassUser(page, userId, { waitForInitialThread: true });await page.evaluate(({ target }) => {try {diff --git a/app/test/playwright/specs/embeddings-setup-modal.spec.ts b/app/test/playwright/specs/embeddings-setup-modal.spec.tsindex 46d0dede17..ac2d332e8d 100644--- a/app/test/playwright/specs/embeddings-setup-modal.spec.ts+++ b/app/test/playwright/specs/embeddings-setup-modal.spec.ts@@ -37,7 +37,7 @@ const TEST_CONNECTION = /Test connection/i;async function openEmbeddingsTab(page: import('@playwright/test').Page, userId: string) {await bootRuntimeReadyGuestPage(page);- await signInViaBypassUser(page, userId);+ await signInViaBypassUser(page, userId, { waitForInitialThread: true });await page.evaluate(() => {try {localStorage.setItem('openhuman:walkthrough_completed', 'true');@@ -117,7 +117,6 @@ test.describe('Embeddings setup — Test connection for a custom endpoint', () =custom_endpoint: endpoint,model: 'e2e-custom-embedding',dimensions: 1024,- confirm_wipe: true,});await page.reload();diff --git a/app/test/playwright/specs/tool-filesystem-flow.spec.ts b/app/test/playwright/specs/tool-filesystem-flow.spec.tsdeleted file mode 100644index be480c0f33..0000000000--- a/app/test/playwright/specs/tool-filesystem-flow.spec.ts+++ /dev/null@@ -1,106 +0,0 @@-import { expect, test } from '@playwright/test';-import { promises as fs } from 'node:fs';-import path from 'node:path';--import { bootAuthenticatedPage, callCoreRpc } from '../helpers/core-rpc';--const TEST_RELATIVE_PATH = 'e2e-967-filesystem-canary.txt';-const TEST_CONTENT =- 'OpenHuman filesystem tool canary fact - issue #967 - bytes asserted both via RPC and disk';-const TRAVERSAL_PATH = '../escape-967.txt';-const ABSOLUTE_PATH = '/tmp/openhuman-967-absolute-escape.txt';--interface WriteResultEnvelope {- data?: { relative_path?: string; written?: boolean; bytes_written?: number };-}--interface ReadResultEnvelope {- data?: { relative_path?: string; content?: string };-}--interface ListResultEnvelope {- data?: { relative_dir?: string; files?: string[]; count?: number };-}--function workspaceDir(): string {- const ws = process.env.OPENHUMAN_WORKSPACE;- if (!ws) {- throw new Error('OPENHUMAN_WORKSPACE not set for tool-filesystem-flow Playwright run');- }- return ws;-}--test.describe('System tools - Filesystem', () => {- test.beforeEach(async ({ page }, testInfo) => {- const testSlug = testInfo.title.toLowerCase().replace(/[^a-z0-9]+/g, '-');- await bootAuthenticatedPage(page, 'pw-tool-filesystem-' + testSlug, '/home');- });-- test('writes a file inside the workspace and bytes match on disk', async () => {- const writeResult = await callCoreRpc<WriteResultEnvelope>('openhuman.memory_write_file', {- relative_path: TEST_RELATIVE_PATH,- content: TEST_CONTENT,- });- const data = writeResult.data;- expect(data?.written).toBe(true);- expect(data?.bytes_written).toBe(Buffer.byteLength(TEST_CONTENT, 'utf8'));- expect(data?.relative_path).toBe(TEST_RELATIVE_PATH);-- const diskPath = path.join(- workspaceDir(),- 'workspace',- 'memory',- data?.relative_path ?? TEST_RELATIVE_PATH- );- const diskContents = await fs.readFile(diskPath, 'utf8');- const diskStat = await fs.stat(diskPath);- expect(diskContents).toBe(TEST_CONTENT);- expect(diskStat.size).toBe(Buffer.byteLength(TEST_CONTENT, 'utf8'));- });-- test('reads back the file and list_files surfaces it', async () => {- await callCoreRpc<WriteResultEnvelope>('openhuman.memory_write_file', {- relative_path: TEST_RELATIVE_PATH,- content: TEST_CONTENT,- });-- const readResult = await callCoreRpc<ReadResultEnvelope>('openhuman.memory_read_file', {- relative_path: TEST_RELATIVE_PATH,- });- expect(readResult.data?.content).toBe(TEST_CONTENT);- expect(readResult.data?.relative_path).toBe(TEST_RELATIVE_PATH);-- const listResult = await callCoreRpc<ListResultEnvelope>('openhuman.memory_list_files', {- relative_dir: '',- });- const files = listResult.data?.files ?? [];- expect(files.includes('e2e-967-filesystem-canary.txt')).toBe(true);- });-- test('rejects parent-traversal and absolute paths', async () => {- await expect(- callCoreRpc<WriteResultEnvelope>('openhuman.memory_write_file', {- relative_path: TRAVERSAL_PATH,- content: 'should never be written',- })- ).rejects.toThrow(/traversal|not allowed|escape/i);-- await expect(- callCoreRpc<WriteResultEnvelope>('openhuman.memory_write_file', {- relative_path: ABSOLUTE_PATH,- content: 'should never be written',- })- ).rejects.toThrow(/absolute|not allowed|traversal/i);-- let escaped = false;- try {- await fs.access(path.resolve(workspaceDir(), '..', 'escape-967.txt'));- escaped = true;- } catch {}- try {- await fs.access(ABSOLUTE_PATH);- escaped = true;- } catch {}- expect(escaped).toBe(false);- });-});diff --git a/app/test/playwright/specs/tool-shell-git-flow.spec.ts b/app/test/playwright/specs/tool-shell-git-flow.spec.tsindex a22a04ab86..536f644c72 100644--- a/app/test/playwright/specs/tool-shell-git-flow.spec.ts+++ b/app/test/playwright/specs/tool-shell-git-flow.spec.ts@@ -121,17 +121,14 @@ test.describe('System tools - Shell + Git', () => {expect(defs.find(def => def?.id === 'tools_agent')).toBeUndefined();});- test('denial envelope is structurally consistent for invalid write args', async () => {- await expect(- callCoreRpc('openhuman.memory_write_file', { content: 'no path provided' })- ).rejects.toThrow();+ test('memory brain ingest rejects missing and conflicting inputs', async () => {+ await expect(callCoreRpc('openhuman.memory_brain_ingest', {})).rejects.toThrow(+ /exactly one of `path` or `text`/i+ );await expect(- callCoreRpc('openhuman.memory_write_file', {- relative_path: '../shell-restriction-967.txt',- content: 'should not be written',- })- ).rejects.toThrow();+ callCoreRpc('openhuman.memory_brain_ingest', { path: 'README.md', text: 'conflicting input' })+ ).rejects.toThrow(/exactly one of `path` or `text`/i);});test('fixture git repo inside OPENHUMAN_WORKSPACE supports read ops', async () => {diff --git a/crates/openhuman-app/Cargo.lock b/crates/openhuman-app/Cargo.lockindex b04a83e71a..70d87ffa68 100644--- a/crates/openhuman-app/Cargo.lock+++ b/crates/openhuman-app/Cargo.lock@@ -4411,6 +4411,8 @@ dependencies = ["tempfile","thiserror 2.0.20","tinymcp-bus",+ "tinymemory-api",+ "tinymemory-tools","tokio","url","uuid",@@ -7779,7 +7781,7 @@ dependencies = [[[package]]name = "tinymemory-api"-version = "1.23.0"+version = "1.23.1"dependencies = ["async-trait","chrono",@@ -7791,7 +7793,7 @@ dependencies = [[[package]]name = "tinymemory-integrations"-version = "1.23.0"+version = "1.23.1"dependencies = ["async-trait","chrono",@@ -7814,7 +7816,7 @@ dependencies = [[[package]]name = "tinymemory-tools"-version = "1.23.0"+version = "1.23.1"dependencies = ["chrono","futures",diff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rsindex 5e876fae8d..896a44a37e 100644--- a/crates/openhuman-core/src/agent/bus.rs+++ b/crates/openhuman-core/src/agent/bus.rs@@ -351,7 +351,7 @@ async fn handle_agent_run_turn_on_large_stack(let (tx, rx) = tokio::sync::oneshot::channel();let handle = std::thread::Builder::new().name("agent-run-turn-test".to_string())- .stack_size(8 * 1024 * 1024)+ .stack_size(64 * 1024 * 1024).spawn(move || {let runtime = tokio::runtime::Builder::new_current_thread().enable_all()diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rsindex 7da78dc445..4579aa0c3f 100644--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs@@ -751,30 +751,26 @@ impl OpenHumanSessionHost {// `agent_harness_e2e` mock now serves SSE for streaming, so the crate-native// streaming path is exercised end-to-end.//- // Issue #4868 — resolve the per-agent iteration cap. When a named- // definition is present, its `effective_max_iterations()` (which honors- // `iteration_policy = "extended"` -> 50, and the declared `max_iterations`- // for strict agents) takes priority over the global- // `config.agent.max_tool_iterations` (default 10). This is the single- // shared resolution point that closes #4868 for every direct-invocation- // path: flows_build, flows_discover, agent-node runtime, cron, MCP- // server, etc. Falls back to the global default when there is no- // definition for this agent_id.+ // Resolve the per-turn iteration cap in one place so an explicit+ // operator override takes precedence over the selected definition,+ // while definitions still take precedence over the global default.let mut effective_agent_config = config.agent.clone();+ let effective_cap =+ super::iteration_cap::resolve_max_tool_iterations(&config.agent, target_def);if let Some(def) = target_def {- let def_cap = def.effective_max_iterations();log::info!(- "[agent::builder] applying definition iteration cap for agent_id={}: \+ "[agent::builder] resolved iteration cap for agent_id={}: \definition.max_iterations={} iteration_policy={:?} -> effective={} \- (was global default {})",+ (global default {}, explicit override {:?})",agent_id,def.max_iterations,def.iteration_policy,- def_cap,+ effective_cap,config.agent.max_tool_iterations,+ config.agent.max_tool_iterations_override,);- effective_agent_config.max_tool_iterations = def_cap;}+ effective_agent_config.max_tool_iterations = effective_cap;// Host-first, so a host tool wins a name collision -- see// `HostTurnTools::merge_into`, which owns that rule and why.let merged_host_tools = super::host_tools::merge_for_turn(diff --git a/crates/openhuman-core/src/core/README.md b/crates/openhuman-core/src/core/README.mdindex 383fbb9238..ab5198bf9d 100644--- a/crates/openhuman-core/src/core/README.md+++ b/crates/openhuman-core/src/core/README.md@@ -190,7 +190,7 @@ and say so.`runtime/` is the embeddable composition API: `CoreBuilder` builds a`CoreRuntime` in two phases (initialization, then serve); see[runtime/README.md](runtime/README.md) for the full builder reference.-`AGENT_WORKER_STACK_BYTES` (16 MiB) and `MAX_BLOCKING_THREADS` (64) live in+`AGENT_WORKER_STACK_BYTES` (64 MiB) and `MAX_BLOCKING_THREADS` (64) live in`runtime/mod.rs`: a single agent turn is a very large async state machine,and delegating to a sub-agent nests another one, which overflows tokio'sdefault 2 MiB worker stack; every multi-thread runtime that can host a turndiff --git a/crates/openhuman-core/src/core/runtime/README.md b/crates/openhuman-core/src/core/runtime/README.mdindex 60bdef070c..f18839892e 100644--- a/crates/openhuman-core/src/core/runtime/README.md+++ b/crates/openhuman-core/src/core/runtime/README.md@@ -139,12 +139,12 @@ existing single-tenant call sites keep working unmodified.`runtime/mod.rs` declares two constants every multi-thread runtime that mayhost an agent turn must set:-- `AGENT_WORKER_STACK_BYTES` (16 MiB): a single agent turn is a very large+- `AGENT_WORKER_STACK_BYTES` (64 MiB): a single agent turn is a very largeasync state machine (system prompt + hundreds of tool specs + the nestedprovider/tool loop), and delegating to a sub-agent nests another one. Thatoverflows tokio's default 2 MiB worker stack and aborts the process.- `MAX_BLOCKING_THREADS` (64): tokio defaults this to 512, which combined- with the raised stack size could pin up to `512 × 16 MiB` of idle stack.+ with the raised stack size could pin up to `64 × 64 MiB` of idle stack.`spawn_blocking` on these runtimes backs SQLite, filesystem grep/glob,document parsing, and URL guarding: bounded, bursty concurrency, so 64leaves headroom while capping the idle footprint.diff --git a/crates/openhuman-core/src/core/runtime/mod.rs b/crates/openhuman-core/src/core/runtime/mod.rsindex 040351ed34..6847ac3b94 100644--- a/crates/openhuman-core/src/core/runtime/mod.rs+++ b/crates/openhuman-core/src/core/runtime/mod.rs@@ -23,7 +23,7 @@//! `cli.rs`, …) shares the same exposure. Centralising the value keeps them//! in sync; downstream call sites should set `.thread_stack_size(AGENT_WORKER_STACK_BYTES)`//! on every multi-thread runtime that may host an agent turn.-pub const AGENT_WORKER_STACK_BYTES: usize = 16 * 1024 * 1024;+pub const AGENT_WORKER_STACK_BYTES: usize = 64 * 1024 * 1024;/// Upper bound on tokio's blocking-thread pool for the long-lived multi-thread/// runtimes tuned with [`AGENT_WORKER_STACK_BYTES`] (the desktop Tauri host anddiff --git a/crates/openhuman-rpc/src/server/http/rpc_handler_tests.rs b/crates/openhuman-rpc/src/server/http/rpc_handler_tests.rsindex d8a09c47f0..83f45ca836 100644--- a/crates/openhuman-rpc/src/server/http/rpc_handler_tests.rs+++ b/crates/openhuman-rpc/src/server/http/rpc_handler_tests.rs@@ -274,7 +274,7 @@ async fn unknown_method_severity_split_by_probe_allow_list() {#[cfg(feature = "crash-reporting")]#[tokio::test(flavor = "current_thread")]-async fn invalid_ingest_payload_is_captured_at_warn_not_error() {+async fn invalid_memory_ingest_is_not_reported_to_sentry() {// #5169 (CORE-RUST-1P0): a caller submitting an ingest payload that does// not match the canonicaliser schema is a *caller* error — the handler// already names the offending field and no core change can fix a producer@@ -321,18 +321,14 @@ async fn invalid_ingest_payload_is_captured_at_warn_not_error() {);let _subscriber_guard = tracing::subscriber::set_default(subscriber);- // `platform` is genuinely required by `ChatBatch` (unlike `timestamp`,- // which now defaults — see `chat_payload_without_timestamp_is_accepted`),- // so this reaches the invalid-payload branch rather than succeeding.+ // A missing file is an expected input error for the current memory v2+ // ingest endpoint, so it should be returned to the caller without a+ // Sentry event.let request = crate::RpcRequest {jsonrpc: "2.0".to_string(),id: json!(1),- method: "openhuman.memory_tree_ingest".to_string(),- params: json!({- "source_kind": "chat",- "source_id": "#general",- "payload": { "messages": [] },- }),+ method: "openhuman.memory_brain_ingest".to_string(),+ params: json!({ "path": "/openhuman-test/missing-memory-ingest-file" }),};let response = rpc_handler(State(default_state()), Json(request)).await;let body = to_bytes(response.into_body(), usize::MAX)@@ -340,29 +336,19 @@ async fn invalid_ingest_payload_is_captured_at_warn_not_error() {.expect("response body");let body: serde_json::Value = serde_json::from_slice(&body).expect("json response");- // The caller still gets the precise, unchanged validation error.+ // The caller still gets the validation error.assert_eq!(body["error"]["code"], json!(-32000));let message = body["error"]["message"].as_str().expect("error message string");assert!(- message.starts_with("invalid chat payload: "),- "expected an invalid-chat-payload error, got {message:?}"+ message.contains("cannot read the file:"),+ "expected a missing-file validation error, got {message:?}");let events = transport.fetch_and_clear_events();- assert_eq!(- events.len(),- 1,- "invalid ingest payloads should still be captured for triage"- );- assert_eq!(- events[0].level,- sentry::Level::Warning,- "caller payload errors must be warn-level (triage, not paging)"- );- assert_eq!(- events[0].tags.get("method").map(String::as_str),- Some("openhuman.memory_tree_ingest")+ assert!(+ events.is_empty(),+ "expected user input errors should not be reported to Sentry");}diff --git a/scripts/ci/agent-runtime-boundary-baseline.json b/scripts/ci/agent-runtime-boundary-baseline.jsonindex 3743801f53..25211fa538 100644--- a/scripts/ci/agent-runtime-boundary-baseline.json+++ b/scripts/ci/agent-runtime-boundary-baseline.json@@ -9,7 +9,7 @@{"rule": "openhuman-runtime-bridge","path": "crates/openhuman-core/src/agent/harness/graph.rs",- "line": 122,+ "line": 147,"text": "let outcome = run_turn_via_tinyagents_shared(","occurrence": 1},@@ -23,7 +23,7 @@{"rule": "openhuman-runtime-bridge","path": "crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs",- "line": 199,+ "line": 197,"text": "let run_result = Box::pin(run_turn_via_tinyagents_shared(","occurrence": 1},@@ -37,14 +37,14 @@{"rule": "openhuman-runtime-bridge","path": "crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs",- "line": 114,+ "line": 110,"text": "pub(super) fn assemble_turn_harness(","occurrence": 1},{"rule": "openhuman-runtime-bridge","path": "crates/openhuman-core/src/agent/tinyagents/mod.rs",- "line": 86,+ "line": 89,"text": "pub(crate) use turn_runner::{run_root_turn_via_hosted_agent, run_turn_via_tinyagents_shared};","occurrence": 1},@@ -79,98 +79,98 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/bus.rs",- "line": 291,+ "line": 295,"text": "let outcome = turn_origin::with_origin(","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/bus.rs",- "line": 295,+ "line": 301,"text": "with_current_sandbox_mode(sandbox_mode, async {","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/fork_context.rs",- "line": 171,+ "line": 164,"text": "tokio::task_local! {","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/fork_context.rs",- "line": 175,+ "line": 168,"text": "pub static PARENT_CONTEXT: ParentExecutionContext;","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/fork_context.rs",- "line": 182,+ "line": 175,"text": "pub fn current_parent() -> Option<ParentExecutionContext> {","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/fork_context.rs",- "line": 183,+ "line": 176,"text": "PARENT_CONTEXT.try_with(|ctx| ctx.clone()).ok()","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/fork_context.rs",- "line": 194,+ "line": 187,"text": "PARENT_CONTEXT.scope(ctx, Box::pin(future)).await","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/mod.rs",- "line": 29,+ "line": 28,"text": "pub mod fork_context;","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/mod.rs",- "line": 32,+ "line": 31,"text": "pub mod sandbox_context;","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/mod.rs",- "line": 33,+ "line": 32,"text": "pub(crate) mod spawn_depth_context;","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/mod.rs",- "line": 34,+ "line": 33,"text": "pub mod task_recency_context;","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/mod.rs",- "line": 48,+ "line": 47,"text": "pub use sandbox_context::{current_sandbox_mode, with_current_sandbox_mode};","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/mod.rs",- "line": 49,+ "line": 48,"text": "pub(crate) use spawn_depth_context::{with_spawn_depth, MAX_SPAWN_DEPTH};","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/harness/mod.rs",- "line": 50,+ "line": 49,"text": "pub use task_recency_context::{current_task_recency_window, with_task_recency_window};","occurrence": 1},@@ -303,14 +303,14 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs",- "line": 166,+ "line": 165,"text": "if current_parent().is_some() {","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs",- "line": 170,+ "line": 169,"text": "Ok(with_parent_context(parent, fut).await)","occurrence": 1},@@ -421,22 +421,22 @@},{"rule": "openhuman-task-local",- "path": "crates/openhuman-core/src/agent/session_host/builder/helpers.rs",- "line": 195,+ "path": "crates/openhuman-core/src/agent/session_host/builder/factory.rs",+ "line": 994,"text": "let root = crate::agent::turn_workspace::current()?;","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/session_host/runtime_session.rs",- "line": 264,- "text": "if self.auto_save && crate::agent::turn_origin::current_is_user_authored() {",+ "line": 265,+ "text": "crate::agent::turn_origin::current_is_user_authored().then(|| request.input.text());","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/session_host/runtime_session.rs",- "line": 802,+ "line": 686,"text": "workspace_descriptor: crate::agent::harness::current_parent()","occurrence": 1},@@ -471,21 +471,21 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/subagent_host/ops/runner.rs",- "line": 483,+ "line": 255,"text": ".max(current_spawn_depth().saturating_add(1));","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/subagent_host/ops/runner.rs",- "line": 633,+ "line": 364,"text": "let run_result = Box::pin(with_spawn_depth(attempted_depth, async {","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/subagent_host/ops/runner.rs",- "line": 635,+ "line": 366,"text": "with_current_sandbox_mode(definition.sandbox_mode, async {","occurrence": 1},@@ -520,35 +520,35 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/turn_origin.rs",- "line": 194,+ "line": 206,"text": "AGENT_TURN_ORIGIN.scope(origin, Box::pin(fut)).await","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/turn_origin.rs",- "line": 201,+ "line": 213,"text": "AGENT_TURN_ORIGIN.try_with(|o| o.clone()).ok()","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/turn_origin.rs",- "line": 256,+ "line": 268,"text": "Some(origin) => with_origin(origin, fut).await,","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/turn_origin.rs",- "line": 292,+ "line": 304,"text": "Some(origin) => with_origin(origin, fut).await,","occurrence": 2},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/turn_origin.rs",- "line": 355,+ "line": 367,"text": "pub fn current_request_id() -> Option<String> {","occurrence": 1},@@ -618,7 +618,7 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/flows/memory_tools.rs",- "line": 69,+ "line": 63,"text": "match turn_origin::current() {","occurrence": 1},@@ -702,7 +702,7 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs",- "line": 100,+ "line": 82,"text": "match turn_origin::current() {","occurrence": 1},@@ -716,14 +716,14 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs",- "line": 287,+ "line": 359,"text": "if let Some(tx) = crate::agent::progress_sink::current_progress_sink() {","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs",- "line": 310,+ "line": 382,"text": "let run = crate::agent::turn_origin::with_origin(","occurrence": 1},@@ -744,14 +744,14 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/inference/provider/openhuman_backend_model_calls.rs",- "line": 29,+ "line": 51,"text": "with_thread_id(apply_reasoning_hint(request), self.thread_id.as_deref()),","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/inference/provider/openhuman_backend_model_calls.rs",- "line": 59,+ "line": 81,"text": "with_thread_id(apply_reasoning_hint(request), self.thread_id.as_deref()),","occurrence": 2},@@ -783,6 +783,20 @@"text": "if matches!(current_sandbox_mode(), Some(SandboxMode::ReadOnly)) {","occurrence": 1},+ {+ "rule": "openhuman-task-local",+ "path": "crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs",+ "line": 9,+ "text": "use crate::agent::turn_origin::with_origin;",+ "occurrence": 1+ },+ {+ "rule": "openhuman-task-local",+ "path": "crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs",+ "line": 216,+ "text": "if let Err(e) = with_origin(origin, apply_decision(run, &envelope)).await {",+ "occurrence": 1+ },{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/integrations/composio/tools/execute.rs",@@ -828,36 +842,22 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/mcp/server/tools/dispatch.rs",- "line": 370,+ "line": 373,"text": "crate::agent::turn_origin::with_origin(origin, agent.run_single(&prompt)),","occurrence": 1},{"rule": "openhuman-task-local",- "path": "crates/openhuman-core/src/memory/goals/enrich.rs",- "line": 18,- "text": "use crate::agent::turn_origin::{with_origin, AgentTurnOrigin, TrustedAutomationSource};",- "occurrence": 1- },- {- "rule": "openhuman-task-local",- "path": "crates/openhuman-core/src/memory/goals/enrich.rs",+ "path": "crates/openhuman-core/src/memory/tools.rs","line": 135,- "text": "let response = with_origin(origin, agent.run_single(&prompt))",+ "text": ".or_else(crate::agent::turn_workspace::current)","occurrence": 1},{"rule": "openhuman-task-local",- "path": "crates/openhuman-core/src/memory/sync/composio/bus/trigger_subscriber.rs",- "line": 10,- "text": "use crate::agent::turn_origin::with_origin;",- "occurrence": 1- },- {- "rule": "openhuman-task-local",- "path": "crates/openhuman-core/src/memory/sync/composio/bus/trigger_subscriber.rs",- "line": 218,- "text": "if let Err(e) = with_origin(origin, apply_decision(run, &envelope)).await {",+ "path": "crates/openhuman-core/src/memory/tools.rs",+ "line": 140,+ "text": "crate::agent::harness::fork_context::current_parent()","occurrence": 1},{@@ -926,7 +926,7 @@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/tools/impl/system/shell.rs",- "line": 346,+ "line": 369,"text": "crate::agent::harness::current_sandbox_mode(),","occurrence": 1},@@ -1007,13 +1007,6 @@"text": "pub use tinyagents_graph::goals::{ThreadGoal, ThreadGoalStatus};","occurrence": 1},- {- "rule": "openhuman-upstream-reexport",- "path": "crates/openhuman-core/src/agent/harness/archivist/boundary.rs",- "line": 202,- "text": "pub use tinyinference_embeddings::incremental_mean_embedding;",- "occurrence": 1- },{"rule": "openhuman-upstream-reexport","path": "crates/openhuman-core/src/agent/harness/artifact_offload/mod.rs",@@ -1024,7 +1017,7 @@{"rule": "openhuman-upstream-reexport","path": "crates/openhuman-core/src/agent/multimodal.rs",- "line": 52,+ "line": 29,"text": "pub use tinyagents_harness::multimodal::{FilePayload, MultimodalError};","occurrence": 1},@@ -1059,7 +1052,7 @@{"rule": "openhuman-upstream-reexport","path": "crates/openhuman-core/src/inference/mod.rs",- "line": 47,+ "line": 48,"text": "pub use tinyinference_local::status::{","occurrence": 1},@@ -1080,7 +1073,7 @@{"rule": "openhuman-upstream-reexport","path": "crates/openhuman-core/src/tools/mod.rs",- "line": 70,+ "line": 66,"text": "pub use tinytools::{","occurrence": 1},@@ -1367,7 +1360,7 @@{"rule": "tinyagents-tool-calling-facade","path": "vendor/tinyagents/crates/tinyagents-harness/src/agent_loop/tools.rs",- "line": 2222,+ "line": 2223,"text": "use tinytools_agent::repair::args;","occurrence": 1},@@ -1430,7 +1423,7 @@{"rule": "tinyagents-upstream-reexport","path": "vendor/tinyagents/crates/tinyagents-session/src/lib.rs",- "line": 89,+ "line": 97,"text": "pub use tinyagents_harness::error::{Result, TinyAgentsError};","occurrence": 1}diff --git a/scripts/ci/ignored-test-baseline.json b/scripts/ci/ignored-test-baseline.jsonindex 9a1ab24808..1748e39c5c 100644--- a/scripts/ci/ignored-test-baseline.json+++ b/scripts/ci/ignored-test-baseline.json@@ -1,10 +1,10 @@{"openhuman-app": 5,"openhuman-cli": 0,- "openhuman-core": 17,+ "openhuman-core": 8,"openhuman-embed": 0,"openhuman-rpc": 0,"openhuman-tinyhumans": 0,"openhuman-tui": 0,- "tests": 15+ "tests": 14}diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rsindex 2b194a5beb..3465b36d1c 100644--- a/tests/agent_harness_e2e.rs+++ b/tests/agent_harness_e2e.rs@@ -945,20 +945,30 @@ fn subagent_delegation_happy_path() {async fn subagent_delegation_happy_path_inner() {let _lock = env_lock();+ let fixture_path = Path::new(env!("CARGO_MANIFEST_DIR"))+ .join("../../scripts/life-scenarios/fixtures/drafts/images/handoff-hero.png");+ let stack = boot_stack().await;+ let image_path = Path::new(&std::env::var("HOME").expect("test HOME"))+ .join("OpenHuman/projects/delegation-vision.png");+ std::fs::create_dir_all(image_path.parent().expect("action directory"))+ .expect("create action directory");+ std::fs::copy(&fixture_path, &image_path).expect("copy vision fixture");reset_script(vec![// request[0]: Orchestrator calls the `analyze_image` tool// (vision_agent's delegate_name).tool_call_completion("analyze_image",- json!({ "prompt": "Find the marker phrase", "blocking": true }),+ json!({+ "prompt": "Find the marker phrase",+ "image_paths": [image_path.to_string_lossy()],+ "blocking": true+ }),),// request[1]: vision_agent subagent inner LLM call returns its canary.text_completion("MEMORY_CANARY_42 is the marker."),// request[2]: Orchestrator receives the subagent result and synthesizes.text_completion("Done. The result is: MEMORY_CANARY_42"),]);- let stack = boot_stack().await;-let mut events = spawn_sse_collector(format!("{}/events?client_id=harness-subagent",stack.rpc_base@@ -2149,12 +2159,24 @@ fn multi_hop_delegation_chain() {async fn multi_hop_delegation_chain_inner() {let _lock = env_lock();+ let fixture_path = Path::new(env!("CARGO_MANIFEST_DIR"))+ .join("../../scripts/life-scenarios/fixtures/drafts/images/handoff-hero.png");+ let stack = boot_stack().await;+ let image_path = Path::new(&std::env::var("HOME").expect("test HOME"))+ .join("OpenHuman/projects/delegation-vision.png");+ std::fs::create_dir_all(image_path.parent().expect("action directory"))+ .expect("create action directory");+ std::fs::copy(&fixture_path, &image_path).expect("copy vision fixture");reset_script(vec![// request[0]: Orchestrator delegates to vision_agent via// `analyze_image` (its delegate_name, agent/registry/agents/vision_agent/agent.toml:3).tool_call_completion("analyze_image",- json!({ "prompt": "deep question", "blocking": true }),+ json!({+ "prompt": "deep question",+ "image_paths": [image_path.to_string_lossy()],+ "blocking": true+ }),),// request[1]: vision_agent first inner LLM call → scripts file_write.// file_write is NOT in vision_agent's read-only named tools@@ -2171,8 +2193,6 @@ async fn multi_hop_delegation_chain_inner() {// request[3]: Orchestrator receives the analyze_image result and synthesizes.text_completion("Final answer: DEPTH2_CANARY"),]);- let stack = boot_stack().await;-let mut events = spawn_sse_collector(format!("{}/events?client_id=harness-multihop",stack.rpc_basediff --git a/tests/in_process/config_auth_app_state_connectivity_e2e.rs b/tests/in_process/config_auth_app_state_connectivity_e2e.rsindex d4b4367192..f7b6afc428 100644--- a/tests/in_process/config_auth_app_state_connectivity_e2e.rs+++ b/tests/in_process/config_auth_app_state_connectivity_e2e.rs@@ -1868,13 +1868,13 @@ async fn worker_a_controller_schemas_are_fully_exposed() {("memory",vec![- "openhuman.memory_context_get",- "openhuman.memory_context_refresh",- "openhuman.memory_context_set",+ "openhuman.memory_agents_list",+ "openhuman.memory_brain_forget",+ "openhuman.memory_brain_ingest",+ "openhuman.memory_brain_search",+ "openhuman.memory_brain_sources","openhuman.memory_conversations_backfill_start","openhuman.memory_conversations_backfill_status",- "openhuman.memory_conversations_get",- "openhuman.memory_conversations_set","openhuman.memory_engine_get","openhuman.memory_engine_set","openhuman.memory_engines_list",@@ -1886,7 +1886,12 @@ async fn worker_a_controller_schemas_are_fully_exposed() {"openhuman.memory_import_status","openhuman.memory_items_get","openhuman.memory_items_list",+ "openhuman.memory_jobs_list",+ "openhuman.memory_jobs_run","openhuman.memory_learn",+ "openhuman.memory_pack_preview",+ "openhuman.memory_policy_get",+ "openhuman.memory_policy_set","openhuman.memory_recall","openhuman.memory_sources_add","openhuman.memory_sources_list",diff --git a/tests/in_process/worker_c_modules_e2e.rs b/tests/in_process/worker_c_modules_e2e.rsindex afffc29945..1ce9febbcb 100644--- a/tests/in_process/worker_c_modules_e2e.rs+++ b/tests/in_process/worker_c_modules_e2e.rs@@ -732,10 +732,17 @@ async fn memory_v2_controller_surface_is_reachable() {let methods = ["openhuman.memory_engines_list","openhuman.memory_engine_get",+ "openhuman.memory_agents_list","openhuman.memory_items_list",- "openhuman.memory_conversations_get",+ "openhuman.memory_brain_sources",+ "openhuman.memory_brain_search",+ "openhuman.memory_brain_ingest",+ "openhuman.memory_jobs_list",+ "openhuman.memory_pack_preview",+ "openhuman.memory_policy_get",+ "openhuman.memory_conversations_backfill_start",+ "openhuman.memory_conversations_backfill_status","openhuman.memory_sources_list",- "openhuman.memory_context_get","openhuman.memory_import_scan","openhuman.memory_import_status",];diff --git a/tests/raw_coverage/composio_raw_coverage_e2e.rs b/tests/raw_coverage/composio_raw_coverage_e2e.rsindex 0bdc36dfa8..e9ccc159ae 100644--- a/tests/raw_coverage/composio_raw_coverage_e2e.rs+++ b/tests/raw_coverage/composio_raw_coverage_e2e.rs@@ -271,6 +271,7 @@ async fn composio_controller_registry_and_scope_handlers_cover_validation_edges(assert!(workspace.path()+ .join("workspace").join("integrations").join("composio_user_scopes.json").exists(),