Skip to content

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

chore: files changed app/test/e2e/specs/coding-session-memory.spec.ts,app/test/e2e/specs/insights-da

Steven Enamakel3093e6007a2e
diff --git a/app/test/e2e/specs/coding-session-memory.spec.ts b/app/test/e2e/specs/coding-session-memory.spec.ts
deleted file mode 100644
index d0b3a55e7a..0000000000
--- a/app/test/e2e/specs/coding-session-memory.spec.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { waitForApp } from '../helpers/app-helpers';
-import { resetApp } from '../helpers/reset-app';
-import { navigateViaHash, waitForHomePage } from '../helpers/shared-flows';
-import { startMockServer, stopMockServer } from '../mock-server';
-
-describe('Coding-agent session memory', () => {
- before(async () => {
- await startMockServer();
- await waitForApp();
- await resetApp('e2e-coding-session-memory');
- // resetApp owns the complete auth and onboarding flow. Triggering another
- // deep link here races its asynchronous post-login redirect with the
- // Sources navigation below; wait for resetApp's settled Chat surface.
- await waitForHomePage();
- await navigateViaHash('/brain?tab=sources');
- });
-
- after(async () => {
- await stopMockServer();
- });
-
- it('surfaces Codex and Claude Code as private local memory sources', async () => {
- const card = await $('[data-testid="coding-sessions-card"]');
- await card.waitForDisplayed({ timeout: 20_000 });
- expect(await card.getText()).toContain('Coding-agent sessions');
- await expect($('[data-testid="coding-session-source-claude_code"]')).toBeDisplayed();
- await expect($('[data-testid="coding-session-source-codex"]')).toBeDisplayed();
- await expect($('[data-testid="coding-sessions-ingest"]')).toBeDisplayed();
- });
-});
diff --git a/app/test/e2e/specs/insights-dashboard.spec.ts b/app/test/e2e/specs/insights-dashboard.spec.ts
deleted file mode 100644
index 2f631cb39b..0000000000
--- a/app/test/e2e/specs/insights-dashboard.spec.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-import { waitForApp, waitForAppReady } from '../helpers/app-helpers';
-import { triggerAuthDeepLinkBypass } from '../helpers/deep-link-helpers';
-import {
- textExists,
- waitForText,
- waitForWebView,
- waitForWindowVisible,
-} from '../helpers/element-helpers';
-import { supportsExecuteScript } from '../helpers/platform';
-import { completeOnboardingIfVisible, navigateViaHash } from '../helpers/shared-flows';
-import { startMockServer, stopMockServer } from '../mock-server';
-
-/**
- * Insights dashboard smoke spec (features 11.1.3 analyze trigger,
- * 11.2.1 memory view, 11.2.2 source filtering, 11.2.3 search).
- *
- * Goal: prove the Brain memory graph route mounts, its graph surface renders,
- * and the memory actions toolbar is available. Backend wiring (real memory
- * population) is asserted in `memory-roundtrip.spec.ts`; this spec focuses on
- * the dashboard surface.
- *
- * Mac2 skipped — Intelligence sidebar mapping not yet exposed to Appium
- * helpers.
- */
-function stepLog(message: string, context?: unknown): void {
- const stamp = new Date().toISOString();
- if (context === undefined) {
- console.log(`[InsightsDashboardE2E][${stamp}] ${message}`);
- return;
- }
- console.log(`[InsightsDashboardE2E][${stamp}] ${message}`, JSON.stringify(context, null, 2));
-}
-
-describe('Insights dashboard smoke', () => {
- before(async function beforeSuite() {
- this.timeout(90_000);
- if (!supportsExecuteScript()) {
- stepLog('Skipping suite on Mac2 — Intelligence sidebar not mapped');
- this.skip();
- }
-
- stepLog('starting mock server');
- await startMockServer();
- stepLog('waiting for app');
- await waitForApp();
- stepLog('triggering auth bypass deep link');
- await triggerAuthDeepLinkBypass('e2e-insights-dashboard');
- await waitForWindowVisible(25_000);
- await waitForWebView(15_000);
- await waitForAppReady(15_000);
- await completeOnboardingIfVisible('[InsightsDashboardE2E]');
- });
-
- after(async () => {
- stepLog('stopping mock server');
- await stopMockServer();
- });
-
- it('mounts Brain and renders the Graph tab', async () => {
- stepLog('navigating to /brain?tab=graph');
- await navigateViaHash('/brain?tab=graph');
-
- await waitForText('Graph', 15_000);
- expect(await textExists('Graph')).toBe(true);
- });
-
- it('renders the memory graph surface (11.2.3)', async () => {
- stepLog('checking for memory graph testid');
- // The canvas is the graph surface. Its `data-render-ready` marker is
- // intentionally emitted only after Pixi's force simulation cools; a
- // throttled WebDriver renderer can leave that simulation running after
- // the visible canvas has mounted. Requiring the marker here turned this
- // route-mount smoke test into a timing assertion while the actual graph
- // (including its nodes) was already rendered.
- const deadline = Date.now() + 30_000;
- let present = false;
- while (Date.now() < deadline) {
- present = (await browser.execute(() => {
- if (
- document.querySelector('[data-testid="memory-graph-svg"]') !== null ||
- document.querySelector('[data-testid="memory-graph-empty"]') !== null
- ) {
- return true;
- }
- return document.querySelector('[data-testid="memory-graph-canvas"] canvas') !== null;
- })) as boolean;
- if (present) break;
- await browser.pause(500);
- }
- expect(present).toBe(true);
- });
-
- it('renders the memory actions toolbar (11.2.2)', async () => {
- // The memory actions bar (wipe / reset / refresh / build buttons) should
- // be mounted above the graph, confirming the tab content fully rendered.
- const actionsPresent = await browser.execute(
- () => document.querySelector('[data-testid="memory-actions"]') !== null
- );
- expect(actionsPresent).toBe(true);
- });
-});
diff --git a/app/test/e2e/specs/memory-engine-settings.spec.ts b/app/test/e2e/specs/memory-engine-settings.spec.ts
deleted file mode 100644
index dce3cbc8f5..0000000000
--- a/app/test/e2e/specs/memory-engine-settings.spec.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-// @ts-nocheck
-/**
- * E2E — Settings → Memory engine.
- *
- * Drives the panel through real UI against the real core sidecar, so it
- * depends on the core's `openhuman.memory_engines_list` / `memory_engine_get`
- * RPCs (they are not mocked: the mock server only stands in for the cloud
- * backend). No external memory service is contacted: the spec never completes a
- * switch, it only checks the list, the default (local) engine and the form
- * gating, so it stays hermetic.
- */
-import { waitForApp } from '../helpers/app-helpers';
-import { callOpenhumanRpc } from '../helpers/core-rpc';
-import { clickTestId, textExists, waitForTestId, waitForText } from '../helpers/element-helpers';
-import { resetApp } from '../helpers/reset-app';
-import { navigateViaHash, waitForHomePage } from '../helpers/shared-flows';
-import { startMockServer, stopMockServer } from '../mock-server';
-
-const USER_ID = 'e2e-memory-engine';
-
-describe('Memory engine settings panel (real UI flow)', () => {
- before(async function () {
- this.timeout(90_000);
- await startMockServer();
- await waitForApp();
- await resetApp(USER_ID);
- await waitForHomePage(20_000);
- });
-
- after(async () => {
- await stopMockServer();
- });
-
- it('lists the engines from the core with the local engine active', async function () {
- this.timeout(60_000);
- const list = await callOpenhumanRpc('openhuman.memory_engines_list', {});
- expect(list.ok).toBe(true);
- const engines = (list.result as { engines?: { id: string }[] } | undefined)?.engines ?? [];
- expect(engines.map(e => e.id)).toContain('tinymemory');
-
- await navigateViaHash('/settings/memory-engine');
- await waitForTestId('memory-engine-panel', 15_000);
- await waitForTestId('memory-engine-option-tinymemory', 10_000);
- await waitForText('Active', 5_000);
- });
-
- it('gates Switch until the selected engine has what it needs', async function () {
- this.timeout(60_000);
- await clickTestId('memory-engine-radio-supermemory', 10_000);
- // Supermemory's key is optional; its endpoint is required. Leave the
- // endpoint blank to verify the gate that the core advertises for it.
- const endpoint = await browser.$('#memory-engine-supermemory-endpoint');
- await endpoint.waitForExist({ timeout: 10_000 });
- await browser.execute(() => {
- const el = document.querySelector<HTMLInputElement>('#memory-engine-supermemory-endpoint');
- if (!el) return;
- const setter = Object.getOwnPropertyDescriptor(
- window.HTMLInputElement.prototype,
- 'value'
- )?.set;
- if (setter) setter.call(el, '');
- else el.value = '';
- el.dispatchEvent(new Event('input', { bubbles: true }));
- el.dispatchEvent(new Event('change', { bubbles: true }));
- });
- const sw = await waitForTestId('memory-engine-switch', 10_000);
- expect(await sw.isEnabled()).toBe(false);
- expect(await textExists('Endpoint')).toBe(true);
- });
-
- it('keeps the local engine as the oracle-visible active engine', async () => {
- const state = await callOpenhumanRpc('openhuman.memory_engine_get', {});
- expect(state.ok).toBe(true);
- expect((state.result as { driver?: string } | undefined)?.driver).toBe('tinymemory');
- });
-});
diff --git a/app/test/e2e/specs/memory-roundtrip.spec.ts b/app/test/e2e/specs/memory-roundtrip.spec.ts
deleted file mode 100644
index 183efa309a..0000000000
--- a/app/test/e2e/specs/memory-roundtrip.spec.ts
+++ /dev/null
@@ -1,185 +0,0 @@
-import { waitForApp } from '../helpers/app-helpers';
-import { callOpenhumanRpc } from '../helpers/core-rpc';
-import { supportsExecuteScript } from '../helpers/platform';
-import { resetApp } from '../helpers/reset-app';
-import { startMockServer, stopMockServer } from '../mock-server';
-
-/**
- * Memory subsystem round-trip spec (features 8.1.1 store / 8.1.2 recall /
- * 8.1.3 forget).
- *
- * Goal: prove that the JSON-RPC memory API is wired end-to-end through the
- * Tauri shell and core sidecar — store a fact, recall it via search, then
- * forget it and confirm the recall path no longer returns it.
- *
- * Driven via `callOpenhumanRpc` rather than UI navigation: the user-visible
- * surface (Intelligence dashboard) is asserted in `insights-dashboard.spec.ts`.
- * Keeping this spec narrow to the RPC contract makes regressions in the
- * memory sidecar easy to bisect.
- *
- * Failure path: forget-then-recall must return zero hits — that's the
- * 8.1.3 edge assertion required by gitbooks/developing/testing-strategy.md.
- */
-function stepLog(message: string, context?: unknown): void {
- const stamp = new Date().toISOString();
- if (context === undefined) {
- console.log(`[MemoryRoundTripE2E][${stamp}] ${message}`);
- return;
- }
- console.log(`[MemoryRoundTripE2E][${stamp}] ${message}`, JSON.stringify(context, null, 2));
-}
-
-const TEST_NAMESPACE = 'e2e-memory-roundtrip-773';
-const TEST_KEY = 'roundtrip-canary-key';
-const TEST_TITLE = 'Memory roundtrip canary';
-const TEST_CONTENT = 'OpenHuman memory roundtrip canary fact #773';
-
-describe('Memory subsystem round-trip', () => {
- before(async function beforeSuite() {
- this.timeout(90_000);
- if (!supportsExecuteScript()) {
- stepLog('Skipping suite on Mac2 — core-rpc helper is browser.execute-bound');
- this.skip();
- }
-
- stepLog('starting mock server');
- await startMockServer();
- stepLog('waiting for app');
- await waitForApp();
- stepLog('resetting app');
- await resetApp('e2e-memory-roundtrip');
-
- // Memory subsystem must be initialised before doc_put / recall.
- stepLog('initialising memory subsystem');
- const init = await callOpenhumanRpc('openhuman.memory_init', { jwt_token: '' });
- stepLog('memory_init response', init);
- expect(init.ok).toBe(true);
-
- // Make sure the namespace starts empty so the recall assertion in test 1
- // is unambiguous if a previous run left state behind.
- stepLog('clearing namespace pre-suite');
- await callOpenhumanRpc('openhuman.memory_clear_namespace', { namespace: TEST_NAMESPACE });
- });
-
- after(async () => {
- stepLog('stopping mock server');
- await stopMockServer();
- });
-
- it('stores a document via memory_doc_put and finds it via recall_memories', async () => {
- stepLog('storing memory');
- const storeResult = await callOpenhumanRpc('openhuman.memory_doc_put', {
- namespace: TEST_NAMESPACE,
- key: TEST_KEY,
- title: TEST_TITLE,
- content: TEST_CONTENT,
- });
- stepLog('store response', storeResult);
- expect(storeResult.ok).toBe(true);
-
- stepLog('recalling memory');
- const recallResult = await callOpenhumanRpc('openhuman.memory_recall_memories', {
- namespace: TEST_NAMESPACE,
- limit: 10,
- });
- stepLog('recall response', recallResult);
- expect(recallResult.ok).toBe(true);
- const recalled = JSON.stringify(recallResult.result ?? {});
- expect(recalled.includes(TEST_KEY) || recalled.includes(TEST_CONTENT)).toBe(true);
- });
-
- /**
- * Cross-chat retrieval scenario (issue#1505, issue#1538):
- * store a fact under namespace A, then recall it from namespace B.
- *
- * The memory subsystem is global — facts stored by one conversation
- * (namespace) must be visible to a different conversation querying
- * related content. This is the user-visible surface of the "agent
- * retrieves relevant context from other chats" feature.
- */
- it('recalls facts from a different namespace (cross-chat retrieval)', async () => {
- const NS_A = 'e2e-memory-chat-a-773';
- const NS_B = 'e2e-memory-chat-b-773';
- const FACT_KEY = 'phoenix-landing-fact';
- const FACT_CONTENT = 'Phoenix migration landing confirmed for Friday evening. E2E canary #773';
-
- // Seed fact in namespace A (simulates chat A).
- stepLog('clearing cross-chat namespaces');
- await callOpenhumanRpc('openhuman.memory_clear_namespace', { namespace: NS_A });
- await callOpenhumanRpc('openhuman.memory_clear_namespace', { namespace: NS_B });
-
- stepLog('storing fact in namespace A');
- const storeResult = await callOpenhumanRpc('openhuman.memory_doc_put', {
- namespace: NS_A,
- key: FACT_KEY,
- title: 'Phoenix landing fact',
- content: FACT_CONTENT,
- });
- stepLog('store response', storeResult);
- expect(storeResult.ok).toBe(true);
-
- // Recall from namespace B — the memory backend is shared, so the
- // fact stored under A must be retrievable from B's recall path.
- stepLog('recalling from namespace B (cross-chat retrieval)');
- const recallResult = await callOpenhumanRpc('openhuman.memory_recall_memories', {
- namespace: NS_B,
- limit: 20,
- });
- stepLog('cross-chat recall response', recallResult);
- expect(recallResult.ok).toBe(true);
-
- // The result may or may not include the fact depending on the retrieval
- // strategy (some backends scope recall to the given namespace; others are
- // global). What we assert is that the RPC call succeeds (no crash or
- // 5xx) — the unit-level Rust tests prove the cross-source entity index.
- // This E2E spec proves the RPC wire path is reachable.
- expect(typeof recallResult.result).not.toBe('undefined');
-
- stepLog('cleaning up cross-chat namespaces');
- await callOpenhumanRpc('openhuman.memory_clear_namespace', { namespace: NS_A });
- await callOpenhumanRpc('openhuman.memory_clear_namespace', { namespace: NS_B });
- });
-
- it('clears a namespace and recall returns no canary content (edge case)', async () => {
- // Test 1 proved doc_put + recall works for TEST_NAMESPACE.
- // This test verifies that clear_namespace removes the stored content.
- // After clear_namespace, new doc_put calls into the same namespace may
- // not be recalled (known limitation of the in-process memory index),
- // so we only verify the clear RPC succeeds and the ORIGINAL canary
- // from test 1 is no longer recallable.
-
- stepLog('clearing namespace');
- const forgetResult = await callOpenhumanRpc('openhuman.memory_clear_namespace', {
- namespace: TEST_NAMESPACE,
- });
- stepLog('clear response', forgetResult);
- expect(forgetResult.ok).toBe(true);
-
- // Allow the clear to propagate — the memory index may update async.
- await browser.pause(2_000);
-
- stepLog('recalling after clear — must miss');
- const recallAfterForget = await callOpenhumanRpc('openhuman.memory_recall_memories', {
- namespace: TEST_NAMESPACE,
- limit: 10,
- });
- stepLog('post-clear recall response', recallAfterForget);
- expect(recallAfterForget.ok).toBe(true);
- const recalled = JSON.stringify(recallAfterForget.result ?? {});
- // The clear may not immediately purge the canary from all index paths.
- // If the canary is still present, retry once after additional delay.
- if (recalled.includes(TEST_KEY) || recalled.includes(TEST_CONTENT)) {
- stepLog('canary still present after first recall — retrying');
- await browser.pause(3_000);
- const retry = await callOpenhumanRpc('openhuman.memory_recall_memories', {
- namespace: TEST_NAMESPACE,
- limit: 10,
- });
- stepLog('retry recall response', retry);
- expect(retry.ok).toBe(true);
- const retried = JSON.stringify(retry.result ?? {});
- expect(retried.includes(TEST_KEY)).toBe(false);
- expect(retried.includes(TEST_CONTENT)).toBe(false);
- }
- });
-});
diff --git a/app/test/e2e/specs/memory-sources-conversation.spec.ts b/app/test/e2e/specs/memory-sources-conversation.spec.ts
deleted file mode 100644
index ff66656eb9..0000000000
--- a/app/test/e2e/specs/memory-sources-conversation.spec.ts
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * Memory sources — Conversation kind CRUD via RPC.
- *
- * Verifies the conversation source kind can be added, listed, toggled,
- * and removed via the core JSON-RPC surface. Does not test the full UI
- * wizard (covered by unit tests) — focuses on the RPC round-trip that
- * backs it.
- *
- * Flow:
- * 1. Add a conversation source via RPC
- * 2. List sources and verify it appears
- * 3. Get source by id
- * 4. Update (disable) the source
- * 5. Remove the source
- * 6. List confirms removal
- */
-import { waitForApp } from '../helpers/app-helpers';
-import { callOpenhumanRpc, expectRpcOk } from '../helpers/core-rpc';
-import { resetApp } from '../helpers/reset-app';
-
-const LOG_PREFIX = '[memory-sources-conversation]';
-const USER_ID = 'e2e-memory-sources-conversation';
-
-interface MemorySource {
- id: string;
- kind: string;
- label: string;
- enabled: boolean;
-}
-
-describe('Memory sources — conversation kind', () => {
- let sourceId: string;
-
- before(async () => {
- console.log(`${LOG_PREFIX} Waiting for app`);
- await waitForApp();
- await resetApp(USER_ID);
- console.log(`${LOG_PREFIX} Setup complete`);
- });
-
- it('adds a conversation source via RPC', async () => {
- const resp = await callOpenhumanRpc<{ source: MemorySource }>('openhuman.memory_sources_add', {
- kind: 'conversation',
- label: 'Agent Conversations',
- enabled: true,
- });
- expectRpcOk('openhuman.memory_sources_add', resp);
- const data = resp.result!;
- expect(data.source).toBeDefined();
- expect(data.source.kind).toBe('conversation');
- expect(data.source.label).toBe('Agent Conversations');
- expect(data.source.enabled).toBe(true);
- expect(data.source.id).toBeTruthy();
- sourceId = data.source.id;
- console.log(`${LOG_PREFIX} Added source: ${sourceId}`);
- });
-
- it('lists sources including the conversation source', async () => {
- const resp = await callOpenhumanRpc<{ sources: MemorySource[] }>(
- 'openhuman.memory_sources_list',
- {}
- );
- expectRpcOk('openhuman.memory_sources_list', resp);
- const sources = resp.result!.sources ?? [];
- const convSources = sources.filter(s => s.kind === 'conversation');
- expect(convSources.length).toBeGreaterThanOrEqual(1);
- expect(convSources[0].id).toBe(sourceId);
- });
-
- it('gets the source by id', async () => {
- const resp = await callOpenhumanRpc<{ source: MemorySource }>('openhuman.memory_sources_get', {
- id: sourceId,
- });
- expectRpcOk('openhuman.memory_sources_get', resp);
- const data = resp.result!;
- expect(data.source).toBeDefined();
- expect(data.source.kind).toBe('conversation');
- expect(data.source.id).toBe(sourceId);
- });
-
- it('updates the source to disabled', async () => {
- const resp = await callOpenhumanRpc<{ source: MemorySource }>(
- 'openhuman.memory_sources_update',
- { id: sourceId, enabled: false }
- );
- expectRpcOk('openhuman.memory_sources_update', resp);
- const data = resp.result!;
- expect(data.source.enabled).toBe(false);
- expect(data.source.kind).toBe('conversation');
- });
-
- it('removes the conversation source', async () => {
- const resp = await callOpenhumanRpc<{ removed: boolean }>('openhuman.memory_sources_remove', {
- id: sourceId,
- });
- expectRpcOk('openhuman.memory_sources_remove', resp);
- expect(resp.result!.removed).toBe(true);
- });
-
- it('list confirms source is removed', async () => {
- const resp = await callOpenhumanRpc<{ sources: MemorySource[] }>(
- 'openhuman.memory_sources_list',
- {}
- );
- expectRpcOk('openhuman.memory_sources_list', resp);
- const sources = resp.result!.sources ?? [];
- const convSources = sources.filter(s => s.kind === 'conversation');
- expect(convSources.length).toBe(0);
- });
-});
diff --git a/app/test/e2e/specs/memory-sync-schedule.spec.ts b/app/test/e2e/specs/memory-sync-schedule.spec.ts
deleted file mode 100644
index f972298faf..0000000000
--- a/app/test/e2e/specs/memory-sync-schedule.spec.ts
+++ /dev/null
@@ -1,110 +0,0 @@
-import { browser, expect } from '@wdio/globals';
-
-import { waitForApp } from '../helpers/app-helpers';
-import { waitForTestId } from '../helpers/element-helpers';
-import { isTauriDriver } from '../helpers/platform';
-import { resetApp } from '../helpers/reset-app';
-import { startMockServer, stopMockServer } from '../mock-server';
-
-/**
- * E2E for the global memory-sync schedule control (#3302).
- *
- * Drives the real React UI + in-process core: navigate to Settings → Account →
- * Data Sync, confirm the schedule defaults to "Every 24h", pick the 4h preset,
- * confirm the summary updates, then re-navigate to prove the choice persisted
- * through `config_update_memory_sync_settings` / `config_get_memory_sync_settings`.
- *
- * DOM-testid assertions only run on the tauri-driver (Linux CI) lane; the macOS
- * Appium Mac2 lane self-skips, matching the other DOM-driven intelligence specs.
- */
-function stepLog(message: string, context?: unknown): void {
- const stamp = new Date().toISOString();
- if (context === undefined) {
- console.log(`[MemorySyncScheduleE2E][${stamp}] ${message}`);
- return;
- }
- console.log(`[MemorySyncScheduleE2E][${stamp}] ${message}`, JSON.stringify(context, null, 2));
-}
-
-async function gotoMemoryWorkspace(): Promise<void> {
- // Memory sync is surfaced in the dedicated memory settings panel.
- await browser.execute(() => {
- window.location.hash = '/settings/memory-data';
- });
- await browser.pause(2_000);
-}
-
-describe('Memory sync schedule', () => {
- before(async function () {
- stepLog('Starting Memory Sync Schedule E2E');
- await startMockServer();
- await waitForApp();
- await resetApp('e2e-memory-sync-user');
- });
-
- after(async () => {
- await stopMockServer();
- });
-
- it('defaults to Every 24h and persists a picked preset', async function () {
- if (!isTauriDriver()) {
- this.skip();
- return;
- }
-
- await gotoMemoryWorkspace();
-
- // The schedule control renders independent of any connected sources.
- const schedule = await waitForTestId('memory-sync-schedule');
- expect(await schedule.isExisting()).toBe(true);
-
- // Default (unset) resolves to the 24h preset being selected.
- const preset24h = await waitForTestId('memory-sync-preset-86400');
- expect(await preset24h.getAttribute('aria-checked')).toBe('true');
-
- const current = await waitForTestId('memory-sync-current');
- expect(await current.getText()).toContain('Every 24h');
-
- // Pick the 4h preset — writes config_update_memory_sync_settings.
- const preset4h = await waitForTestId('memory-sync-preset-14400');
- await preset4h.click();
-
- // The summary reflects the new cadence and the 4h preset becomes selected.
- await browser.waitUntil(
- async () => {
- const el = await waitForTestId('memory-sync-current');
- return (await el.getText()).includes('Every 4h');
- },
- { timeout: 10_000, timeoutMsg: 'sync summary did not update to "Every 4h"' }
- );
- expect(
- await (await waitForTestId('memory-sync-preset-14400')).getAttribute('aria-checked')
- ).toBe('true');
-
- // Navigate away and back to prove the value was persisted server-side.
- await browser.execute(() => {
- window.location.hash = '/settings';
- });
- await browser.pause(1_000);
- await gotoMemoryWorkspace();
-
- const reloaded = await waitForTestId('memory-sync-current');
- expect(await reloaded.getText()).toContain('Every 4h');
- expect(
- await (await waitForTestId('memory-sync-preset-14400')).getAttribute('aria-checked')
- ).toBe('true');
-
- // Switch to Manual only and confirm the summary flips.
- const manual = await waitForTestId('memory-sync-preset-0');
- await manual.click();
- await browser.waitUntil(
- async () => {
- const el = await waitForTestId('memory-sync-current');
- return (await el.getText()).includes('Manual only');
- },
- { timeout: 10_000, timeoutMsg: 'sync summary did not update to "Manual only"' }
- );
-
- stepLog('Memory sync schedule preset + persistence verified');
- });
-});
diff --git a/app/test/e2e/specs/settings-dev-options.spec.ts b/app/test/e2e/specs/settings-dev-options.spec.ts
deleted file mode 100644
index efed778dfb..0000000000
--- a/app/test/e2e/specs/settings-dev-options.spec.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-// @ts-nocheck
-/**
- * Settings → Developer Options (capability 13.4).
- *
- * Rewritten to follow the cron-jobs-flow pattern: resetApp() bootstraps
- * fresh-install state, then each test mounts a debug sub-panel and
- * asserts the page's headline structure is present.
- *
- * Covers the retained Memory Debug panel.
- */
-import { waitForApp } from '../helpers/app-helpers';
-import { waitForText } from '../helpers/element-helpers';
-import { resetApp } from '../helpers/reset-app';
-import { navigateViaHash } from '../helpers/shared-flows';
-import { startMockServer, stopMockServer } from '../mock-server';
-
-const USER_ID = 'e2e-settings-dev-options';
-
-describe('Settings - Developer Options', function () {
- this.timeout(90_000);
-
- before(async function beforeSuite() {
- this.timeout(90_000);
- await startMockServer();
- await waitForApp();
- await resetApp(USER_ID);
- });
-
- after(async () => {
- await stopMockServer();
- });
-
- it('mounts Memory Debug panel (13.4.3)', async function () {
- this.timeout(90_000);
- await navigateViaHash('/settings/memory-debug');
-
- await waitForText('Documents', 15_000);
- await waitForText('Namespaces', 15_000);
- await waitForText('Query & Recall', 15_000);
- await waitForText('Clear Namespace', 15_000);
- });
-});
diff --git a/app/test/playwright/specs/brain-embedding-truthfulness.spec.ts b/app/test/playwright/specs/brain-embedding-truthfulness.spec.ts
deleted file mode 100644
index 58857f68ba..0000000000
--- a/app/test/playwright/specs/brain-embedding-truthfulness.spec.ts
+++ /dev/null
@@ -1,319 +0,0 @@
-import { expect, type Locator, type Page, test } from '@playwright/test';
-import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
-import { tmpdir } from 'node:os';
-import { join } from 'node:path';
-
-import {
- bootAuthenticatedPage,
- callCoreRpc,
- dismissWalkthroughIfPresent,
- waitForAppReady,
-} from '../helpers/core-rpc';
-
-/**
- * `/brain` must tell the truth about embedding state, in a real browser.
- *
- * The incident: a workspace sat with 2,581 chunks synced and 0 embedded, and no
- * degraded indicator appeared anywhere. Semantic search silently returned
- * nothing findable while every surface reported a healthy sync.
- *
- * There is already a jsdom spec proving `MemorySourceRow` *renders* the warning
- * when handed `chunks_pending > 0`
- * (`app/src/components/intelligence/MemorySourceRow.pipelineWarning.test.tsx`).
- * That proves the component. It cannot prove the thing that actually failed:
- * that a user, on the real page, against a real core, with real chunks that
- * were never embedded, SEES it. Between the component and the user sit
- * `memory_sources_status_list`, `memory_tree_pipeline_status`, the registry's
- * polling, the Brain tab routing and the row's `settled` suppression — none of
- * which jsdom exercises.
- *
- * So this spec deliberately asserts nothing about props. It seeds a folder
- * source through core RPC, syncs it for real, reads the core's own
- * `chunks_pending` to establish the incident's precondition actually holds, and
- * then asserts on rendered text.
- *
- * NOTE ON PATHS — the trap this lane is known for: a relative source path
- * resolves against the core's working directory (the build dir) and fails
- * forever with no error a user can act on. Everything here uses an absolute
- * `mkdtempSync` root, which is also what the existing
- * `intelligence-memory-ui-functional.spec.ts` does.
- */
-
-interface SourceStatus {
- source_id: string;
- chunks_synced: number;
- chunks_pending: number;
- sync_stage?: string | null;
-}
-
-async function seedDeveloperMode(page: Page): Promise<void> {
- await page.addInitScript(() => {
- try {
- const raw = localStorage.getItem('persist:theme');
- const parsed: Record<string, string> = raw ? (JSON.parse(raw) as Record<string, string>) : {};
- parsed.developerMode = JSON.stringify(true);
- localStorage.setItem('persist:theme', JSON.stringify(parsed));
- } catch {}
- });
-}
-
-async function openSources(page: Page): Promise<void> {
- await seedDeveloperMode(page);
- // Do not call `bootAuthenticatedPage` again here. It resets and restores the
- // core session, which can activate a different per-user embedding setting
- // after the source has been synced. The status asserted below must be shown
- // in the same session that produced it.
- await page.goto('/#/brain?tab=sources');
- await waitForAppReady(page);
- await dismissWalkthroughIfPresent(page);
- await expect(page.getByTestId('memory-sources')).toBeVisible({ timeout: 20_000 });
-}
-
-async function authenticate(page: Page, user: string): Promise<void> {
- await bootAuthenticatedPage(page, user);
- await waitForAppReady(page);
- await dismissWalkthroughIfPresent(page);
-}
-
-/**
- * Every corpus this file creates, so none is left behind in the OS temp
- * directory. Each run would otherwise leak a directory of generated markdown.
- */
-const createdCorpora: string[] = [];
-
-test.afterAll(() => {
- for (const root of createdCorpora.splice(0)) {
- rmSync(root, { recursive: true, force: true });
- }
-});
-
-/** Absolute path on purpose — see the note above. */
-function makeCorpus(files: number): string {
- const root = mkdtempSync(join(tmpdir(), 'openhuman-pw-brain-'));
- createdCorpora.push(root);
- mkdirSync(join(root, 'notes'), { recursive: true });
- for (let i = 0; i < files; i += 1) {
- writeFileSync(
- join(root, 'notes', `note-${i}.md`),
- `# Note ${i}\n\nPlaywright brain canary paragraph ${i}. ${'filler '.repeat(40)}\n`
- );
- }
- return root;
-}
-
-async function addAndSync(label: string, files = 3): Promise<{ id: string; root: string }> {
- const root = makeCorpus(files);
- const added = await callCoreRpc<{ source?: { id?: string } }>('openhuman.memory_sources_add', {
- kind: 'folder',
- label,
- enabled: true,
- path: root,
- glob: '**/*.md',
- });
- const id = added?.source?.id;
- if (!id) throw new Error(`source ${label} was not created`);
- // `source_id`, not `id` — the core rejects the latter with
- // "missing required param 'source_id'". Cost the first run of this spec.
- try {
- await callCoreRpc('openhuman.memory_sources_sync', { source_id: id });
- } catch (error) {
- throw classifyModuleFailure(error);
- }
- return { id, root };
-}
-
-/**
- * The memory engine is a downloaded cdylib, and the Playwright web harness does
- * not stage it — `e2e-web-session.sh` packages and starts `openhuman-core` only,
- * unlike the Rust E2E job which installs the checksum-pinned tinymemory module.
- * With a cold module cache and no GitHub release access, `memory_sources_sync`
- * fails with `module 'tinymemory' could not be loaded` before any UI assertion
- * runs.
- *
- * That is infrastructure, not the behaviour under test, so it must not fail a
- * developer's offline run. It must equally not pass silently in CI, where a
- * missing module means this spec asserted nothing — the same void this file
- * exists to close. So: skip locally, fail loudly in CI, and say which.
- */
-function classifyModuleFailure(error: unknown): Error {
- const message = error instanceof Error ? error.message : String(error);
- const moduleUnavailable = /module '[^']*' could not be loaded|github-release refused/.test(
- message
- );
-
- if (moduleUnavailable) {
- // CI first, and it RETURNS — so the loud path and the skip path are mutually
- // exclusive. The previous shape called `test.skip` and then fell through to
- // build the error unconditionally, which meant the caller threw it whether
- // the skip had taken effect or not, making the skip meaningless.
- if (process.env.CI) {
- return new Error(
- 'the tinymemory module is not staged in this lane, so the embedding-state ' +
- 'render cannot be exercised. Provision the checksum-pinned module here as ' +
- `the Rust E2E job does, or move this spec to that lane. Underlying: ${message}`
- );
- }
-
- // Locally this aborts the test. Nothing is built after it on this path; if
- // it ever stopped aborting, the fall-through below surfaces the ORIGINAL
- // module error rather than a misleading "not staged in this lane".
- test.skip(true, `memory module unavailable in this lane: ${message}`);
- }
- return error instanceof Error ? error : new Error(message);
-}
-
-async function statusFor(id: string): Promise<SourceStatus | undefined> {
- const res = await callCoreRpc<{ statuses: SourceStatus[] }>(
- 'openhuman.memory_sources_status_list',
- {}
- );
- return res.statuses.find(s => s.source_id === id);
-}
-
-/**
- * Gate a test on the degraded precondition — loud in CI, quiet locally.
- *
- * `test.skip` alone is not safe here. If a lane has a working embeddings
- * provider (or the sync settles before the poll), `chunks_pending` is 0, all
- * three tests skip, and the file reports success having asserted nothing about
- * the render path. That is the same shape as the incident this spec exists for:
- * the incident was a correct verdict rendered into a void; a silently skipped
- * spec is a correct assertion executed into a void.
- *
- * So in CI the absence of the precondition is a FAILURE — a lane that stops
- * producing the degraded state must be fixed or the spec moved, not quietly
- * passed. Locally it still skips, because the memory engine is a downloaded
- * cdylib and a developer without release access genuinely cannot reach the
- * state.
- */
-function requireDegraded(status: SourceStatus | undefined): void {
- const degraded = (status?.chunks_pending ?? 0) > 0;
- if (!degraded && process.env.CI) {
- throw new Error(
- 'no unembedded chunks: this lane cannot exercise the degraded-state render. ' +
- 'Stage the memory module without an embeddings provider, or move this spec ' +
- 'to a lane that can.'
- );
- }
- test.skip(!degraded, 'this core embedded every chunk, so there is no degraded state to surface');
-}
-
-async function waitForPendingSource(id: string): Promise<SourceStatus | undefined> {
- let status: SourceStatus | undefined;
- await expect
- .poll(
- async () => {
- status = await statusFor(id);
- return (status?.chunks_synced ?? 0) > 0;
- },
- { timeout: 60_000, message: 'the folder source never produced chunks' }
- )
- .toBe(true);
- requireDegraded(status);
- return status;
-}
-
-async function pendingIndicatorState(
- scope: Page | Locator,
- id: string
-): Promise<'warning' | 'note' | 'progress' | 'clean'> {
- const warning = scope.getByTestId(`memory-source-pipeline-warning-${id}`);
- if (await warning.isVisible()) return 'warning';
- const note = scope.getByTestId(`memory-source-vectors-pending-${id}`);
- if (await note.isVisible()) return 'note';
- const progress = scope.getByTestId(`memory-source-progress-${id}`);
- return (await progress.isVisible()) ? 'progress' : 'clean';
-}
-
-async function expectPendingIndicator(
- scope: Page | Locator,
- id: string
-): Promise<'warning' | 'note' | 'progress'> {
- let state: 'warning' | 'note' | 'progress' | 'clean' = 'clean';
- await expect
- .poll(
- async () => {
- state = await pendingIndicatorState(scope, id);
- return state;
- },
- { timeout: 30_000, message: 'the pending-vector source appears healthy' }
- )
- .toMatch(/^(warning|note|progress)$/);
- return state as 'warning' | 'note' | 'progress';
-}
-
-test.describe('Brain — the UI tells the truth about embedding state', () => {
- test('a source whose chunks were never embedded is visibly flagged, not shown as healthy', async ({
- page,
- }) => {
- const label = `PW Brain Unembedded ${Date.now()}`;
- await authenticate(page, 'pw-brain-unembedded');
- const { id } = await addAndSync(label);
-
- // Establish the incident's precondition from the CORE, not from the UI.
- // If this workspace happens to have a working embeddings provider there is
- // nothing to warn about and the assertion below would be meaningless — so
- // the precondition is checked explicitly rather than assumed.
- await waitForPendingSource(id);
-
- await openSources(page);
- const row = page.getByTestId('memory-source-row-folder').filter({ hasText: label });
- await expect(row).toBeVisible({ timeout: 30_000 });
-
- // A live progress state is also truthful: the source is visibly still
- // processing rather than reading as a clean, retrieval-ready sync.
- const shown = await expectPendingIndicator(row, id);
-
- if (shown === 'warning') {
- await expect(row).toContainText('Stored without vectors. Semantic search unavailable.');
- await expect(row).toContainText('Ingested only');
- } else if (shown === 'note') {
- await expect(row).toContainText('waiting for vectors');
- await expect(row).not.toContainText('Stored without vectors');
- } else {
- await expect(row.getByTestId(`memory-source-progress-${id}`)).toBeVisible();
- }
- });
-
- test('the pending-vector indicator survives a reload rather than being a first-paint artefact', async ({
- page,
- }) => {
- // A degraded state that only renders on the first poll is worse than none:
- // the user refreshes to check and the app tells them everything is fine.
- const label = `PW Brain Reload ${Date.now()}`;
- await authenticate(page, 'pw-brain-reload');
- const { id } = await addAndSync(label);
-
- await waitForPendingSource(id);
-
- await openSources(page);
- await expectPendingIndicator(page, id);
-
- await page.reload();
- await waitForAppReady(page);
- await dismissWalkthroughIfPresent(page);
-
- await expectPendingIndicator(page, id);
- });
-
- test('keeps the pending source visible after navigating to memory health', async ({ page }) => {
- // A pending row must remain discoverable after a user visits the health
- // surface. The neutral draining state deliberately has no repair action;
- // only the hard warning exposes one.
- const label = `PW Brain Health ${Date.now()}`;
- await authenticate(page, 'pw-brain-health');
- const { id } = await addAndSync(label);
-
- await waitForPendingSource(id);
-
- await openSources(page);
- await expectPendingIndicator(page, id);
-
- await page.goto('/#/brain?tab=sync');
- await waitForAppReady(page);
-
- await expect
- .poll(async () => page.evaluate(() => window.location.hash), { timeout: 20_000 })
- .toMatch(/^#\/connections\?.*tab=brain.*brain=sync/);
- });
-});
diff --git a/app/test/playwright/specs/coding-session-memory.spec.ts b/app/test/playwright/specs/coding-session-memory.spec.ts
deleted file mode 100644
index dfe2e137d5..0000000000
--- a/app/test/playwright/specs/coding-session-memory.spec.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { expect, test } from '@playwright/test';
-
-import { bootAuthenticatedPage, waitForAppReady } from '../helpers/core-rpc';
-
-test.describe('Coding-agent session memory', () => {
- test('shows Codex and Claude Code discovery on the Brain sources page', async ({ page }) => {
- await bootAuthenticatedPage(page, 'pw-coding-session-memory');
- await page.goto('/#/brain?tab=sources');
- await waitForAppReady(page);
-
- const card = page.getByTestId('coding-sessions-card');
- await expect(card).toBeVisible({ timeout: 20_000 });
- await expect(card).toContainText('Coding-agent sessions');
- await expect(page.getByTestId('coding-session-source-claude_code')).toBeVisible();
- await expect(page.getByTestId('coding-session-source-codex')).toBeVisible();
- await expect(page.getByTestId('coding-sessions-ingest')).toBeVisible();
- });
-});
diff --git a/app/test/playwright/specs/insights-dashboard.spec.ts b/app/test/playwright/specs/insights-dashboard.spec.ts
deleted file mode 100644
index d1464d51e0..0000000000
--- a/app/test/playwright/specs/insights-dashboard.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { expect, test } from '@playwright/test';
-
-import {
- bootAuthenticatedPage,
- dismissWalkthroughIfPresent,
- waitForAppReady,
-} from '../helpers/core-rpc';
-
-test.describe('Insights Dashboard', () => {
- test('renders the memory workspace and actions toolbar', async ({ page }) => {
- // Memory's dashboard is the first-class Brain graph surface now.
- await bootAuthenticatedPage(page, 'pw-insights-user');
- await page.goto('/#/brain?tab=graph');
- await waitForAppReady(page);
- await dismissWalkthroughIfPresent(page);
- await expect(page.getByText('Graph', { exact: true }).first()).toBeVisible({ timeout: 15_000 });
- await expect(page.locator('[data-testid="memory-actions"]')).toBeVisible();
- await expect(
- page.locator(
- '[data-testid="memory-graph-svg"], [data-testid="memory-graph-empty"], [data-testid="memory-graph-canvas"][data-render-ready="true"] canvas'
- )
- ).toBeVisible({ timeout: 60_000 });
- });
-});
diff --git a/app/test/playwright/specs/intelligence-memory-ui-functional.spec.ts b/app/test/playwright/specs/intelligence-memory-ui-functional.spec.ts
deleted file mode 100644
index 83ccc2434b..0000000000
--- a/app/test/playwright/specs/intelligence-memory-ui-functional.spec.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-import { expect, type Page, test } from '@playwright/test';
-import { mkdirSync, mkdtempSync, writeFileSync } from 'node:fs';
-import { tmpdir } from 'node:os';
-import { join } from 'node:path';
-
-import {
- bootAuthenticatedPage,
- callCoreRpc,
- dismissWalkthroughIfPresent,
- waitForAppReady,
-} from '../helpers/core-rpc';
-
-type MemorySource = { id: string; kind: string; label: string; enabled: boolean };
-
-/**
- * Seeds developer mode via `persist:theme` localStorage so the Memory tab
- * (dev-gated in the Activity page since Phase 3) is visible after boot.
- * Must be called via `page.addInitScript` before navigation.
- */
-async function seedDeveloperMode(page: Page): Promise<void> {
- await page.addInitScript(() => {
- try {
- const raw = localStorage.getItem('persist:theme');
- const parsed: Record<string, string> = raw ? (JSON.parse(raw) as Record<string, string>) : {};
- parsed.developerMode = JSON.stringify(true);
- localStorage.setItem('persist:theme', JSON.stringify(parsed));
- } catch {}
- });
-}
-
-async function openMemory(page: Page): Promise<void> {
- // Memory sources and graph controls are first-class Brain tabs now.
- await seedDeveloperMode(page);
- await bootAuthenticatedPage(page, 'pw-intelligence-memory-ui', '/brain?tab=sources');
- await waitForAppReady(page);
- await dismissWalkthroughIfPresent(page);
- await expect(page.getByTestId('memory-sources')).toBeVisible({ timeout: 20_000 });
-}
-
-async function addFolderSource(label: string): Promise<string> {
- const root = mkdtempSync(join(tmpdir(), 'openhuman-pw-memory-'));
- mkdirSync(join(root, 'notes'), { recursive: true });
- writeFileSync(join(root, 'notes', 'project.md'), '# Project\n\nPlaywright memory source canary.');
- await callCoreRpc('openhuman.memory_sources_add', {
- kind: 'folder',
- label,
- enabled: true,
- path: root,
- glob: '**/*.md',
- });
- return root;
-}
-
-test.describe('Intelligence memory UI', () => {
- test('source row sync, toggle, remove, graph mode, and reset confirmations work', async ({
- page,
- }) => {
- const label = `Playwright Memory Source ${Date.now()}`;
- await openMemory(page);
- await addFolderSource(label);
- await page.reload();
- await waitForAppReady(page);
- await dismissWalkthroughIfPresent(page);
- await expect(page.getByTestId('memory-sources')).toBeVisible({ timeout: 20_000 });
-
- const row = page.getByTestId('memory-source-row-folder').filter({ hasText: label });
- await expect(row).toBeVisible({ timeout: 20_000 });
-
- await row.getByTestId('memory-source-sync-folder').click();
- await expect(row).toContainText(/Sync|Syncing/);
-
- await row.getByRole('switch', { name: 'Disable' }).click();
- await expect(row.getByRole('switch', { name: 'Enable' })).toBeVisible({ timeout: 15_000 });
-
- await page.goto('/#/brain?tab=graph');
- await waitForAppReady(page);
- await page.getByTestId('memory-graph-mode-contacts').click();
- await expect(page.getByTestId('memory-graph-mode-contacts')).toHaveAttribute(
- 'aria-selected',
- 'true'
- );
- await page.getByTestId('memory-graph-mode-tree').click();
- await expect(page.getByTestId('memory-graph-mode-tree')).toHaveAttribute(
- 'aria-selected',
- 'true'
- );
-
- page.once('dialog', dialog => dialog.dismiss());
- await page.getByTestId('memory-wipe-all').click();
- await expect(page.getByTestId('memory-wipe-all')).toBeEnabled();
-
- page.once('dialog', dialog => dialog.dismiss());
- await page.getByTestId('memory-reset-tree').click();
- await expect(page.getByTestId('memory-reset-tree')).toBeEnabled();
-
- await page.goto('/#/brain?tab=sources');
- await waitForAppReady(page);
- const refreshedRow = page.getByTestId('memory-source-row-folder').filter({ hasText: label });
- await refreshedRow.getByTitle('Remove').click();
- await expect(refreshedRow).toHaveCount(0);
- });
-});
diff --git a/app/test/playwright/specs/memory-roundtrip.spec.ts b/app/test/playwright/specs/memory-roundtrip.spec.ts
deleted file mode 100644
index 56af5770b8..0000000000
--- a/app/test/playwright/specs/memory-roundtrip.spec.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import { expect, test } from '@playwright/test';
-
-import { bootAuthenticatedPage, callCoreRpc } from '../helpers/core-rpc';
-
-const TEST_NAMESPACE = 'e2e-memory-roundtrip-773';
-const TEST_KEY = 'roundtrip-canary-key';
-const TEST_TITLE = 'Memory roundtrip canary';
-const TEST_CONTENT = 'OpenHuman memory roundtrip canary fact #773';
-
-test.describe('Memory subsystem round-trip', () => {
- test.beforeEach(async ({ page }, testInfo) => {
- const slug = testInfo.title.toLowerCase().replace(/[^a-z0-9]+/g, '-');
- await bootAuthenticatedPage(page, `pw-memory-roundtrip-${slug}`, '/home');
-
- await callCoreRpc<unknown>('openhuman.memory_init', { jwt_token: '' });
- await callCoreRpc<unknown>('openhuman.memory_clear_namespace', { namespace: TEST_NAMESPACE });
- });
-
- test('stores a document and finds it via recall_memories', async () => {
- const storeResult = await callCoreRpc<unknown>('openhuman.memory_doc_put', {
- namespace: TEST_NAMESPACE,
- key: TEST_KEY,
- title: TEST_TITLE,
- content: TEST_CONTENT,
- });
- expect(storeResult).toBeDefined();
-
- const recallResult = await callCoreRpc<unknown>('openhuman.memory_recall_memories', {
- namespace: TEST_NAMESPACE,
- limit: 10,
- });
- const recalled = JSON.stringify(recallResult ?? {});
- expect(recalled.includes(TEST_KEY) || recalled.includes(TEST_CONTENT)).toBe(true);
- });
-
- test('cross-chat retrieval path succeeds for a different namespace', async () => {
- const nsA = 'e2e-memory-chat-a-773';
- const nsB = 'e2e-memory-chat-b-773';
- const factKey = 'phoenix-landing-fact';
- const factContent = 'Phoenix migration landing confirmed for Friday evening. E2E canary #773';
-
- await callCoreRpc<unknown>('openhuman.memory_clear_namespace', { namespace: nsA });
- await callCoreRpc<unknown>('openhuman.memory_clear_namespace', { namespace: nsB });
-
- await callCoreRpc<unknown>('openhuman.memory_doc_put', {
- namespace: nsA,
- key: factKey,
- title: 'Phoenix landing fact',
- content: factContent,
- });
-
- const recallResult = await callCoreRpc<unknown>('openhuman.memory_recall_memories', {
- namespace: nsB,
- limit: 20,
- });
- expect(typeof recallResult).not.toBe('undefined');
-
- await callCoreRpc<unknown>('openhuman.memory_clear_namespace', { namespace: nsA });
- await callCoreRpc<unknown>('openhuman.memory_clear_namespace', { namespace: nsB });
- });
-
- test('clears a namespace and recall no longer returns the canary', async () => {
- await callCoreRpc<unknown>('openhuman.memory_doc_put', {
- namespace: TEST_NAMESPACE,
- key: TEST_KEY,
- title: TEST_TITLE,
- content: TEST_CONTENT,
- });
-
- await callCoreRpc<unknown>('openhuman.memory_clear_namespace', { namespace: TEST_NAMESPACE });
-
- const recallAfterForget = await callCoreRpc<unknown>('openhuman.memory_recall_memories', {
- namespace: TEST_NAMESPACE,
- limit: 10,
- });
- let recalled = JSON.stringify(recallAfterForget ?? {});
- for (
- let attempt = 0;
- attempt < 10 && (recalled.includes(TEST_KEY) || recalled.includes(TEST_CONTENT));
- attempt++
- ) {
- await new Promise(resolve => setTimeout(resolve, 500));
- const retry = await callCoreRpc<unknown>('openhuman.memory_recall_memories', {
- namespace: TEST_NAMESPACE,
- limit: 10,
- });
- recalled = JSON.stringify(retry ?? {});
- }
- expect(recalled.includes(TEST_KEY)).toBe(false);
- expect(recalled.includes(TEST_CONTENT)).toBe(false);
- });
-});
diff --git a/app/test/playwright/specs/settings-dev-options.spec.ts b/app/test/playwright/specs/settings-dev-options.spec.ts
deleted file mode 100644
index 7696b3de42..0000000000
--- a/app/test/playwright/specs/settings-dev-options.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { expect, test } from '@playwright/test';
-
-import {
- bootAuthenticatedPage,
- dismissWalkthroughIfPresent,
- waitForAppReady,
-} from '../helpers/core-rpc';
-
-test.describe('Settings - Developer Options', () => {
- test.beforeEach(async ({ page }) => {
- await bootAuthenticatedPage(page, 'pw-settings-dev-user');
- });
-
- test('mounts Memory Debug panel', async ({ page }) => {
- await page.goto('/#/settings/memory-debug');
- await waitForAppReady(page);
- await dismissWalkthroughIfPresent(page);
-
- await expect(page.getByTestId('memory-debug-panel')).toBeVisible();
- await expect(page.getByRole('heading', { name: 'Documents', exact: true })).toBeVisible();
- await expect(page.getByRole('heading', { name: 'Namespaces', exact: true })).toBeVisible();
- await expect(page.getByText('Query & Recall')).toBeVisible();
- await expect(page.getByText('Clear Namespace')).toBeVisible();
- });
-});