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
chore: files changed .github/ci-paths-filter.yml,app/test/e2e/specs/chat-todos-goals.spec.ts,app/tes
Steven Enamakel680394aea572
diff --git a/.github/ci-paths-filter.yml b/.github/ci-paths-filter.ymlindex d443407bcf..69a34008ad 100644--- a/.github/ci-paths-filter.yml+++ b/.github/ci-paths-filter.yml@@ -27,6 +27,9 @@ frontend:# job exists to check them, so a PR that touches only a spec has to# match this filter or the job skips and the check reads as green.- 'app/test/**'+ # The skip policy checker is part of browser-test validation; changing it+ # must also arm the frontend lane that invokes it.+ - 'scripts/ci/check-browser-test-skips.mjs'- 'app/tsconfig*.json'- 'app/vite.config.*'- 'app/tailwind.config.*'@@ -154,6 +157,7 @@ scripts:- 'scripts/ci/nextest-coverage.sh'- 'scripts/ci/nextest-report.mjs'- 'scripts/ci/check-module-boundaries.mjs'+ - 'scripts/ci/check-browser-test-skips.mjs'- 'scripts/ci/module-boundaries.json'- 'scripts/ci/check-storage-bypass.mjs'- 'scripts/ci/storage-bypass-debt.mjs'diff --git a/app/test/e2e/specs/chat-todos-goals.spec.ts b/app/test/e2e/specs/chat-todos-goals.spec.tsindex 3b307f1730..26076d66d2 100644--- a/app/test/e2e/specs/chat-todos-goals.spec.ts+++ b/app/test/e2e/specs/chat-todos-goals.spec.ts@@ -16,7 +16,8 @@* Turn 3: todo (all five completed) → goal_complete → text** Verifies:- * G1.1 — the goal banner shows the objective and an "active" status+ * G1.1 — after the scripted turn settles, the task card shows the objective+ * and waiting status* G1.2 — the checklist renders all five items with their statuses* G1.3 — a later write moves the checklist on (3 of 5, fourth in progress)* G1.4 — the final write completes every item and the banner turns complete@@ -126,6 +127,13 @@ async function waitForProgress(completed: number, total: number, timeout = 45_00);}+async function waitForGoalStatus(status: string, timeout = 45_000): Promise<void> {+ await browser.waitUntil(async () => (await readGoal())?.status === status, {+ timeout,+ timeoutMsg: `task card never reached ${status}; last: ${JSON.stringify(await readGoal())}`,+ });+}+async function sendTurn(message: string) {await typeIntoComposer(message);expect(@@ -175,15 +183,17 @@ describe('Chat todos and goals', () => {await sendTurn('Write the v2 release notes, in five steps.');await waitForTestId('todo-checklist', 45_000);+ await waitForGoalStatus('waiting');const goal = await readGoal();console.log(`${LOG_PREFIX} G1.1: task card — ${JSON.stringify(goal)}`);expect(goal?.objective).toBe(OBJECTIVE);- expect(['working', 'waiting']).toContain(goal?.status);+ expect(goal?.status).toBe('waiting');});it('G1.2 — the checklist renders all five items with their statuses', async () => {await waitForTestId('todo-checklist', 45_000);await waitForProgress(0, 5);+ await waitForGoalStatus('waiting');const items = await readChecklist();console.log(`${LOG_PREFIX} G1.2: items — ${JSON.stringify(items)}`);@@ -191,7 +201,7 @@ describe('Chat todos and goals', () => {STEPS.map(step => expect.stringContaining(step)));expect(items.map(([, status]) => status)).toEqual([- 'active',+ 'pending','pending','pending','pending',@@ -202,6 +212,7 @@ describe('Chat todos and goals', () => {it('G1.3 — a later write moves the checklist on', async () => {await sendTurn('continue');await waitForProgress(3, 5);+ await waitForGoalStatus('waiting');const items = await readChecklist();console.log(`${LOG_PREFIX} G1.3: items — ${JSON.stringify(items)}`);@@ -209,7 +220,7 @@ describe('Chat todos and goals', () => {'done','done','done',- 'active',+ 'pending','pending',]);// The goal is untouched by a todo write.diff --git a/app/test/e2e/specs/mega-flow.spec.ts b/app/test/e2e/specs/mega-flow.spec.tsindex b5234bfd9c..7f7275229e 100644--- a/app/test/e2e/specs/mega-flow.spec.ts+++ b/app/test/e2e/specs/mega-flow.spec.ts@@ -1,6 +1,6 @@// @ts-nocheck/**- * Mega e2e flow — login + Gmail OAuth + Composio triggers in one Mac2 session.+ * Mega e2e flow — login, account lifecycle, and thread behavior in one Mac2 session.** Architecture (per design discussion 2026-05-12):* - One Appium Mac2 session, one app launch — no per-scenario restarts.@@ -8,7 +8,7 @@* 1. Deep links (`openhuman://auth?…`, `openhuman://oauth/success?…`) —* Mac2 supports these natively via `macos: deepLink`.* 2. Mock backend behavior knobs and the in-process request log.- * 3. Core JSON-RPC for state inspection and `composio_*` calls.+ * 3. Core JSON-RPC for state inspection and selected local contracts.* - Assertions read from the mock request log and RPC results — never from* the CEF WebView accessibility tree (which exposes zero DOM to XCUITest).* - Between scenarios, reset state in-app via `openhuman.config_reset_local_data`@@ -21,7 +21,6 @@* - Bypass login (deep-link `key=auth`): no consume call but session set* - Connect Gmail via OAuth deep-link success path* - OAuth error path is exercised by Scenario 5- * - Composio: list connections, enable trigger, list triggers, state mutates* - Factory reset between scenarios (the real product flow)** The smoke spec proved the driver+bundle work; this spec proves the *flows* work.@@ -31,7 +30,7 @@ import os from 'node:os';import path from 'node:path';import { waitForApp } from '../helpers/app-helpers';-import { callOpenhumanRpc, expectRpcOk } from '../helpers/core-rpc';+import { callOpenhumanRpc } from '../helpers/core-rpc';import { triggerDeepLink } from '../helpers/deep-link-helpers';import { hasAppChrome } from '../helpers/element-helpers';import {@@ -39,7 +38,6 @@ import {getRequestLog,resetMockBehavior,setMockBehavior,- setMockBehaviors,startMockServer,stopMockServer,} from '../mock-server';@@ -56,13 +54,6 @@ function writeMockConfig(): void {fs.writeFileSync(CONFIG_FILE, `api_url = "${MOCK_URL}"\n`, 'utf8');}-function buildBypassJwt(userId: string): string {- const payload = Buffer.from(- JSON.stringify({ sub: userId, userId, exp: Math.floor(Date.now() / 1000) + 3600 })- ).toString('base64url');- return `eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.${payload}.sig`;-}-async function waitForMockRequest(method: string,urlFragment: string,@@ -239,16 +230,12 @@ describe('Mega flow — login + Gmail OAuth + Composio in one session', () => {}});- // Scenario 4 — Composio trigger RPC semantics are covered by the owning- // core tests (`composio_enable_trigger_via_mock` and related controller tests).- // This desktop mega-flow must keep its assertions on visible host behavior.-// -------------------------------------------------------------------------// Scenario 5 — OAuth error path. Verifies the app handles the failure// deep link without crashing the session.// -------------------------------------------------------------------------it('Gmail OAuth: error deep link does not crash the session', async () => {- await resetEverything('after Scenario 4');+ await resetEverything('before Gmail OAuth error scenario');await triggerDeepLink('openhuman://auth?token=mega-error-token');await waitForMockRequest('POST', '/auth/login-token/consume', 15_000);@@ -448,14 +435,9 @@ describe('Mega flow — login + Gmail OAuth + Composio in one session', () => {});// -------------------------------------------------------------------------- // Scenario 11 — Composio trigger + webhook roundtrip.- // Extends Scenario 4 with the webhook-side leg:- // 1. Enable a Composio trigger (already covered by Scenario 4).- // 2. Register a webhook echo tunnel so the core has a receiver.- // The old Composio/webhook leg asserted a direct mock HTTP POST and core RPC- // state, not a visible desktop flow. Composio trigger behavior is exercised- // in the core-owned tests; webhook ingress contract coverage belongs to its- // owning RPC tests. See #234 for narrowing mixed E2E specs to UI assertions.+ // The removed Composio webhook leg asserted a direct mock POST and core RPC+ // state rather than visible desktop behavior; #234 owns trimming such mixed+ // E2E specs, and the remaining flow keeps its assertions on current surfaces.// -------------------------------------------------------------------------// Scenario 12 — update.version RPC contract.diff --git a/app/test/e2e/specs/voice-mode.spec.ts b/app/test/e2e/specs/voice-mode.spec.tsindex 2e5496304d..3b0c3dfcb0 100644--- a/app/test/e2e/specs/voice-mode.spec.ts+++ b/app/test/e2e/specs/voice-mode.spec.ts@@ -24,13 +24,7 @@ import {} from '../helpers/element-helpers';import { supportsExecuteScript } from '../helpers/platform';import { completeOnboardingIfVisible } from '../helpers/shared-flows';-import {- clearRequestLog,- getRequestLog,- setMockBehavior,- startMockServer,- stopMockServer,-} from '../mock-server';+import { clearRequestLog, getRequestLog, startMockServer, stopMockServer } from '../mock-server';async function waitForRequest(method, urlFragment, timeout = 15_000) {const deadline = Date.now() + timeout;@@ -65,8 +59,10 @@ async function waitForAnyText(candidates, timeout = 20_000) {return null;}-// Browser-media UI behavior now lives in Playwright (`test/playwright/specs/voice-mode.spec.ts`).-// Keep WDIO/Appium focused on desktop/native-only coverage.+// Both cases in this suite have current Playwright equivalents:+// `chat mic button switches into MicComposer and can return to text mode` and+// the `switchChatIntoMicComposer` control checks for permission/device cases.+// Issue #236 decides which runner owns these duplicate SPA-only assertions.describe.skip(// https://github.com/senamakel/openhuman/issues/236'Voice mode integration', () => {before(async () => {@@ -174,41 +170,15 @@ describe('Voice mode — hosted STT contract (voice_status RPC)', () => {});/**- * Human tab voice capture and error mapping (issue #1610)- *- * These tests exercise the MicComposer on the Human tab (/human route) to- * verify:- * 6.1 — The Human tab renders with the mic composer in idle state.- * 6.2 — The voice_stt_dispatch RPC contract: calling the RPC with a minimal- * audio payload through the mock server returns a well-formed- * transcription result (or a structured error — not a generic crash).- * 6.3 — Permission-denied path: when getUserMedia throws NotAllowedError,- * the error banner carries a specific error code (not "Something went- * wrong"), verified via the data-chat-send-error-code DOM attribute.- * 6.4 — No-device path: when getUserMedia throws NotFoundError / the headless- * CEF environment has no mic, the composer surfaces a specific- * no-device or microphone-access error (not a generic crash).- * 6.5 — Beep-placeholder guard: the chat thread must not contain the literal- * string "beep" as a user utterance after the mic button is tapped in- * a headless environment (regression guard for #1610).- *- * Headless CEF reality:- * The headless docker runner has no real microphone. All flows that require- * actual audio capture are driven by JS mocking of navigator.mediaDevices.- * The `browser.execute` approach is supported on tauri-driver (Linux/CEF);- * on Mac2 (Appium) these tests fall back to it.skip with an explanatory- * comment because the Mac2 driver does not expose JS execution in the WebView.- *- * Navigation:- * The Human tab is reached by navigating to the /human hash route. The- * BottomTabBar renders a button with aria-label="Human". We use- * browser.execute to set window.location.hash directly, which avoids- * element-visibility races on the tab bar.+ * Remaining desktop voice coverage: the shipped mic surface on the current+ * chat route, plus the unsupported spoken-audio round-trip. The synthetic+ * `voice_stt_dispatch` call moved to the JSON-RPC integration layer;+ * permission/device and beep-placeholder browser API flows live in the+ * Playwright voice-mode spec.*/-// These Human-tab getUserMedia / MediaRecorder behaviors are browser API paths,-// not native-shell concerns. They are covered in Playwright now.-describe.skip(// https://github.com/senamakel/openhuman/issues/236-'Voice mode — Human tab capture & error mapping (#1610)', () => {+// This suite is no longer blanket-skipped: its current mic UI assertion runs,+// while only the real-audio injection case remains blocked by #435.+describe('Voice mode — Human tab capture & error mapping', () => {before(async () => {await startMockServer();await waitForApp();@@ -232,78 +202,12 @@ describe.skip(// https://github.com/senamakel/openhuman/issues/236} else {// Mac2 path: use the shared helper which abstracts the XCUIElementTypeButton// XPath so the selector stays cross-driver and policy-compliant.- await clickNativeButton('Assistant');+ await clickButton('Assistant');}// Allow React router to settle and the Chat page to mount.await browser.pause(1_500);}- // ---------------------------------------------------------------------------- // Helper: inject a getUserMedia mock that throws a named DOMException.- // The real navigator.mediaDevices.getUserMedia is replaced for the duration- // of a single test; the spec restores it afterwards. Only works on- // tauri-driver / CEF where browser.execute reaches the WebView DOM.- // ---------------------------------------------------------------------------- async function mockGetUserMediaError(domExceptionName: string): Promise<void> {- await browser.execute((name: string) => {- // Store the real implementation so the test can restore it.- (window as any).__e2e_gum_original = navigator.mediaDevices?.getUserMedia?.bind(- navigator.mediaDevices- );- // Replace with a function that rejects with the requested DOMException.- Object.defineProperty(navigator.mediaDevices, 'getUserMedia', {- configurable: true,- value: () => {- const err = new DOMException(`[E2E mock] getUserMedia blocked (${name})`, name);- return Promise.reject(err);- },- });- }, domExceptionName);- }-- async function restoreGetUserMedia(): Promise<void> {- await browser.execute(() => {- const original = (window as any).__e2e_gum_original;- if (original && navigator.mediaDevices) {- Object.defineProperty(navigator.mediaDevices, 'getUserMedia', {- configurable: true,- value: original,- });- }- delete (window as any).__e2e_gum_original;- });- }-- // ---------------------------------------------------------------------------- // Helper: wait for a data-chat-send-error-code attribute to appear in the- // DOM and return its value. Returns null if the element does not appear- // within the timeout.- // ---------------------------------------------------------------------------- async function waitForSendErrorCode(timeout = 10_000): Promise<string | null> {- if (!supportsExecuteScript()) return null;- const deadline = Date.now() + timeout;- while (Date.now() < deadline) {- const code = await browser.execute(() => {- const el = document.querySelector('[data-chat-send-error-code]');- return el ? el.getAttribute('data-chat-send-error-code') : null;- });- if (code) return code as string;- await browser.pause(400);- }- return null;- }-- // ---------------------------------------------------------------------------- // Helper: read the full text of the error banner message element.- // ---------------------------------------------------------------------------- async function getSendErrorMessage(): Promise<string> {- if (!supportsExecuteScript()) return '';- return (await browser.execute(() => {- const el = document.querySelector('[data-chat-send-error-code]');- return el ? ((el as HTMLElement).textContent ?? '') : '';- })) as string;- }-// ---------------------------------------------------------------------------// 6.1 — Human tab renders with MicComposer in idle state.//@@ -320,405 +224,22 @@ describe.skip(// https://github.com/senamakel/openhuman/issues/236await navigateToHumanTab();- // The Human page renders a "Push to Talk" checkbox in the mascot header.- const hasPushToTalk = await textExists('Push to Talk');- if (!hasPushToTalk) {- const tree = await dumpAccessibilityTree();- console.log(- '[HumanTabE2E:6.1] Push-to-Talk not found. Accessibility tree:\n',- tree.slice(0, 4_000)- );- }- expect(hasPushToTalk).toBe(true);-- // The MicComposer is embedded via the sidebar Conversations with- // composer="mic-cloud". The idle button label is "Tap and speak".- const hasMicLabel = await textExists('Tap and speak');- if (!hasMicLabel) {- // Accept "Waiting for agent..." — the composer is mounted but a thread- // load is still in flight. Either label proves the MicComposer is up.- const hasWaiting = await textExists('Waiting for agent');- if (!hasWaiting) {- const tree = await dumpAccessibilityTree();- console.log('[HumanTabE2E:6.1] Mic label not found. Tree:\n', tree.slice(0, 4_000));- }- expect(hasWaiting).toBe(true);- }- });-- // ---------------------------------------------------------------------------- // 6.2 — voice_stt_dispatch RPC returns a well-formed result or structured- // error (not a generic crash) when called with a minimal audio payload.- //- // In the E2E environment the mock server handles- // /openai/v1/audio/transcriptions — so the cloud STT path returns- // "Mock transcription from the E2E server." The test uses- // `setMockBehavior('audioTranscriptionText', ...)` to set a known value,- // then calls the RPC directly over HTTP using callOpenhumanRpc. No actual- // microphone or MediaRecorder is involved.- // ---------------------------------------------------------------------------- it('6.2 — voice_stt_dispatch RPC returns well-formed result with mock transcription payload', async () => {- // Configure the mock server to return a known transcript.- setMockBehavior('audioTranscriptionText', 'hello from the E2E voice test');-- // Build a minimal valid WAV buffer: 44-byte header + 1 silent frame.- // The Rust core decodes base64 audio and passes it to the STT provider;- // for the cloud path the actual content just needs to be non-empty.- const silentWavBase64 = await browser.execute(() => {- const sampleRate = 16_000;- const numSamples = 160; // 10 ms of silence at 16kHz- const dataBytes = numSamples * 2; // 16-bit PCM-- const buf = new ArrayBuffer(44 + dataBytes);- const view = new DataView(buf);- const writeAscii = (offset: number, s: string) => {- for (let i = 0; i < s.length; i++) view.setUint8(offset + i, s.charCodeAt(i));- };-- writeAscii(0, 'RIFF');- view.setUint32(4, 36 + dataBytes, true);- writeAscii(8, 'WAVE');- writeAscii(12, 'fmt ');- view.setUint32(16, 16, true); // chunk size- view.setUint16(20, 1, true); // PCM- view.setUint16(22, 1, true); // mono- view.setUint32(24, sampleRate, true);- view.setUint32(28, sampleRate * 2, true); // byte rate- view.setUint16(32, 2, true); // block align- view.setUint16(34, 16, true); // bits per sample- writeAscii(36, 'data');- view.setUint32(40, dataBytes, true);- // Samples are already zeroed.-- const bytes = new Uint8Array(buf);- const CHUNK = 0x8000;- let binary = '';- for (let i = 0; i < bytes.length; i += CHUNK) {- binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK));- }- return btoa(binary);- });-- const result = await callOpenhumanRpc('openhuman.voice_stt_dispatch', {- audio_base64: silentWavBase64,- mime_type: 'audio/wav',- file_name: 'test.wav',- });-- // The result must be defined and must be an object — not a raw string- // or an unhandled panic. The actual transcription text may differ- // (depends on which STT provider the core resolved), but the shape must- // have a `text` field (or a `result.text` field via Outcome).- expect(result).toBeDefined();- const payload = (result as any).result ?? result;- expect(typeof payload).toBe('object');- // `text` is the canonical field on FactoryTranscribeResult.- expect('text' in payload || 'error' in payload || 'code' in payload).toBe(true);- // When the cloud path ran, the mock returns our known text.- if ('text' in payload) {- expect(typeof payload.text).toBe('string');- // Not a generic crash string.- expect((payload.text as string).toLowerCase()).not.toContain('something went wrong');- }- });-- // ---------------------------------------------------------------------------- // 6.3 — Permission-denied path.- //- // When getUserMedia throws NotAllowedError the MicComposer maps it to- // `onError('Microphone permission denied: …')`, which Conversations wraps- // into chatSendError('voice_transcription', message). The error banner must- // carry data-chat-send-error-code != "" and the message must mention- // "permission" or "denied" — not the generic "Something went wrong".- //- // This test uses browser.execute to replace navigator.mediaDevices.getUserMedia- // with a mock that rejects with NotAllowedError. This is only possible on- // tauri-driver (Linux/CEF). On Mac2 (Appium) the test is skipped because the- // Mac2 driver does not expose JavaScript execution inside the WKWebView.- // ---------------------------------------------------------------------------- it('6.3 — permission-denied getUserMedia surfaces specific error code, not generic failure', async () => {- if (!supportsExecuteScript()) {- // Mac2 / Appium path — JS injection into WKWebView is not supported.- // The OS-level permission dialog cannot be driven programmatically from- // the test harness either. Skip with explanation.- console.log(- '[HumanTabE2E:6.3] SKIP — Mac2 driver does not support browser.execute() in WKWebView. ' +- 'Permission-denied path requires JS mocking of navigator.mediaDevices.getUserMedia.'- );- return;- }-- await navigateToHumanTab();-- // Replace getUserMedia with a NotAllowedError-throwing mock.- await mockGetUserMediaError('NotAllowedError');-- try {- // Click the "Start recording" button (aria-label on the <button> in MicComposer).- const clicked = await browser.execute(() => {- const btn = document.querySelector<HTMLButtonElement>('[aria-label="Start recording"]');- if (!btn) return false;- btn.click();- return true;- });-- if (!clicked) {- // If the button wasn't found, the Human tab may not have fully- // mounted yet — wait for the Tap-and-speak label and retry once.- await browser.pause(1_500);- const retried = await browser.execute(() => {- const btn = document.querySelector<HTMLButtonElement>('[aria-label="Start recording"]');- if (btn) {- btn.click();- return true;- }- return false;- });- if (!retried) {- // Dump the tree for diagnosis, then fail explicitly so CI catches- // regressions where the Human tab stops mounting in time.- const tree = await dumpAccessibilityTree();- console.log(- '[HumanTabE2E:6.3] Start-recording button not found. Tree:\n',- tree.slice(0, 4_000)- );- throw new Error(- '[HumanTabE2E:6.3] Start-recording button not found after retry — Human tab did not mount in time'- );- }- }-- // Wait for the error banner to appear.- const errorCode = await waitForSendErrorCode(8_000);- if (!errorCode) {- const tree = await dumpAccessibilityTree();- console.log(- '[HumanTabE2E:6.3] No error banner appeared after NotAllowedError. Tree:\n',- tree.slice(0, 4_000)- );- }-- // The error code must be set (any specific code is better than nothing).- expect(errorCode).not.toBeNull();- expect(errorCode!.length).toBeGreaterThan(0);-- // The error message must include "permission" or "denied" so the user- // gets actionable feedback — not a generic "Something went wrong".- const msg = await getSendErrorMessage();- const lowerMsg = msg.toLowerCase();- const isActionable =- lowerMsg.includes('permission') ||- lowerMsg.includes('denied') ||- lowerMsg.includes('microphone');- if (!isActionable) {- console.log('[HumanTabE2E:6.3] Error message was not actionable:', msg);- }- expect(isActionable).toBe(true);-- // Regression guard: must never say "Something went wrong".- expect(lowerMsg).not.toContain('something went wrong');- } finally {- await restoreGetUserMedia();- }- });-- // ---------------------------------------------------------------------------- // 6.4 — No-device / NotFoundError path.- //- // When getUserMedia throws NotFoundError (no audio input device available —- // the typical headless CEF scenario) the MicComposer maps it to- // 'Selected microphone is unavailable — try a different device.' via- // onError, which surfaces as chatSendError('voice_transcription', …).- // The error must be specific to the hardware absence, not a generic crash.- //- // On tauri-driver: we first let the native headless getUserMedia fail- // naturally (no mock needed — CEF on Linux docker has no mic device).- // If getUserMedia somehow succeeds (e.g. a virtual ALSA loopback is- // present), we fall back to mocking NotFoundError to keep the contract- // assertion reliable.- //- // On Mac2: skipped (no browser.execute support).- // ---------------------------------------------------------------------------- it('6.4 — no-device getUserMedia (NotFoundError) surfaces specific no-audio error, not generic failure', async () => {- if (!supportsExecuteScript()) {- console.log(- '[HumanTabE2E:6.4] SKIP — Mac2 driver does not support browser.execute(). ' +- 'No-device path requires either natural headless failure or JS mock of getUserMedia.'- );- return;- }-- await navigateToHumanTab();-- // Check whether the headless environment naturally lacks an audio device.- // If getUserMedia would succeed (virtual loopback present), we mock it.- const hasRealDevice = await browser.execute(async () => {- if (!navigator.mediaDevices?.enumerateDevices) return false;- try {- const devices = await navigator.mediaDevices.enumerateDevices();- return devices.some((d: MediaDeviceInfo) => d.kind === 'audioinput');- } catch {- return false;- }- });-- if (hasRealDevice) {- // Virtual audio device present — inject NotFoundError to simulate- // the no-device path reliably.- await mockGetUserMediaError('NotFoundError');- }- // If no real device is present, clicking the button naturally triggers- // NotFoundError from the browser itself — no mock needed.-- try {- const clicked = await browser.execute(() => {- const btn = document.querySelector<HTMLButtonElement>('[aria-label="Start recording"]');- if (!btn) return false;- btn.click();- return true;- });-- if (!clicked) {- await browser.pause(1_500);- const retried = await browser.execute(() => {- const btn = document.querySelector<HTMLButtonElement>('[aria-label="Start recording"]');- if (btn) {- btn.click();- return true;- }- return false;- });- if (!retried) {- const tree = await dumpAccessibilityTree();- console.log(- '[HumanTabE2E:6.4] Start-recording button not found. Tree:\n',- tree.slice(0, 4_000)- );- throw new Error(- '[HumanTabE2E:6.4] Start-recording button not found after retry — Human tab did not mount in time'- );- }- }-- // Wait for the error banner.- const errorCode = await waitForSendErrorCode(8_000);- if (!errorCode) {- const tree = await dumpAccessibilityTree();- console.log(- '[HumanTabE2E:6.4] No error banner after NotFoundError/no-device. Tree:\n',- tree.slice(0, 4_000)- );- }-- expect(errorCode).not.toBeNull();- expect(errorCode!.length).toBeGreaterThan(0);-- // The message must mention the hardware absence specifically.- const msg = await getSendErrorMessage();- const lowerMsg = msg.toLowerCase();- const isSpecific =- lowerMsg.includes('microphone') ||- lowerMsg.includes('unavailable') ||- lowerMsg.includes('device') ||- lowerMsg.includes('access') ||- lowerMsg.includes('not found');- if (!isSpecific) {- console.log('[HumanTabE2E:6.4] Error message was not specific:', msg);- }- expect(isSpecific).toBe(true);-- // Regression guard.- expect(lowerMsg).not.toContain('something went wrong');- } finally {- if (hasRealDevice) {- await restoreGetUserMedia();- }- }+ // /human is a compatibility redirect into the current chat composer. Pin+ // the controls users can invoke there rather than the removed setup label.+ expect(await textExists('Voice mode')).toBe(true);+ await clickButton('Voice mode');+ expect(await textExists('Switch to text')).toBe(true);+ expect(await waitForAnyText(['Tap and speak', 'Waiting for agent'], 10_000)).not.toBeNull();});- // ---------------------------------------------------------------------------- // 6.5 — Beep-placeholder guard (regression for #1610).- //- // The chat thread must not contain the literal string "beep" as a user- // message after the mic button is tapped in a headless environment and- // getUserMedia fails. An earlier implementation emitted a placeholder beep- // token as the user utterance when capture was not available.- //- // We mock NotAllowedError (the clearest failure) and assert the thread log- // does not include a user message containing "beep".- // ---------------------------------------------------------------------------- it('6.5 — beep placeholder is not emitted as a user utterance after mic failure', async () => {- if (!supportsExecuteScript()) {- console.log(- '[HumanTabE2E:6.5] SKIP — Mac2 driver does not support browser.execute(). ' +- 'Beep-placeholder guard requires JS thread inspection.'- );- return;- }-- await navigateToHumanTab();- await mockGetUserMediaError('NotAllowedError');-- try {- // Dismiss any existing error banner so we get a clean slate.- await browser.execute(() => {- const dismissBtn = document.querySelector<HTMLButtonElement>(- '[data-chat-send-error-code] ~ div button'- );- dismissBtn?.click();- });- await browser.pause(300);-- // Tap the mic button.- await browser.execute(() => {- const btn = document.querySelector<HTMLButtonElement>('[aria-label="Start recording"]');- btn?.click();- });-- // Wait for the error to surface.- await waitForSendErrorCode(8_000);-- // Now assert that no user message bubble in the thread says "beep".- //- // Rows are the assistant-ui transcript's message roots, which carry- // `data-role` ("user" / "assistant"). The `listMounted` check below is- // what keeps the assertion from regressing into a vacuous pass (an empty- // NodeList) if those hooks are ever renamed.- const probe = await browser.execute(() => {- const listMounted = !!document.querySelector('[data-slot="aui_thread-viewport"]');- const rows = Array.from(- document.querySelectorAll(- '[data-slot="aui_user-message-root"], [data-slot="aui_assistant-message-root"]'- )- );- const userRows = rows.filter(el => el.getAttribute('data-role') === 'user');- const hasBeep = (el: Element) =>- (el as HTMLElement).textContent?.toLowerCase().includes('beep') ?? false;- return {- listMounted,- rowCount: rows.length,- userRowCount: userRows.length,- beepInUserMessage: userRows.some(hasBeep),- beepAnywhereInThread: rows.some(hasBeep),- };- });-- // Selector-rot guard: if the transcript itself is not mounted we are not- // inspecting the thread at all, and "no beep found" means nothing.- expect(probe.listMounted).toBe(true);+ // 6.2 was an RPC-only call with a synthetic payload. The owner-layer JSON-RPC+ // integration test now pins dispatch and structured invalid-audio handling.- // The real regression guard (#1610): no placeholder utterance was- // emitted. Zero user rows is a legitimate pass here — it means nothing- // was appended — but it is now distinguishable from "the selector- // matched nothing", which is the failure mode this test previously had.- expect(probe.beepInUserMessage).toBe(false);- // Wider net: the placeholder must not appear on any row, in case a- // future implementation renders it under a different sender.- expect(probe.beepAnywhereInThread).toBe(false);- } finally {- await restoreGetUserMedia();- }- });+ // The permission-denied and missing-device outcomes are asserted by the+ // current Playwright voice-mode UI cases; beep-placeholder behavior has its+ // own Playwright regression. Those browser-API copies were removed here so+ // this desktop suite only keeps its current native surface and the+ // unsupported real-audio round-trip below.// ---------------------------------------------------------------------------// 6.6 — Actual transcription round-trip with mocked audio device (SKIPPED).@@ -735,11 +256,11 @@ describe.skip(// https://github.com/senamakel/openhuman/issues/236// This skip records the gap: there is no E2E path that drives real audio// through MediaRecorder in the CI headless environment.//- // Tracked: issue #1610. Remove skip when the test harness supports audio+ // Tracked: issue #435. Remove skip when the test harness supports audio// injection (e.g. via a virtual ALSA device + pre-recorded WAV replayer, or// a fake getUserMedia implementation that returns a pre-seeded MediaStream).// ---------------------------------------------------------------------------- it.skip(// https://github.com/tinyhumansai/openhuman/issues/1610+ it.skip(// https://github.com/senamakel/openhuman/issues/435'6.6 — spoken prompt round-trip: mic → STT → user bubble → agent reply (requires real/virtual audio device)', async () => {// When unblocked:// 1. Navigate to /human.diff --git a/app/test/playwright/specs/aui-tool-result-elements.spec.ts b/app/test/playwright/specs/aui-tool-result-elements.spec.tsnew file mode 100644index 0000000000..5cf2ffc730--- /dev/null+++ b/app/test/playwright/specs/aui-tool-result-elements.spec.ts@@ -0,0 +1,300 @@+/**+ * assistant-ui tool-result presentation elements, end to end.+ *+ * Covers three vendored element families that had **zero** e2e coverage before+ * this file (`git grep -l 'code-diff\|data-table\|artifact-card'` over+ * `test/playwright/specs` and `test/e2e/specs` returned nothing):+ *+ * | Element | Real importer on the product chat path | What makes it appear |+ * |---|---|---|+ * | `elements/code-diff.tsx` | `features/conversations/tools/ToolBodies.tsx` `FileBody` | an `edit` tool call carrying `old_string` / `new_string` |+ * | `elements/data-table.tsx` | `features/conversations/tools/ToolDataView.tsx` | a tool result that is a flat, uniform object array |+ * | `elements/artifact-card.tsx` | `features/conversations/aui/MediaAndDocumentCalls.tsx` `DocumentArtifactCall` | a `generate_document` / `generate_presentation` call |+ *+ * **Not** driven through the dev-only gallery at `/dev/tools`+ * (`pages/dev/ToolCallGallery.tsx`, "Registered only in dev builds"). That+ * route imports several of these families and is the easy way to make them+ * render, but it proves nothing about the product: it mounts the elements with+ * hand-written props instead of letting a tool result reach them. Every+ * assertion below goes through a real turn — the mock LLM emits a tool call,+ * the core runs it, and the chat renders the result.+ *+ * Turns go over `openhuman.channel_web_chat` via `helpers/chat-drive.ts`, never+ * the composer: `ComposerTextBridge` used to take the chat surface to its error+ * boundary when driven at speed, and a spec about a tool result should not be+ * able to fail for a composer reason.+ *+ * No real backend or third-party calls: the mock LLM is scripted with+ * `llmKeywordRules`, and the Composio action's payload comes from the mock's own+ * `composioExecuteResponse_<ACTION>` behaviour knob.+ *+ * These assertions use the current shipped toolkit: FileBody renders edits,+ * ToolDataView renders flat tabular results, and DocumentArtifactCall renders+ * generated document titles. They remain separate from grouped task insights.+ */+import { expect, type Locator, type Page, test } from '@playwright/test';++import {+ resetMock,+ sendTurn,+ setKeywordRules,+ setMockBehavior,+ startNewThread,+ waitForConnectedSocketId,+} from '../helpers/chat-drive';+import {+ bootAuthenticatedPage,+ dismissWalkthroughIfPresent,+ waitForAppReady,+} from '../helpers/core-rpc';++const USER_ID = 'pw-aui-tool-result-elements';++async function openChat(page: Page): Promise<string> {+ await bootAuthenticatedPage(page, USER_ID, '/chat');+ await page.goto('/#/chat');+ await waitForAppReady(page);+ await dismissWalkthroughIfPresent(page);+ await expect(page.getByTestId('chat-message-input')).toBeVisible();+ await waitForConnectedSocketId(page);+ return startNewThread(page);+}++/**+ * Script the mock LLM to answer ONE prompt with a tool call.+ *+ * Keyword-matched (`llmKeywordRules`), deliberately not the `llmForcedResponses`+ * queue. The queue is consumed in order by *every* LLM request the process+ * makes, and booting a page and opening a thread makes some of its own before+ * the turn under test — so entry #1 (the tool call) gets eaten and the turn+ * receives entry #2. The symptom is nasty: the round completes, a reply+ * appears, and no tool call ever happens. The first revision of this file used+ * the queue and all four cases failed that way. A keyword rule fires on the+ * prompt text instead, so it cannot be consumed by an unrelated request.+ *+ * No canary: the follow-up response falls through to the mock's default+ * (`llm.mjs:505-516`), and waiting for the rendered body is the better settle+ * signal anyway — `AssistantUiToolCall` mounts `richBody` only once the call is+ * no longer running.+ */+async function scriptToolCall(+ keyword: string,+ toolCalls: { name: string; arguments: Record<string, unknown> }[]+): Promise<void> {+ await setKeywordRules([{ keyword, toolCalls }]);+ await setMockBehavior('llmStreamChunkDelayMs', '10');+}++/**+ * Wait for the round to have produced a tool card at all, then open it.+ *+ * Staged deliberately. The bodies below live inside a Radix+ * `CollapsibleContent` (`elements/tool-call.tsx:77-119`), which UNMOUNTS its+ * children while closed, and a settled tool card starts closed —+ * `useDisclosure(key, awaitingUser)` defaults to `awaitingUser`, which is+ * `false` for an ordinary call (`AssistantUiToolCall.tsx:100-102`). So "element+ * not found" has two very different causes: the tool never ran, or it ran and+ * the card is shut. Asserting the card first separates them, instead of+ * reporting a core problem as a rendering one.+ *+ * The trigger is identified by `aria-expanded`, which Radix owns, rather than+ * "the first button in the card" — an earlier revision clicked by button order+ * and silently opened nothing.+ */+async function openToolCall(page: Page, expectedLabel: string | RegExp): Promise<Locator> {+ const card = page.getByTestId('assistant-ui-tool-call').filter({ hasText: expectedLabel });+ await expect(+ card.first(),+ `the round settled but produced no tool card matching ${String(expectedLabel)} — ` ++ 'the core did not run the scripted tool call, so nothing downstream can be about rendering'+ ).toBeVisible({ timeout: 30_000 });++ const target = card.last();+ const trigger = target.locator('[aria-expanded]').first();+ if ((await trigger.getAttribute('aria-expanded')) === 'false') {+ await trigger.click({ force: true });+ }+ // Positive confirmation that the click landed. Without it a missed trigger+ // reads downstream as "the element does not render".+ await expect(trigger).toHaveAttribute('aria-expanded', 'true', { timeout: 10_000 });+ return target;+}++test.describe('assistant-ui tool-result elements', () => {+ test.beforeEach(async () => {+ await resetMock();+ // The Composio case below calls a GitHub action. Without a seeded toolkit+ // and an ACTIVE connection the action is not reachable and the round would+ // settle on an error body rather than a tabular result — the same seeding+ // `harness-composio-tool-flow.spec.ts` does.+ await setMockBehavior('composioToolkits', JSON.stringify(['github']));+ await setMockBehavior(+ 'composioConnections',+ JSON.stringify([{ id: 'conn-github', toolkit: 'github', status: 'ACTIVE' }])+ );+ });++ // ── elements/code-diff.tsx ────────────────────────────────────────────++ test('an edit renders its added and removed lines through the code-diff element', async ({+ page,+ }) => {+ const threadId = await openChat(page);+ const PROMPT = 'AUI-DIFF-CASE raise the retry count and the timeout';+ await scriptToolCall('AUI-DIFF-CASE', [+ {+ name: 'edit',+ arguments: {+ path: 'e2e/aui/diff-subject.ts',+ old_string: 'const retries = 1;\nconst timeoutMs = 500;',+ new_string: 'const retries = 5;\nconst timeoutMs = 2000;',+ },+ },+ ]);++ await sendTurn(page, threadId, PROMPT);+ const card = await openToolCall(page, /Edit|edit/);++ const diff = card.getByTestId('tool-body-file-diff').first();+ await expect(diff).toBeVisible({ timeout: 20_000 });++ // The filename, shortened by `shortenPath`, identifies which file changed.+ await expect(diff).toContainText('diff-subject.ts');++ // Both sides render, and each carries its own text. A diff that dropped+ // the removed side, or rendered the old text on both, still shows a card.+ await expect(diff).toContainText('const retries = 1;');+ await expect(diff).toContainText('const retries = 5;');+ await expect(diff).toContainText('const timeoutMs = 500;');+ await expect(diff).toContainText('const timeoutMs = 2000;');++ // The counts must agree with the payload: two lines removed, two added.+ // `FileBody` derives them from the args it was handed+ // (`ToolBodies.tsx:214-226`), so a header that disagrees with the body is+ // the miscount this pins.+ await expect(diff).toContainText('+2');+ await expect(diff).toContainText('−2');+ });++ test('an edit that changes nothing still reports a diff of its own size', async ({ page }) => {+ const threadId = await openChat(page);+ const PROMPT = 'AUI-NOOP-CASE rewrite that line to the same thing';+ const unchanged = 'export const VERSION = 3;';+ await scriptToolCall('AUI-NOOP-CASE', [+ {+ name: 'edit',+ arguments: {+ path: 'e2e/aui/noop-subject.ts',+ old_string: unchanged,+ new_string: unchanged,+ },+ },+ ]);++ await sendTurn(page, threadId, PROMPT);+ const card = await openToolCall(page, /Edit|edit/);++ const diff = card.getByTestId('tool-body-file-diff').first();+ await expect(diff).toBeVisible({ timeout: 20_000 });++ // This pins CURRENT behaviour, which is worth being explicit about: an+ // edit whose old and new text are identical is rendered as a full+ // removal plus a full re-addition (`+1 −1`), not as unchanged context.+ // `FileBody` never compares the two sides — it maps `old_string` to+ // removed lines and `new_string` to added lines unconditionally+ // (`ToolBodies.tsx:213-217`), so there is no "no change" branch to reach.+ //+ // I am pinning it rather than asserting what it arguably should do,+ // because a spec that asserted "renders as context" would be red against+ // shipped code and would be describing a feature request. The judgement+ // that this reads wrong is in the W5 report as a candidate issue, not+ // encoded here as a failing test.+ await expect(diff).toContainText('+1');+ await expect(diff).toContainText('−1');+ await expect(diff).toContainText(unchanged);+ });++ // ── elements/data-table.tsx ───────────────────────────────────────────++ test('a tabular tool result renders its rows and columns through the data-table element', async ({+ page,+ }) => {+ const threadId = await openChat(page);+ // `ToolDataView` renders `DataTable` only for a non-empty array of plain+ // objects that share one key set and hold only primitives+ // (`ToolDataView.tsx:isFlatObjectArray`). `result` is one of the semantic+ // keys it unwraps to before deciding, so this payload reaches the table.+ await setMockBehavior(+ 'composioExecuteResponse_GITHUB_LIST_REPOS',+ JSON.stringify({+ result: [+ { repo_name: 'openhuman', open_issues: 42, archived: false },+ { repo_name: 'tinybus', open_issues: 7, archived: false },+ ],+ })+ );+ await scriptToolCall('AUI-TABLE-CASE', [+ { name: 'GITHUB_LIST_REPOS', arguments: { limit: 2 } },+ ]);++ await sendTurn(page, threadId, 'AUI-TABLE-CASE list my repositories');+ const card = await openToolCall(page, /GITHUB_LIST_REPOS|repositor/i);++ const table = card.locator('[data-slot="data-table"]').first();+ await expect(table).toBeVisible({ timeout: 20_000 });++ // Columns come from the first row's keys, run through `friendlyLabel`+ // (`ToolDataView.tsx:flatRowColumns`), so the header is derived from the+ // payload rather than hard-coded: `repo_name` must render as "Repo name".+ await expect(table).toContainText('Repo name');+ await expect(table).toContainText('Open issues');+ await expect(table).toContainText('Archived');++ // Both rows, with their own cell values. Asserting both is what catches a+ // table that renders only the first row.+ await expect(table).toContainText('openhuman');+ await expect(table).toContainText('42');+ await expect(table).toContainText('tinybus');+ await expect(table).toContainText('7');++ // A boolean cell is stringified by `flatRowColumns`, not dropped.+ await expect(table).toContainText('false');+ });++ // ── elements/artifact-card.tsx ────────────────────────────────────────++ test('a generated document shows its own title, not the generic kind placeholder', async ({+ page,+ }) => {+ const threadId = await openChat(page);+ const DOC_TITLE = 'Q3 Infrastructure Review';+ await scriptToolCall('AUI-DOC-CASE', [+ {+ name: 'generate_document',+ arguments: { title: DOC_TITLE, prompt: 'summarise the infrastructure work this quarter' },+ },+ ]);++ await sendTurn(page, threadId, 'AUI-DOC-CASE write up the infrastructure review');+ const toolCard = await openToolCall(page, /Document|document/);++ const card = toolCard.locator('[data-slot="artifact-card"]').first();+ await expect(card).toBeVisible({ timeout: 20_000 });++ // The point of this assertion. `DocumentArtifactCall` resolves the title as+ // `result.title ?? args.title ?? kindTitle` (`MediaAndDocumentCalls.tsx:131-140`),+ // where `kindTitle` is the generic "Document" / "Presentation" string. If+ // both lookups break the card still renders, still looks right, and shows a+ // placeholder — which is exactly the failure a "does the card appear" spec+ // cannot see. So: the artifact's own title must be present, and the bare+ // placeholder must not be the card's title.+ await expect(card).toContainText(DOC_TITLE);++ // `toHaveText('Document')` on the card would never fail — the card's full+ // text also carries the meta line, so it can never equal the placeholder.+ // The title is its own node (`artifact-card.tsx:110`), so assert on that:+ // it must read the artifact's title and not the generic kind string.+ const cardTitle = card.locator('p.truncate').first();+ await expect(cardTitle).toHaveText(DOC_TITLE);+ });+});diff --git a/app/test/playwright/specs/chat-harness-subagent.spec.ts b/app/test/playwright/specs/chat-harness-subagent.spec.tsindex 61217c464c..999c2a77f3 100644--- a/app/test/playwright/specs/chat-harness-subagent.spec.ts+++ b/app/test/playwright/specs/chat-harness-subagent.spec.ts@@ -304,11 +304,9 @@ function formatDiagnostics(snapshot: DiagnosticsSnapshot): string {}test.describe('Chat Harness - Subagent', () => {- test.skip(- // https://github.com/tinyhumansai/openhuman/issues/6389- true,- 'background delivery is system-authored and cannot be deterministically keyword-scripted'- );+ // Background delivery is system-authored and cannot be deterministically+ // keyword-scripted; #6389 tracks the unresolved desktop final-synthesis case.+ test.skip(true, 'https://github.com/tinyhumansai/openhuman/issues/6389');// On any test failure, attach the harness state (mock request log, matched// keywords, selected thread, chat-runtime phase + tool timeline + lastdiff --git a/app/test/playwright/specs/chat-scroll-stick.spec.ts b/app/test/playwright/specs/chat-scroll-stick.spec.tsindex 12574b6a73..965d8ce436 100644--- a/app/test/playwright/specs/chat-scroll-stick.spec.ts+++ b/app/test/playwright/specs/chat-scroll-stick.spec.ts@@ -43,7 +43,7 @@ const SECOND_PROMPT = 'Second long answer please';/** A long reply, so the transcript overflows and there is somewhere to scroll. */const LONG_REPLY = Array.from(- { length: 40 },+ { length: 120 },(_, i) => `Line ${i + 1}: the transcript needs enough height to actually overflow the viewport. `).join('\n\n');@@ -225,8 +225,7 @@ test.describe('Chat transcript stick-to-bottom', () => {await completeTurn(page, FIRST_PROMPT, 'FIRST-REPLY-END');const overflowing = await scrollState(page);- const fixtureTooShort = overflowing.scrollHeight <= overflowing.clientHeight + 200;- test.skip(fixtureTooShort, 'fixture too short'); // https://github.com/tinyhumansai/openhuman/issues/6563+ expect(overflowing.scrollHeight).toBeGreaterThan(overflowing.clientHeight + 200);// Park the reader well above the bottom, past the 80px stick threshold.const parkedTop = Math.max(0, overflowing.scrollHeight - overflowing.clientHeight - 600);@@ -289,8 +288,7 @@ test.describe('Chat transcript stick-to-bottom', () => {await completeTurn(page, FIRST_PROMPT, 'FIRST-REPLY-END');const first = await scrollState(page);- const firstFixtureTooShort = first.scrollHeight <= first.clientHeight + 200;- test.skip(firstFixtureTooShort, 'fixture too short'); // https://github.com/tinyhumansai/openhuman/issues/6563+ expect(first.scrollHeight).toBeGreaterThan(first.clientHeight + 200);await scrollTo(page, first.scrollHeight);expect((await scrollState(page)).distanceFromBottom).toBeLessThanOrEqual(80);@@ -380,8 +378,7 @@ test.describe('Chat transcript stick-to-bottom', () => {expect(threadA, 'thread A must have an id').not.toBeNull();const overflowing = await scrollState(page);- const threadFixtureTooShort = overflowing.scrollHeight <= overflowing.clientHeight + 200;- test.skip(threadFixtureTooShort, 'fixture too short'); // https://github.com/tinyhumansai/openhuman/issues/6563+ expect(overflowing.scrollHeight).toBeGreaterThan(overflowing.clientHeight + 200);// Thread B. Leaving A is what puts A's messages in the cache.await startNewThread(page);diff --git a/app/test/playwright/specs/chat-todo-list-render.spec.ts b/app/test/playwright/specs/chat-todo-list-render.spec.tsnew file mode 100644index 0000000000..330ae65d12--- /dev/null+++ b/app/test/playwright/specs/chat-todo-list-render.spec.ts@@ -0,0 +1,284 @@+/**+ * The `todo` tool's whole-list write, as it reaches the DOM — `elements/todo-list`+ * family, through both of its real product paths.+ *+ * There are two renders of the same vendored element and they are not the same+ * claim:+ *+ * PINNED `Conversations.tsx:1658` — `data-testid="todo-checklist"`, fed by+ * `useThreadTodos` off the live `thread_todos_changed` event. One+ * per thread, always current.+ * SNAPSHOT `aui/TodoListPart.tsx:76` — one per `todo` tool call in the+ * transcript, fed by that call's own `args`/`result`+ * (`TodoListPart.tsx:62-66` is explicit that these are different+ * sources).+ *+ * `app/test/e2e/specs/chat-todos-goals.spec.ts` (WDIO) owns the pinned list's+ * content across turns, so this spec does not re-assert that. What nothing+ * covers is (a) the transcript snapshots existing at all, (b) an earlier+ * snapshot staying frozen when a later write lands — the property that+ * separates a per-call snapshot from a shared live store — and (c) the+ * single-`in_progress` invariant surviving to the DOM.+ *+ * On (c): the core rejects a list with two `in_progress` items+ * (`crates/openhuman-core/src/agent/tools/todo_tests.rs:77`,+ * `two_in_progress_items_are_rejected`). That is enforced server-side and+ * covered there. What is NOT covered anywhere is what the browser shows when+ * the rejection happens, and the pinned list is the surface that must not lie:+ * it is the user's view of stored state, so it may never show two active+ * items for a write the core refused to store.+ *+ * Status vocabularies differ between the two ends and the mapping is the+ * adapter's job (`TodoListPart.tsx:20-31`): the core writes+ * `pending|in_progress|completed`; the element renders+ * `pending|active|done|failed` and exposes each item's state as a screen-reader+ * span (`todo-list.tsx:82`). Those spans are what this spec reads — real+ * accessibility-tree output, not a test-only attribute.+ *+ * Turns go over `openhuman.channel_web_chat` (`helpers/chat-drive.ts`), never+ * the composer.+ */+import { expect, type Locator, type Page, test } from '@playwright/test';++import {+ resetMock,+ sendTurn,+ setKeywordRules,+ setMockBehavior,+ upstreamBodies,+ waitForSelectedThreadId,+} from '../helpers/chat-drive';+import { bootAuthenticatedPage, dismissWalkthroughIfPresent } from '../helpers/core-rpc';++const USER_ID = 'pw-todo-list-render';++const STEPS = [+ 'TODOMARK read the changelog',+ 'TODOMARK draft the notes',+ 'TODOMARK publish the post',+] as const;++/** Core wire shape: the first `completed` are done, the next is in progress. */+function todos(completed: number) {+ return STEPS.map((content, index) => ({+ content,+ status: index < completed ? 'completed' : index === completed ? 'in_progress' : 'pending',+ }));+}++const RULES = [+ { keyword: 'TODOPLAN', toolCalls: [{ name: 'todo', arguments: { todos: todos(0) } }] },+ { keyword: 'TODOADVANCE', toolCalls: [{ name: 'todo', arguments: { todos: todos(2) } }] },+ {+ // Two `in_progress` items — the core must refuse this write.+ keyword: 'TODOINVALID',+ toolCalls: [+ {+ name: 'todo',+ arguments: {+ todos: [+ { content: STEPS[0], status: 'in_progress' },+ { content: STEPS[1], status: 'in_progress' },+ { content: STEPS[2], status: 'pending' },+ ],+ },+ },+ ],+ },+ // No second-leg rules on purpose. Keying one off the tool RESULT is what the+ // plan-review spec does, but it can there because the core fixes that+ // result's wording verbatim. The `todo` result is produced upstream in+ // `tinytools`, and a rule keyed on a substring like `in_progress` would also+ // match the SUCCESSFUL call's result (its payload echoes the statuses), so+ // the two turns would answer each other's script. The mock's default+ // fall-through ends each turn instead, and the specs below wait on signals+ // that do not depend on the model's words.+];++/**+ * Every rendered todo list, pinned and snapshot alike. `data-slot` is the+ * element's own attribute (`todo-list.tsx:46`), so this finds the real+ * component rather than a wrapper that happens to carry a test id.+ */+const allLists = (page: Page): Locator => page.locator('[data-slot="todo-list"]');++/** The pinned, always-current list above the composer. */+const pinnedList = (page: Page): Locator => page.getByTestId('todo-checklist');++/**+ * The per-tool-call snapshots in the transcript. The pinned render is the only+ * one given a test id (`Conversations.tsx:1659`), so excluding it leaves+ * exactly the `TodoListPart` renders.+ */+const snapshotLists = (page: Page): Locator =>+ page.locator('[data-testid="todo-receipt"] [data-slot="todo-list"]');++async function expandSnapshotReceipts(page: Page): Promise<void> {+ const receipts = page.getByTestId('todo-receipt');+ for (let index = 0; index < (await receipts.count()); index++) {+ const toggle = receipts.nth(index).getByRole('button');+ if ((await toggle.getAttribute('aria-expanded')) !== 'true') await toggle.click();+ }+}++/**+ * One list's item states, in list order, as the element publishes them to+ * assistive technology (`todo-list.tsx:82`).+ *+ * Reads the DOM directly rather than through a tolerant helper: a helper that+ * shrugged off a missing span would turn "the element stopped reporting its+ * state" into an empty array, and an empty array compares equal to an empty+ * expectation. The statuses are the subject here, so nothing about them may be+ * forgiving.+ */+async function itemStates(list: Locator): Promise<string[]> {+ return list.evaluate(root =>+ Array.from(root.querySelectorAll('li')).map(item => {+ const span = item.querySelector('span.sr-only');+ // Deliberately not `?? ''`: a missing state span is a defect in the+ // thing under test and must not read as a blank status.+ if (span === null) return '<no-state-span>';+ return (span.textContent ?? '').trim();+ })+ );+}++/** One list's item texts, in list order. */+async function itemTexts(list: Locator): Promise<string[]> {+ return list.evaluate(root =>+ Array.from(root.querySelectorAll('li')).map(item => {+ const clone = item.cloneNode(true) as HTMLElement;+ clone.querySelectorAll('span.sr-only').forEach(node => node.remove());+ return (clone.textContent ?? '').replace(/\s+/g, ' ').trim();+ })+ );+}++async function openChat(page: Page): Promise<void> {+ await bootAuthenticatedPage(page, USER_ID, '/chat');+ await dismissWalkthroughIfPresent(page);+ await expect(page.getByTestId('chat-message-input')).toBeVisible({ timeout: 30_000 });+}++test.describe.configure({ timeout: 120_000 });++test.describe('Todo list render', () => {+ test.beforeEach(async () => {+ await resetMock();+ await setKeywordRules(RULES);+ await setMockBehavior('llmStreamChunkDelayMs', '10');+ });++ test('a todo tool call renders its own snapshot in the transcript', async ({ page }) => {+ await openChat(page);++ // Control: no list of either kind before the agent writes one, so the+ // assertions below are about something that appeared.+ await expect(allLists(page), 'a todo list was on screen before any write').toHaveCount(0);++ const threadId = await waitForSelectedThreadId(page);+ const before = (await upstreamBodies()).length;+ await sendTurn(page, threadId, 'TODOPLAN write the release plan');++ // Staged upstream-first. "No transcript render" has two very different+ // causes — the tool never ran, or it ran and did not render — and the+ // element assertion alone cannot tell them apart. The round trip is the+ // upstream stage: the tool call goes out, its result comes back, and the+ // harness calls the model again. Assert that happened before blaming the+ // renderer.+ await expect+ .poll(async () => (await upstreamBodies()).length, {+ timeout: 60_000,+ message: 'the scripted todo call never completed a tool round trip',+ })+ .toBeGreaterThan(before + 1);++ await expect(+ page.getByTestId('todo-receipt'),+ 'the todo tool round-tripped but rendered nothing in the transcript'+ ).toHaveCount(1, { timeout: 60_000 });+ await expandSnapshotReceipts(page);+ await expect(snapshotLists(page)).toHaveCount(1);++ const snapshot = snapshotLists(page).first();+ await expect+ .poll(async () => itemStates(snapshot), { timeout: 30_000 })+ .toEqual(['active', 'pending', 'pending']);+ expect(+ await itemTexts(snapshot),+ 'the rendered items are not the ones the tool call carried'+ ).toEqual([...STEPS]);+ });++ test('a later write leaves the earlier snapshot frozen', async ({ page }) => {+ await openChat(page);+ const threadId = await waitForSelectedThreadId(page);++ await sendTurn(page, threadId, 'TODOPLAN write the release plan');+ await expect(page.getByTestId('todo-receipt')).toHaveCount(1, { timeout: 60_000 });+ await expandSnapshotReceipts(page);+ await expect(snapshotLists(page)).toHaveCount(1);+ await expect+ .poll(async () => itemStates(snapshotLists(page).first()), { timeout: 30_000 })+ .toEqual(['active', 'pending', 'pending']);++ await sendTurn(page, threadId, 'TODOADVANCE keep going');+ await expect(+ page.getByTestId('todo-receipt'),+ 'the second todo call did not produce its own transcript render'+ ).toHaveCount(2, { timeout: 60_000 });+ await expandSnapshotReceipts(page);+ await expect(snapshotLists(page)).toHaveCount(2);++ // The new snapshot carries the new write...+ await expect+ .poll(async () => itemStates(snapshotLists(page).nth(1)), { timeout: 30_000 })+ .toEqual(['done', 'done', 'active']);++ // ...and the first one has NOT moved. A shared store behind both renders+ // would rewrite history: the transcript would show the agent having always+ // known the final state, which is exactly what a transcript must not do.+ expect(+ await itemStates(snapshotLists(page).first()),+ 'the earlier transcript snapshot was rewritten by a later write'+ ).toEqual(['active', 'pending', 'pending']);+ });++ test('the pinned list never shows two items in progress', async ({ page }) => {+ await openChat(page);+ const threadId = await waitForSelectedThreadId(page);++ // A valid write first, so the pinned list exists and the assertion below+ // is about its contents rather than its absence.+ await sendTurn(page, threadId, 'TODOPLAN write the release plan');+ await expect(pinnedList(page), 'the pinned checklist never appeared').toBeVisible({+ timeout: 60_000,+ });+ await expect+ .poll(async () => itemStates(pinnedList(page)), { timeout: 30_000 })+ .toEqual(['active', 'pending', 'pending']);++ // Now a write the core refuses (`todo_tests.rs:77`).+ //+ // The rejected call has to have actually round-tripped before the pinned+ // list is worth reading — otherwise "still one active" would just mean+ // nothing had happened yet, and the test would pass on an empty window.+ // Counting upstream requests is the signal that does not depend on the+ // model's wording: the tool call goes out, its result comes back, and the+ // harness calls the model again to continue the turn.+ const before = (await upstreamBodies()).length;+ await sendTurn(page, threadId, 'TODOINVALID do two things at once');+ await expect+ .poll(async () => (await upstreamBodies()).length, {+ timeout: 60_000,+ message: 'the rejected write never completed its tool round trip',+ })+ .toBeGreaterThan(before + 1);++ const states = await itemStates(pinnedList(page));+ expect(+ states.filter(state => state === 'active').length,+ `the pinned checklist showed a list the core refused to store: ${JSON.stringify(states)}`+ ).toBeLessThanOrEqual(1);+ });+});diff --git a/app/test/playwright/specs/settings-feature-preferences.spec.ts b/app/test/playwright/specs/settings-feature-preferences.spec.tsindex df7ab9d8d6..08e18cb444 100644--- a/app/test/playwright/specs/settings-feature-preferences.spec.ts+++ b/app/test/playwright/specs/settings-feature-preferences.spec.ts@@ -283,19 +283,16 @@ test.describe('Settings - Feature Preferences', () => {});test('persists the custom mascot voice override on the voice panel', async ({ page }) => {- await openAuthenticatedRoute(page, 'pw-settings-mascot-voice', '/settings/voice');+ await openAuthenticatedRoute(page, 'pw-settings-mascot-voice', '/settings/face');await expect(page.getByText('Mascot Voice')).toBeVisible();- const customVoiceOptionUnavailable =- (await page- .locator('[data-testid="mascot-voice-select"] option[value="__custom__"]')- .count()) === 0;- test.skip(customVoiceOptionUnavailable, 'option unavailable'); // https://github.com/tinyhumansai/openhuman/issues/1762+ const customVoiceOption = page.locator(+ '[data-testid="mascot-voice-select"] option[value="__custom__"]'+ );+ await expect(customVoiceOption).toHaveCount(1);await page.getByTestId('mascot-voice-select').selectOption('__custom__');- const customVoiceInputUnavailable =- (await page.getByTestId('mascot-voice-input').count()) === 0;- test.skip(customVoiceInputUnavailable, 'input unavailable'); // https://github.com/tinyhumansai/openhuman/issues/1762+ await expect(page.getByTestId('mascot-voice-input')).toBeVisible();await page.getByTestId('mascot-voice-input').fill('voice-e2e-custom');await page.getByTestId('mascot-voice-save-paste').click();diff --git a/app/test/playwright/specs/voice-mode.spec.ts b/app/test/playwright/specs/voice-mode.spec.tsindex be28bf0bbd..b83846433f 100644--- a/app/test/playwright/specs/voice-mode.spec.ts+++ b/app/test/playwright/specs/voice-mode.spec.ts@@ -83,6 +83,32 @@ test.describe('Voice mode integration', () => {await expect(page.getByTestId('chat-message-input')).toBeVisible();});+ test('legacy Human route redirects to the shipped chat microphone composer', async ({ page }) => {+ await page.goto('/#/human');+ await expect(page).toHaveURL(/#\/chat$/);+ await expect(page.getByRole('button', { name: 'Voice mode' })).toBeVisible();+ await expect(page.getByTestId('chat-message-input')).toBeVisible();+ });++ test('mic failure never inserts a beep placeholder as a user message', async ({ page }) => {+ try {+ await switchChatIntoMicComposer(page);+ await installGetUserMediaError(page, 'NotAllowedError');+ const viewport = page.locator('[data-slot="aui_thread-viewport"]');+ await expect(viewport).toBeVisible();+ const userMessages = viewport.locator('[data-slot="aui_user-message-root"]');+ const userMessageCount = await userMessages.count();+ await page.getByRole('button', { name: 'Start recording' }).click();+ await expect(page.locator('[data-chat-send-error-code="voice_transcription"]')).toBeVisible();++ await expect(userMessages).toHaveCount(userMessageCount);+ const messageText = (await userMessages.allTextContents()).join(' ');+ expect(messageText).not.toMatch(/beep/i);+ } finally {+ await restoreGetUserMedia(page);+ }+ });+test('permission-denied getUserMedia shows a specific voice-transcription error', async ({page,}) => {diff --git a/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs b/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rsindex 05de37501d..226f054e52 100644--- a/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs@@ -508,6 +508,58 @@ async fn composio_enable_trigger_via_mock() {assert!(outcome.logs.iter().any(|l| l.contains("enabled trigger")));}+#[tokio::test]+async fn enabling_trigger_makes_it_visible_in_list_triggers() {+ let _serialised = module_guard().await;+ let active = std::sync::Arc::new(std::sync::Mutex::new(Vec::<Value>::new()));+ let list_state = active.clone();+ let enable_state = active.clone();+ let app = Router::new()+ .route(+ "/agent-integrations/composio/triggers",+ get(move || {+ let triggers = list_state.lock().unwrap().clone();+ async move { Json(json!({"success": true, "data": {"triggers": triggers}})) }+ })+ .post(move |Json(body): Json<Value>| {+ let enable_state = enable_state.clone();+ async move {+ let trigger = json!({+ "id": "ti_enabled",+ "slug": body["slug"],+ "toolkit": "gmail",+ "connectionId": body["connectionId"],+ "state": "active"+ });+ enable_state.lock().unwrap().push(trigger);+ Json(json!({+ "success": true,+ "data": {"triggerId": "ti_enabled", "slug": body["slug"], "connectionId": body["connectionId"]}+ }))+ }+ }),+ );+ let base = start_mock_backend(app).await;+ let tmp = tempfile::tempdir().unwrap();+ let config = config_with_backend(&tmp, base);++ assert!(+ composio_list_triggers(&config, None)+ .await+ .unwrap()+ .value+ .triggers+ .is_empty()+ );+ composio_enable_trigger(&config, "c1", "GMAIL_NEW_GMAIL_MESSAGE", None)+ .await+ .unwrap();+ let listed = composio_list_triggers(&config, None).await.unwrap();+ assert_eq!(listed.value.triggers.len(), 1);+ assert_eq!(listed.value.triggers[0].id, "ti_enabled");+ assert_eq!(listed.value.triggers[0].slug, "GMAIL_NEW_GMAIL_MESSAGE");+}+#[tokio::test]async fn composio_disable_trigger_via_mock() {let _serialised = module_guard().await;diff --git a/scripts/__tests__/browser-test-skips.test.mjs b/scripts/__tests__/browser-test-skips.test.mjsindex 5176d947e0..936d135b7b 100644--- a/scripts/__tests__/browser-test-skips.test.mjs+++ b/scripts/__tests__/browser-test-skips.test.mjs@@ -3,27 +3,35 @@ import test from "node:test";import { untrackedSkipLines } from "../ci/check-browser-test-skips.mjs";-test("browser skip guard requires an issue URL on the added skip line", () => {- const patch = [- "+ test.skip('tracked', async () => {}); // https://github.com/tinyhumansai/openhuman/issues/123",- "+ this.skip(); // https://github.com/tinyhumansai/openhuman/issues/124",- "+ it.skip('missing link', () => {}); // see issue #456",- "+ describe.skip('also missing', () => {});",- "+ test.describe.skip('qualified and missing', () => {});",- "+ test.step.skip('qualified helper and missing', () => {});",- "+ this.skip(); // no issue link",- "+ test.skip( // multiline call still needs link on this line",- "+ 'tracked only on the next line' // https://github.com/tinyhumansai/openhuman/issues/789",- "+// test.skip('comment, not executable');",- "- test.skip('removed', () => {});",+const url = "https://github.com/tinyhumansai/openhuman/issues/123";++test("requires a same-line URL for direct, qualified, and runtime skip calls", () => {+ const source = [+ `it.skip('tracked', () => {}); // ${url}`,+ `test . skip /* reason */ ('tracked', () => {}); // ${url}`,+ `test.describe /* reason */ . skip ('tracked', () => {}); // ${url}`,+ `describe /* reason */ . skip ('tracked suite', () => {}); // ${url}`,+ `describe.\n skip ('missing');`,+ `this /* runtime */ . skip /* reason */ ( );`,+ `test.step.skip('missing');`,].join("\n");- assert.deepEqual(untrackedSkipLines(patch), [- "it.skip('missing link', () => {}); // see issue #456",- "describe.skip('also missing', () => {});",- "test.describe.skip('qualified and missing', () => {});",- "test.step.skip('qualified helper and missing', () => {});",- "this.skip(); // no issue link",- "test.skip( // multiline call still needs link on this line",+ assert.deepEqual(untrackedSkipLines(source), [+ "6: skip ('missing');",+ "7: this /* runtime */ . skip /* reason */ ( );",+ "8: test.step.skip('missing');",]);});++test("ignores comments, strings, templates, and removed examples containing skip syntax", () => {+ const source = [+ "// test.skip('comment')",+ "/* test.skip('block comment') */",+ "const example = \"it.skip('string')\";",+ "const template = `describe.skip('template')`;",+ "const removed = '- test.skip(\\\"old\\\")';",+ `test.skip('real'); // ${url}`,+ ].join("\n");++ assert.deepEqual(untrackedSkipLines(source), []);+});diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjsindex 6c228ee5f3..23d8a67e47 100644--- a/scripts/__tests__/self-hosted-lanes.test.mjs+++ b/scripts/__tests__/self-hosted-lanes.test.mjs@@ -369,6 +369,32 @@ test("hosted matrix only spins up groups with active lanes", () => {assert.equal(pester.find((g) => g.group === "pester").container, "");});+test("a browser-spec-only change runs the full-inventory skip guard without scripts area", () => {+ const frontendOnly = buildPlan({+ profile: "hosted",+ areas: { ...NONE, frontend: true },+ });+ assert.equal(+ frontendOnly.lanes+ .find((lane) => lane.name === "frontend")+ .checks.find((check) => check.name === "browser-test-skip-guard").run,+ "node scripts/ci/check-browser-test-skips.mjs",+ );+ assert.equal(+ frontendOnly.lanes.find((lane) => lane.name === "scripts-self-tests")+ ?.active ?? false,+ false,+ );++ const filters = fs.readFileSync(+ path.join(repoRoot, ".github/ci-paths-filter.yml"),+ "utf8",+ );+ const frontendFilter = filters.split("\nscripts:\n")[0];+ assert.match(frontendFilter, /'app\/test\/\*\*'/);+ assert.match(frontendFilter, /'scripts\/ci\/check-browser-test-skips\.mjs'/);+});+test("private lanes reuse checkout targets, preserve mold through RUSTFLAGS resets, and omit wrappers", () => {const plan = buildPlan({ profile: "ex63", areas: ALL, env: EX63_ENV });const rust = plan.lanes.filter((l) => l.heavy != null);diff --git a/scripts/ci/check-browser-test-skips.mjs b/scripts/ci/check-browser-test-skips.mjsindex f8bcc1b100..a1ce11328d 100644--- a/scripts/ci/check-browser-test-skips.mjs+++ b/scripts/ci/check-browser-test-skips.mjs@@ -1,38 +1,118 @@#!/usr/bin/env node-// New browser-test skips must carry the tracking issue on the skip line.-// Existing skips are audited separately; this prevents the inventory growing-// without requiring a one-time, potentially misleading mass annotation.+// Every executable browser-test skip needs its tracking issue on the same line.import { execFileSync } from "node:child_process";+import { readFileSync } from "node:fs";-export function untrackedSkipLines(patch) {- const failures = [];- for (const line of patch.split("\n")) {- if (!line.startsWith("+") || line.startsWith("+++")) continue;- const source = line.slice(1);- if (/^\s*\/\//.test(source)) continue;- if (!/\.skip\s*\(/.test(source)) continue;- if (!/https:\/\/github\.com\/[\w.-]+\/[\w.-]+\/issues\/\d+/.test(source)) {- failures.push(source.trim());+const issueUrl = /https:\/\/github\.com\/[\w.-]+\/[\w.-]+\/issues\/\d+/;++function tokenize(source) {+ const tokens = [];+ let index = 0;+ let line = 1;+ const advance = (end) => {+ while (index < end) if (source[index++] === "\n") line++;+ };++ while (index < source.length) {+ const char = source[index];+ if (/\s/.test(char)) {+ advance(index + 1);+ continue;+ }+ if (char === "/" && source[index + 1] === "/") {+ const end = source.indexOf("\n", index);+ advance(end < 0 ? source.length : end);+ continue;+ }+ if (char === "/" && source[index + 1] === "*") {+ const close = source.indexOf("*/", index + 2);+ advance(close < 0 ? source.length : close + 2);+ continue;+ }+ if (char === "'" || char === '"' || char === "`") {+ const quote = char;+ const start = index;+ const tokenLine = line;+ index++;+ while (index < source.length) {+ if (source[index] === "\\") {+ advance(Math.min(index + 2, source.length));+ continue;+ }+ if (source[index] === quote) {+ index++;+ break;+ }+ advance(index + 1);+ }+ tokens.push({ value: "<string>", start, end: index, line: tokenLine });+ continue;+ }+ const start = index;+ const tokenLine = line;+ if (/[A-Za-z_$]/.test(char)) {+ index++;+ while (index < source.length && /[\w$]/.test(source[index])) index++;+ } else {+ index++;}+ tokens.push({+ value: source.slice(start, index),+ start,+ end: index,+ line: tokenLine,+ });+ }+ return tokens;+}++export function untrackedSkipLines(source) {+ const lines = source.split("\n");+ const tokens = tokenize(source);+ const failures = [];+ for (let index = 0; index + 2 < tokens.length; index++) {+ if (+ tokens[index].value !== "." ||+ tokens[index + 1].value !== "skip" ||+ tokens[index + 2].value !== "("+ )+ continue;+ const line = tokens[index + 1].line;+ if (!issueUrl.test(lines[line - 1] ?? ""))+ failures.push(`${line}: ${lines[line - 1]?.trim() ?? ""}`);}return failures;}-if (process.argv[1] && import.meta.url === new URL(`file://${process.argv[1]}`).href) {- const base = process.env.GITHUB_BASE_REF- ? `origin/${process.env.GITHUB_BASE_REF}`- : "origin/main";- let patch;+if (+ process.argv[1] &&+ import.meta.url === new URL(`file://${process.argv[1]}`).href+) {+ let files;try {- patch = execFileSync("git", ["diff", "--unified=0", `${base}...HEAD`, "--", "app/test/e2e/specs", "app/test/playwright/specs"], { encoding: "utf8" });+ files = execFileSync(+ "git",+ ["ls-files", "app/test/e2e/specs", "app/test/playwright/specs"],+ { encoding: "utf8" },+ )+ .trim()+ .split("\n")+ .filter(Boolean);} catch (error) {- console.error(`Could not compare browser-test skips with ${base}: ${error.message}`);+ console.error(`Could not list browser specs: ${error.message}`);process.exit(2);}- const failures = untrackedSkipLines(patch);+ const failures = [];+ for (const file of files) {+ const badLines = untrackedSkipLines(readFileSync(file, "utf8"));+ failures.push(...badLines.map((line) => `${file}:${line}`));+ }if (failures.length) {- console.error("New browser-test skips need a GitHub issue URL on the same line:\n" + failures.map((line) => ` ${line}`).join("\n"));+ console.error(+ "Browser-test skips need a GitHub issue URL on the same line:\n" ++ failures.map((line) => ` ${line}`).join("\n"),+ );process.exit(1);}}diff --git a/scripts/ci/self-hosted/lanes-plan.mjs b/scripts/ci/self-hosted/lanes-plan.mjsindex b7f33372a7..703e309111 100644--- a/scripts/ci/self-hosted/lanes-plan.mjs+++ b/scripts/ci/self-hosted/lanes-plan.mjs@@ -338,6 +338,11 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {? `mkdir -p ${nodeCache}/eslint && pnpm --filter openhuman-app lint --cache-strategy content --cache-location ${nodeCache}/eslint/`: "pnpm --filter openhuman-app lint",},+ {+ name: "browser-test-skip-guard",+ when: areas.frontend,+ run: "node scripts/ci/check-browser-test-skips.mjs",+ },{name: "i18n",when: areas.i18n,diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex e515fde99c..cbe69c3ee7 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -3553,8 +3553,7 @@ async fn json_rpc_thread_generate_title_falls_back_when_provider_path_is_unavailassert_ne!(generated_title, original_title);assert_eq!(- generated_title,- "summarize latest five",+ generated_title, "summarize latest five","fallback title should be the 3-word shape derived from the first user message (filler stripped), got: {generated_title}");@@ -6473,7 +6472,9 @@ async fn json_rpc_wallet_solana_prepare_execute_round_trips() {);assert_eq!(exec_result.get("transactionHash").and_then(Value::as_str),- Some("5xS9pXmqVz8R1nuRZTfsdsAxBdBFmtnAtuYbCsmK5DYzGn5vR4VqWGmiR5McLnYx8oFqLdo62q4qiUZpQyR4Hkn3"),+ Some(+ "5xS9pXmqVz8R1nuRZTfsdsAxBdBFmtnAtuYbCsmK5DYzGn5vR4VqWGmiR5McLnYx8oFqLdo62q4qiUZpQyR4Hkn3"+ ),);mock_join.abort();@@ -8037,6 +8038,51 @@ async fn voice_status_returns_availability() {rpc_join.abort();}+#[tokio::test]+async fn voice_stt_dispatch_reaches_handler_and_rejects_invalid_audio_structurally() {+ let _env_lock = json_rpc_e2e_env_lock_async().await;+ let tmp = tempdir().expect("tempdir");+ let home = tmp.path();+ let openhuman_home = home.join(".openhuman");++ let _home_guard = EnvVarGuard::set_to_path("HOME", home);+ let _workspace_guard = EnvVarGuard::unset("OPENHUMAN_WORKSPACE");+ let _backend_url_guard = EnvVarGuard::unset("BACKEND_URL");+ let _vite_backend_guard = EnvVarGuard::unset("VITE_BACKEND_URL");+ let _piper_guard = EnvVarGuard::unset("PIPER_BIN");++ let (mock_addr, mock_join) = serve_on_ephemeral(mock_upstream_router()).await;+ let mock_origin = format!("http://{}", mock_addr);+ write_min_config(&openhuman_home, &mock_origin);++ let (rpc_addr, rpc_join) = serve_on_ephemeral(build_core_http_router(false)).await;+ let rpc_base = format!("http://{}", rpc_addr);+ tokio::time::sleep(Duration::from_millis(100)).await;++ let response = post_json_rpc(+ &rpc_base,+ 1,+ "openhuman.voice_stt_dispatch",+ json!({ "audio_base64": "not base64", "mime_type": "audio/wav" }),+ )+ .await;+ let error = response+ .get("error")+ .map(Value::to_string)+ .unwrap_or_default();+ assert!(+ !error.is_empty(),+ "invalid audio must return a structured RPC error: {response}"+ );+ assert!(+ !error.to_ascii_lowercase().contains("unknown method"),+ "voice_stt_dispatch must reach its handler: {response}"+ );++ mock_join.abort();+ rpc_join.abort();+}+#[tokio::test]async fn voice_live_settings_round_trip_over_json_rpc() {let _env_lock = json_rpc_e2e_env_lock_async().await;