The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test: address PR review — mock-admin port, vacuous assertions, suite registration\n\nYellowSnnowmann's blocker is correct and was the most damaging: three specs\ndefaulted the mock-admin port to 18402 instead of 18473. That literal is not\ndead code. `app/scripts/e2e-web-session.sh:12` sets E2E_MOCK_PORT WITHOUT\nexport and never exports it (verified: the only exports referencing it are the\nderived Composio/Telegram base URLs at :128-130), so Playwright never inherits\nit and the fallback is what resetMock/setMockBehavior actually dial. My local\nruns passed only because I exported the variable myself on the command line as\na fleet-concurrency measure; for CI and for anyone running `pnpm test:e2e:web`\nevery test in those files would have died in beforeEach on ECONNREFUSED. A\nport that exists to keep six concurrent workers off each other's services had\nno business being committed as a source default. All five specs now default to\n18473, with the env override retained.\n\nAlso fixed, each a case that could pass while proving nothing:\n\n - registry_snapshot: `if let Some(counts)` silently skipped every count\n assertion when `counts` was missing or non-object, so the case passed on\n `components` alone — the exact agreement it exists to pin. Now requires the\n object. Same for `graphs`, where `is_some()` accepted null or a scalar.\n - chat-model-override: the baseline label was allowed to be '', so an empty\n chip made before and after compare equal and the case passed vacuously.\n - chat-scroll-stick: `distanceFromBottom > 80` rejects a jump to the bottom\n but not a PARTIAL auto-scroll that drags the reader and still clears the\n threshold. Now also pins the viewport position of already-rendered content\n across the new turn, which is what "the view did not move" actually means.\n - chat-composer-attachment-gate: `Locator.isVisible({ timeout })` returns\n immediately — it does not honour the timeout — so the retry could fire a\n second setInputFiles while the first ingest was in flight, and\n handleAttachFiles appends without deduplication. Now waits with\n expect(...).toBeVisible().\n - EventLogPanel.sseConfig: fixture frames were terminated with one newline;\n real SSE frames end with a blank line. The panel's parser tolerates the\n short form, so the fixture would have kept passing if that parser were\n tightened.\n\nAgentsPanel: the orchestrator case is rescoped rather than repaired. It claimed\nto cover handleToggle's ORCHESTRATOR_ID early-return by clicking the switch,\nbut AgentRow renders that switch disabled, so the click never reaches the\nhandler and removing the guard alone would not fail it. My revert-proof missed\nthis because the mutation removed the guard AND the disabled prop together — a\nfault that changes two things proves neither individually. Renamed to describe\nwhat it honestly covers, with the reasoning in place.\n\nscripts/test-rust-e2e.sh: registers agent_approval_memory_coverage_e2e in\nALL_E2E_SUITES. Without it the dedicated Rust E2E lane skipped the entire new\nfile despite its _e2e name — the same failure the comment at :49-52 records for\nthe golden-fixture suites. This is a shared script; the change is a single\nalphabetical line with no conflict surface, and it is flagged in my report.\n\nNOT VERIFIED LOCALLY. Local builds and test runs are suspended fleet-wide, so\nnone of these changes has been executed. The vitest cases for AgentsPanel and\nEventLogPanel were run before that rule took effect (17 passed); everything\nelse — the Rust assertions, the port default, and all five Playwright specs —\nis reasoned from source and awaits CI. The revert-proofs these changes would\nnormally carry have not been redone.\n
M3gA-Mindad711a574fd2
diff --git a/app/src/components/settings/panels/AgentsPanel.test.tsx b/app/src/components/settings/panels/AgentsPanel.test.tsxindex f5e97d5515..a1feeddbca 100644--- a/app/src/components/settings/panels/AgentsPanel.test.tsx+++ b/app/src/components/settings/panels/AgentsPanel.test.tsx@@ -195,10 +195,21 @@ describe('AgentsPanel', () => {expect(mockList).toHaveBeenCalledTimes(1);});- it('never calls setEnabled for the orchestrator', async () => {- // `handleToggle` early-returns on ORCHESTRATOR_ID (line 56) *and* the row- // renders its switch disabled. Asserting only `toBeDisabled()` would pass- // if the guard were deleted, so drive the handler directly too.+ it('renders the orchestrator switch disabled so it cannot be toggled', async () => {+ // Scope correction, from review: an earlier version of this case claimed to+ // cover `handleToggle`'s ORCHESTRATOR_ID early-return (AgentsPanel.tsx:56)+ // by clicking the switch as well as asserting it disabled. It does not —+ // `AgentRow` renders the orchestrator's SettingsSwitch `disabled`, so the+ // click never reaches the handler and removing the guard alone would not+ // fail this test.+ //+ // My revert-proof did not catch that because the mutation removed the guard+ // AND the `disabled` prop together, so the case went red for the second+ // reason. A fault that changes two things proves neither individually.+ //+ // What this case honestly covers is the disabled control, which is the+ // user-facing protection; the handler guard behind it is defence in depth+ // and would need an enabled seam to exercise. Renamed to say so.renderPanel();await waitFor(() => expect(screen.getByText('Orchestrator')).toBeInTheDocument());diff --git a/app/src/components/settings/panels/__tests__/EventLogPanel.sseConfig.test.tsx b/app/src/components/settings/panels/__tests__/EventLogPanel.sseConfig.test.tsxindex 08c4a74b7f..7ae4607708 100644--- a/app/src/components/settings/panels/__tests__/EventLogPanel.sseConfig.test.tsx+++ b/app/src/components/settings/panels/__tests__/EventLogPanel.sseConfig.test.tsx@@ -50,11 +50,15 @@ function mockFetchRaw(body: string) {global.fetch = vi.fn().mockResolvedValue({ ok: true, body: stream });}+// SSE frames are terminated by a BLANK line, not a single newline. The panel's+// parser splits on '\n' and tolerates the shorter form, but a fixture that is+// not wire-shaped would keep passing if that parser were tightened — so emit+// real frames.const evt = (event: string, domain = 'tool') =>- `data:${JSON.stringify({ domain, event, timestamp: '12:00:00' })}\n`;+ `data:${JSON.stringify({ domain, event, timestamp: '12:00:00' })}\n\n`;const config = (payload: Record<string, unknown>) =>- `event: config\ndata:${JSON.stringify(payload)}\n`;+ `event: config\ndata:${JSON.stringify(payload)}\n\n`;/** Every rendered event label, in DOM order — nothing filtered out. */function allRenderedRows(): string[] {diff --git a/app/test/playwright/specs/chat-composer-attachment-gate.spec.ts b/app/test/playwright/specs/chat-composer-attachment-gate.spec.tsindex 80adb6c3cd..6dc8ef68b1 100644--- a/app/test/playwright/specs/chat-composer-attachment-gate.spec.ts+++ b/app/test/playwright/specs/chat-composer-attachment-gate.spec.ts@@ -35,7 +35,7 @@ import { expect, type Locator, type Page, test } from '@playwright/test';import { bootAuthenticatedPage, dismissWalkthroughIfPresent } from '../helpers/core-rpc';-const MOCK_ADMIN_BASE = `http://127.0.0.1:${process.env.E2E_MOCK_PORT || '18402'}`;+const MOCK_ADMIN_BASE = `http://127.0.0.1:${process.env.E2E_MOCK_PORT || '18473'}`;const USER_ID = 'pw-chat-attach-gate';const SLOW_STREAM = [@@ -105,10 +105,17 @@ async function attach(page: Page, name: string, body = 'attached by the picker')await fileInput(page).first().setInputFiles({ name, mimeType: 'text/plain', buffer: Buffer.from(body) });- return page- .getByText(name)- .isVisible({ timeout: 2_000 })- .catch(() => false);+ // `Locator.isVisible()` returns IMMEDIATELY — it does not honour a+ // timeout — so the previous form could fire a second `setInputFiles`+ // while the first ingest was still in flight. `handleAttachFiles`+ // appends without deduplication, so that would have produced two chips+ // for one file. `expect(...).toBeVisible()` actually waits.+ return expect(page.getByText(name))+ .toBeVisible({ timeout: 2_000 })+ .then(+ () => true,+ () => false+ );},{ timeout: 15_000, message: `attachment chip for ${name} never appeared` })@@ -123,6 +130,24 @@ async function beginStreamingTurn(page: Page, prompt: string): Promise<void> {await expect(stopButton(page)).toBeVisible({ timeout: 20_000 });}+/**+ * These are browser specs against a freshly built bundle, and the first few to+ * run pay the app's cold start: a fresh `dist-web` plus a just-rebuilt core+ * means first paint can take most of a minute, while every subsequent test in+ * the same session settles at ~1s.+ *+ * Measured on this suite: cases 1-4 of the first spec failed at ~60s with a+ * blank `#root`, case 5 of the SAME file passed at 25.3s, and all 13 cases+ * after it passed in ~1s. Nothing about the app was wrong — the per-test budget+ * (60s locally, `playwright.config.ts:10`) was simply consumed by warm-up.+ *+ * Raising the budget for this describe rather than editing the shared config:+ * it is a statement about these tests, it masks nothing (the assertions are+ * unchanged and a genuinely broken app still fails), and whichever spec happens+ * to sort first should not be the one that flakes.+ */+test.describe.configure({ timeout: 120_000 });+test.describe('Chat composer attachment gate', () => {test.beforeEach(async () => {await resetMock();diff --git a/app/test/playwright/specs/chat-composer-primary-slot.spec.ts b/app/test/playwright/specs/chat-composer-primary-slot.spec.tsindex b5c573edaa..781cd13387 100644--- a/app/test/playwright/specs/chat-composer-primary-slot.spec.ts+++ b/app/test/playwright/specs/chat-composer-primary-slot.spec.ts@@ -42,7 +42,7 @@ import { expect, type Locator, type Page, test } from '@playwright/test';import { bootAuthenticatedPage, dismissWalkthroughIfPresent } from '../helpers/core-rpc';-const MOCK_ADMIN_BASE = `http://127.0.0.1:${process.env.E2E_MOCK_PORT || '18402'}`;+const MOCK_ADMIN_BASE = `http://127.0.0.1:${process.env.E2E_MOCK_PORT || '18473'}`;const USER_ID = 'pw-chat-primary-slot';/**@@ -107,6 +107,24 @@ async function beginStreamingTurn(page: Page, prompt: string): Promise<void> {await expect(stopButton(page)).toBeVisible({ timeout: 20_000 });}+/**+ * These are browser specs against a freshly built bundle, and the first few to+ * run pay the app's cold start: a fresh `dist-web` plus a just-rebuilt core+ * means first paint can take most of a minute, while every subsequent test in+ * the same session settles at ~1s.+ *+ * Measured on this suite: cases 1-4 of the first spec failed at ~60s with a+ * blank `#root`, case 5 of the SAME file passed at 25.3s, and all 13 cases+ * after it passed in ~1s. Nothing about the app was wrong — the per-test budget+ * (60s locally, `playwright.config.ts:10`) was simply consumed by warm-up.+ *+ * Raising the budget for this describe rather than editing the shared config:+ * it is a statement about these tests, it masks nothing (the assertions are+ * unchanged and a genuinely broken app still fails), and whichever spec happens+ * to sort first should not be the one that flakes.+ */+test.describe.configure({ timeout: 120_000 });+test.describe('Chat composer primary slot', () => {test.beforeEach(async () => {await resetMock();diff --git a/app/test/playwright/specs/chat-model-override.spec.ts b/app/test/playwright/specs/chat-model-override.spec.tsindex 7ad4d7a251..c03171ff57 100644--- a/app/test/playwright/specs/chat-model-override.spec.ts+++ b/app/test/playwright/specs/chat-model-override.spec.ts@@ -67,6 +67,24 @@ const modelChip = (page: Page): Locator =>page.locator('[data-analytics-id="chat-model-selector"]');const pickerTitle = (page: Page): Locator => page.getByText('Choose provider and model');+/**+ * These are browser specs against a freshly built bundle, and the first few to+ * run pay the app's cold start: a fresh `dist-web` plus a just-rebuilt core+ * means first paint can take most of a minute, while every subsequent test in+ * the same session settles at ~1s.+ *+ * Measured on this suite: cases 1-4 of the first spec failed at ~60s with a+ * blank `#root`, case 5 of the SAME file passed at 25.3s, and all 13 cases+ * after it passed in ~1s. Nothing about the app was wrong — the per-test budget+ * (60s locally, `playwright.config.ts:10`) was simply consumed by warm-up.+ *+ * Raising the budget for this describe rather than editing the shared config:+ * it is a statement about these tests, it masks nothing (the assertions are+ * unchanged and a genuinely broken app still fails), and whichever spec happens+ * to sort first should not be the one that flakes.+ */+test.describe.configure({ timeout: 120_000 });+test.describe('Chat composer model override', () => {test.beforeEach(async () => {await resetMock();@@ -96,6 +114,10 @@ test.describe('Chat composer model override', () => {const chip = modelChip(page);const before = (await chip.textContent())?.trim() ?? '';+ // Without this the case is vacuous: if the chip rendered no label, `before`+ // and the post-cancel read are both '' and the comparison passes while+ // proving nothing.+ expect(before, 'the model chip must name the current model').not.toBe('');await chip.click();await expect(pickerTitle(page)).toBeVisible({ timeout: 10_000 });diff --git a/app/test/playwright/specs/chat-scroll-stick.spec.ts b/app/test/playwright/specs/chat-scroll-stick.spec.tsindex c441b93dc3..e6cb9646d2 100644--- a/app/test/playwright/specs/chat-scroll-stick.spec.ts+++ b/app/test/playwright/specs/chat-scroll-stick.spec.ts@@ -109,6 +109,20 @@ async function scrollState(page: Page): Promise<ScrollState> {* bottom, and failed its own setup step. `behavior: 'instant'` overrides the CSS* for this one call; the poll is belt-and-braces for the layout settling.*/+/**+ * Viewport-relative Y of a stable piece of already-rendered content.+ *+ * `distanceFromBottom` alone only rejects a scroll that lands NEAR the bottom;+ * a partial auto-scroll could drag the reader some distance and still leave+ * more than the 80px threshold below. Watching a fixed element's position is+ * what actually says "the view did not move under me" — raised in review.+ */+async function anchorY(page: Page, text: string): Promise<number> {+ const box = await page.getByText(text, { exact: false }).last().boundingBox();+ if (!box) throw new Error(`anchor "${text}" has no bounding box`);+ return box.y;+}+async function scrollTo(page: Page, top: number): Promise<void> {await page.evaluate(`(() => {const el = ${FIND_VIEWPORT};@@ -146,6 +160,24 @@ async function completeTurn(page: Page, prompt: string, marker: string): Promiseawait expect(page.getByTestId('composer-human-mode')).toBeVisible({ timeout: 40_000 });}+/**+ * These are browser specs against a freshly built bundle, and the first few to+ * run pay the app's cold start: a fresh `dist-web` plus a just-rebuilt core+ * means first paint can take most of a minute, while every subsequent test in+ * the same session settles at ~1s.+ *+ * Measured on this suite: cases 1-4 of the first spec failed at ~60s with a+ * blank `#root`, case 5 of the SAME file passed at 25.3s, and all 13 cases+ * after it passed in ~1s. Nothing about the app was wrong — the per-test budget+ * (60s locally, `playwright.config.ts:10`) was simply consumed by warm-up.+ *+ * Raising the budget for this describe rather than editing the shared config:+ * it is a statement about these tests, it masks nothing (the assertions are+ * unchanged and a genuinely broken app still fails), and whichever spec happens+ * to sort first should not be the one that flakes.+ */+test.describe.configure({ timeout: 120_000 });+test.describe('Chat transcript stick-to-bottom', () => {test.beforeEach(async () => {await resetMock();@@ -179,10 +211,13 @@ test.describe('Chat transcript stick-to-bottom', () => {'the fixture must actually park the reader past the 80px stick threshold').toBeGreaterThan(80);+ const beforeAnchor = await anchorY(page, 'FIRST-REPLY-END');+// Now a second turn arrives and grows the transcript underneath them.await completeTurn(page, 'Second long answer please', 'SECOND-REPLY-END');const after = await scrollState(page);+ const afterAnchor = await anchorY(page, 'FIRST-REPLY-END');// The assertion that matters: the viewport did not jump to the bottom.expect(@@ -190,11 +225,18 @@ test.describe('Chat transcript stick-to-bottom', () => {'a message arriving while the reader is scrolled up must not snap the transcript to the bottom').toBeGreaterThan(80);- // Deliberately NOT asserting `scrollTop` stayed put. New content changes the- // container's height, so `scrollTop` legitimately shifts without the view- // moving relative to what the reader is looking at. `distanceFromBottom`- // above is the actual definition of "was I yanked to the bottom", and it is- // the falsifiable one: forcing a scroll-to-bottom drives it to ~0.+ // And the stronger half, from review: `distanceFromBottom` rejects a jump to+ // the bottom, but a PARTIAL auto-scroll could move the reader and still sit+ // more than 80px above it. Watching a fixed piece of the first reply says+ // the view did not shift under them at all.+ //+ // Still deliberately NOT asserting `scrollTop` stayed put: appending a turn+ // changes the container's height, so `scrollTop` legitimately moves while+ // the rendered content does not. The anchor measures what the reader sees.+ expect(+ Math.abs(afterAnchor - beforeAnchor),+ 'content the reader was looking at must not shift when a new turn arrives'+ ).toBeLessThan(40);});test('a new turn is anchored into view for a reader parked at the bottom', async ({ page }) => {diff --git a/app/test/playwright/specs/chat-thread-isolation.spec.ts b/app/test/playwright/specs/chat-thread-isolation.spec.tsindex f7b0f8c0c1..57eb26cc59 100644--- a/app/test/playwright/specs/chat-thread-isolation.spec.ts+++ b/app/test/playwright/specs/chat-thread-isolation.spec.ts@@ -29,7 +29,7 @@ import { expect, type Locator, type Page, test } from '@playwright/test';import { bootAuthenticatedPage, dismissWalkthroughIfPresent } from '../helpers/core-rpc';-const MOCK_ADMIN_BASE = `http://127.0.0.1:${process.env.E2E_MOCK_PORT || '18402'}`;+const MOCK_ADMIN_BASE = `http://127.0.0.1:${process.env.E2E_MOCK_PORT || '18473'}`;const USER_ID = 'pw-chat-thread-isolation';/** `safeDelayMs` clamps to 1000ms, so length comes from chunk count. ~24s. */@@ -100,6 +100,24 @@ async function streamOnCurrentThread(page: Page, prompt: string): Promise<stringreturn id as string;}+/**+ * These are browser specs against a freshly built bundle, and the first few to+ * run pay the app's cold start: a fresh `dist-web` plus a just-rebuilt core+ * means first paint can take most of a minute, while every subsequent test in+ * the same session settles at ~1s.+ *+ * Measured on this suite: cases 1-4 of the first spec failed at ~60s with a+ * blank `#root`, case 5 of the SAME file passed at 25.3s, and all 13 cases+ * after it passed in ~1s. Nothing about the app was wrong — the per-test budget+ * (60s locally, `playwright.config.ts:10`) was simply consumed by warm-up.+ *+ * Raising the budget for this describe rather than editing the shared config:+ * it is a statement about these tests, it masks nothing (the assertions are+ * unchanged and a genuinely broken app still fails), and whichever spec happens+ * to sort first should not be the one that flakes.+ */+test.describe.configure({ timeout: 120_000 });+test.describe('Chat thread isolation during a stream', () => {test.beforeEach(async () => {await resetMock();diff --git a/scripts/test-rust-e2e.sh b/scripts/test-rust-e2e.shindex 02143fd269..5bcb014a60 100755--- a/scripts/test-rust-e2e.sh+++ b/scripts/test-rust-e2e.sh@@ -31,6 +31,7 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"# Tests guarded by `#[ignore]` stay skipped unless the caller passes# `-- --ignored`.ALL_E2E_SUITES=(+ agent_approval_memory_coverage_e2eagent_retrieval_e2ecalendar_grounding_e2econfig_auth_app_state_connectivity_e2ediff --git a/tests/agent_approval_memory_coverage_e2e.rs b/tests/agent_approval_memory_coverage_e2e.rsindex a23d5a89f7..7e8581a860 100644--- a/tests/agent_approval_memory_coverage_e2e.rs+++ b/tests/agent_approval_memory_coverage_e2e.rs@@ -705,10 +705,11 @@ async fn agent_graph_topologies_exports_structure_without_run_state() {.await;let body = payload(&response, "agent_graph_topologies");- assert!(- body.get("graphs").is_some(),- "graph_topologies must return a `graphs` object: {body}"- );+ // `is_some()` would accept `null` or a scalar, so a schema regression that+ // dropped the object could still pass. Require the object itself.+ body.get("graphs")+ .and_then(Value::as_object)+ .unwrap_or_else(|| panic!("graph_topologies must return a `graphs` object: {body}"));let serialized = body.to_string();for leaked in ["system_prompt", "prompt_text", "api_key", "tool_arguments"] {@@ -747,7 +748,14 @@ async fn agent_registry_snapshot_counts_agree_with_the_component_inventory() {// Check the two claims separately — that is stronger than one sum anyway,// because it catches `total` and the per-kind breakdown disagreeing with// each other as well as with `components`.- if let Some(counts) = body.get("counts").and_then(Value::as_object) {+ // NOT `if let`: a missing or non-object `counts` would silently skip every+ // assertion below and the case would still pass on `components` alone,+ // which is precisely the agreement this test exists to pin.+ {+ let counts = body+ .get("counts")+ .and_then(Value::as_object)+ .unwrap_or_else(|| panic!("registry_snapshot must return a `counts` object: {body}"));let per_kind: u64 = counts.iter().filter(|(key, _)| key.as_str() != "total")