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(e2e): remove the retired Rewards desktop suites
M3gA-Mind8597c21bfb09
diff --git a/app/scripts/e2e-run-all-flows.sh b/app/scripts/e2e-run-all-flows.shindex f908eaa373..b7ef47b9f3 100755--- a/app/scripts/e2e-run-all-flows.sh+++ b/app/scripts/e2e-run-all-flows.sh@@ -381,8 +381,6 @@ if should_run_suite "payments"; thenecho "## Running suite: payments"run "test/e2e/specs/card-payment-flow.spec.ts" "card-payment" "payments"run "test/e2e/specs/crypto-payment-flow.spec.ts" "crypto-payment" "payments"- run "test/e2e/specs/rewards-unlock-flow.spec.ts" "rewards-unlock" "payments"- run "test/e2e/specs/rewards-progression-persistence.spec.ts" "rewards-progression" "payments"_mini_summary "payments"fidiff --git a/app/test/e2e/specs/rewards-progression-persistence.spec.ts b/app/test/e2e/specs/rewards-progression-persistence.spec.tsdeleted file mode 100644index 9181dcafe1..0000000000--- a/app/test/e2e/specs/rewards-progression-persistence.spec.ts+++ /dev/null@@ -1,274 +0,0 @@-import { waitForApp } from '../helpers/app-helpers';-import { textExists, waitForText } from '../helpers/element-helpers';-import { supportsExecuteScript } from '../helpers/platform';-import { resetApp } from '../helpers/reset-app';-import {- resetMockBehavior,- setMockBehavior,- startMockServer,- stopMockServer,-} from '../mock-server';--/**- * Rewards & Progression — progress-tracking persistence (matrix rows- * 12.2.1 / 12.2.2 / 12.2.3).- *- * Goal: prove that the Rewards page surfaces message-driven progress, usage- * metrics, and that those values persist across a simulated app restart- * (re-mounting the page after a fresh fetch).- *- * Per-case strategy:- * - 12.2.1 message count tracking: there is no literal `messageCount` field- * in the snapshot — message-driven progress is proxied by- * `metrics.featuresUsedCount` (a counter the backend bumps when a- * message exercises a tracked feature). We assert via- * `__OPENHUMAN_STORE__`-style window probe (snapshot lives in component- * state, not Redux, so we read the rendered text instead). High-usage- * scenario sets featuresUsedCount=6; we confirm cumulativeTokens render- * reflects the high number.- * - 12.2.2 usage metrics: assert the `Activity streak` + `Cumulative tokens`- * rows in the metrics footer reflect the high-usage scenario values.- * - 12.2.3 state persistence: switch to `post_restart` (same metric values,- * later `lastSyncedAt`) to simulate a backend re-sync after the app- * restarted; navigate away, prime the new scenario, navigate back, and- * confirm the metrics survive (cumulative tokens + streak are stable;- * lastSyncedAt advanced).- *- * Mac2 skipped — same rationale as `rewards-unlock-flow.spec.ts`: rewards- * surface is rendered in the WKWebView and our Appium selectors do not yet- * cover the bottom-tab `Rewards` label cleanly.- */-function stepLog(message: string, context?: unknown): void {- const stamp = new Date().toISOString();- if (context === undefined) {- console.log(`[RewardsProgressionE2E][${stamp}] ${message}`);- return;- }- console.log(`[RewardsProgressionE2E][${stamp}] ${message}`, JSON.stringify(context, null, 2));-}--async function navigateToRewards(): Promise<void> {- // Navigate to /home first so the Rewards component always re-mounts.- // Without this, if already at /rewards, setting the same hash is a no-op- // and the component never re-fetches the primed mock scenario.- await browser.execute(() => {- window.location.hash = '/home';- });- await browser.pause(1_000);- await browser.execute(() => {- window.location.hash = '/rewards?view=main';- });- await browser.pause(2_000);-}--async function navigateAway(): Promise<void> {- // Send the hash router back to /home so the Rewards page unmounts and the- // next navigation re-runs the on-mount fetch (the app's restart-equivalent- // for this surface — `Rewards.tsx` only loads on mount, so unmount-remount- // is the cheapest way to re-hit `/rewards/me` without a full browser- // restart that tauri-driver does not support cheaply).- await browser.execute(() => {- window.location.hash = '/home';- });- await browser.pause(2_000);-}--async function waitForRewardsSnapshot(timeout = 15_000): Promise<void> {- const deadline = Date.now() + timeout;- while (Date.now() < deadline) {- if (await textExists('Your Progress')) {- const stillLoading = await textExists('Loading rewards…');- if (!stillLoading) return;- }- await browser.pause(400);- }- throw new Error('[RewardsProgressionE2E] Rewards page did not finish loading snapshot in time');-}--async function getRewardsMetricValue(label: string): Promise<string | null> {- return browser.execute(metricLabel => {- const labels = Array.from(document.querySelectorAll('span'));- const labelNode = labels.find(node => node.textContent?.trim() === metricLabel);- const row = labelNode?.parentElement;- if (!row) return null;- const valueNode = Array.from(row.querySelectorAll('span')).find(node => node !== labelNode);- return valueNode?.textContent?.trim() ?? null;- }, label);-}--// TODO(#6399): Rewards was retired; remove or replace this desktop suite.-describe.skip('Rewards progression & persistence', () => {- before(async function beforeSuite() {- // resetApp bring-up can run ~25-30s and race the default 30s Mocha hook- // budget; raise it.- this.timeout(90_000);- if (!supportsExecuteScript()) {- stepLog('Skipping suite on Mac2 — Rewards bottom-tab label not mapped for Appium');- this.skip();- }-- stepLog('starting mock server');- await startMockServer();- stepLog('waiting for app');- await waitForApp();- stepLog('resetting app with e2e-rewards-progression identity');- await resetApp('e2e-rewards-progression');- });-- after(async () => {- stepLog('resetting mock behavior');- resetMockBehavior();- stepLog('stopping mock server');- await stopMockServer();- });-- it('12.2.1 — message-driven progress is reflected in the unlocked-count summary', async () => {- stepLog(- 'priming high_usage scenario (featuresUsedCount=6, cumulativeTokens=12.5M, streak=14d)'- );- resetMockBehavior();- setMockBehavior('rewardsScenario', 'high_usage');-- await navigateToRewards();- await waitForText('Your Progress', 15_000);- await waitForRewardsSnapshot();-- // Server returns unlockedCount=3 / totalCount=3 for the high_usage- // scenario — proves the message-driven progress threshold lit all 3- // achievements. The summary line is the single grep-friendly anchor- // for this assertion.- expect(await textExists('3 of 3 achievements unlocked')).toBe(true);-- // Each of the three achievement titles is present.- expect(await textExists('7-Day Streak')).toBe(true);- expect(await textExists('Discord Member')).toBe(true);- expect(await textExists('Pro Supporter')).toBe(true);- });-- it('12.2.2 — usage metrics (current streak + cumulative tokens) render the snapshot values', async () => {- stepLog('priming high_usage scenario for metrics footer');- resetMockBehavior();- setMockBehavior('rewardsScenario', 'high_usage');-- // Navigate away first so the page remount fires a fresh fetch — leaves- // the case runnable in isolation (mocha --grep) without depending on- // ordering with case 12.2.1 above.- await navigateAway();- await navigateToRewards();- await waitForText('Your Progress', 15_000);- await waitForRewardsSnapshot();-- // Activity streak row in the metrics footer.- expect(await textExists('Activity streak')).toBe(true);- expect(await getRewardsMetricValue('Activity streak')).toBe('14 days');-- // Cumulative tokens row — value formatted via en-US Intl.NumberFormat- // (see RewardsCommunityTab.formatNumber). 12_500_000 → "12,500,000".- expect(await textExists('Cumulative tokens')).toBe(true);- expect(await getRewardsMetricValue('Cumulative tokens')).toBe('12,500,000');- });-- it('12.2.3 — state persists across a simulated restart (re-fetch on remount)', async () => {- // Phase 1: load the high-usage snapshot with a fixed lastSyncedAt so we- // can prove the second fetch advanced the timestamp without changing- // the durable counters.- const beforeRestartSyncedAt = '2026-04-28T09:00:00.000Z';- const afterRestartSyncedAt = '2026-04-28T10:30:00.000Z';-- stepLog('Phase 1: priming high_usage with pre-restart lastSyncedAt');- resetMockBehavior();- setMockBehavior('rewardsScenario', 'high_usage');- setMockBehavior('rewardsLastSyncedAt', beforeRestartSyncedAt);-- await navigateAway();- await navigateToRewards();- await waitForText('Your Progress', 15_000);- await waitForRewardsSnapshot();-- // Capture the durable counters from the rendered DOM before the restart.- expect(await getRewardsMetricValue('Activity streak')).toBe('14 days');- expect(await getRewardsMetricValue('Cumulative tokens')).toBe('12,500,000');-- // Phase 2: simulate a restart by unmounting Rewards (navigate away),- // priming the post_restart scenario (same counters, later- // lastSyncedAt), then re-mounting Rewards. This mimics what happens on- // app restart — the in-memory snapshot is gone, the page re-fetches- // `/rewards/me`, and the durable backend state must repopulate the UI.- stepLog('Phase 2: navigating away + flipping to post_restart scenario');- await navigateAway();- resetMockBehavior();- setMockBehavior('rewardsScenario', 'post_restart');- setMockBehavior('rewardsLastSyncedAt', afterRestartSyncedAt);-- stepLog('Phase 2: re-navigating to /rewards (simulated restart)');- await navigateToRewards();- await waitForText('Your Progress', 15_000);- await waitForRewardsSnapshot();-- // Durable counters must survive the restart unchanged.- expect(await getRewardsMetricValue('Activity streak')).toBe('14 days');- expect(await getRewardsMetricValue('Cumulative tokens')).toBe('12,500,000');- expect(await textExists('3 of 3 achievements unlocked')).toBe(true);-- // Verify the second `/rewards/me` request landed on the mock — the- // request log is the authoritative signal that the page actually- // re-fetched (and the server returned the post-restart timestamp).- // The mock-api admin requests endpoint enumerates every request the- // server has received since the server started, with the latest at- // the tail. Filter for `/rewards/me` GETs and assert at least 2 (one- // per phase).- const rewardsRequestCount = await browser.execute(async () => {- const apiBase =- (window as unknown as { __OPENHUMAN_API_BASE__?: string }).__OPENHUMAN_API_BASE__ ??- 'http://127.0.0.1:18473';- const res = await fetch(`${apiBase}/__admin/requests`);- const json = (await res.json()) as { data?: Array<{ method: string; url: string }> };- const log = json.data ?? [];- return log.filter(r => r.method === 'GET' && /^\/rewards\/me/.test(r.url)).length;- });- stepLog('rewards/me request count after restart simulation', { rewardsRequestCount });- expect(rewardsRequestCount).toBeGreaterThanOrEqual(2);- });-- it('12.2.4 — stalled rewards endpoint past timeout shows recoverable error with retry affordance', async () => {- stepLog('priming rewardsDelayMs=20000 — response arrives after the 15s app-side timeout');- resetMockBehavior();- setMockBehavior('rewardsDelayMs', '20000');-- await navigateAway();- await navigateToRewards();-- // The Rewards page renders an error state containing "Sync unavailable"- // and a retry button after the 15 s REWARDS_SNAPSHOT_TIMEOUT_MS fires.- // Give the page up to 30 s to time out and render the error UI.- const sawError = await waitForText('Sync unavailable', 30_000).then(- () => true,- () => false- );- if (!sawError) {- stepLog('WARN: "Sync unavailable" not seen — checking for any error marker');- }- expect(sawError || (await textExists('Retrying'))).toBe(true);-- // The retry button must be present so the user can recover without restart.- const hasRetry = await textExists('Retrying');- expect(hasRetry).toBe(true);- });-- it('12.2.5 — retry after timeout recovers and renders normalized rewards data', async () => {- stepLog('clearing delay so next request responds immediately');- resetMockBehavior();- setMockBehavior('rewardsScenario', 'high_usage');-- // Navigate away so the retry is a fresh mount (mirroring user navigating- // back after the stall rather than clicking the retry button directly,- // since clicking into the delayed response is racy).- await navigateAway();- await navigateToRewards();- await waitForText('Your Progress', 15_000);- await waitForRewardsSnapshot();-- expect(await textExists('3 of 3 achievements unlocked')).toBe(true);- expect(await getRewardsMetricValue('Activity streak')).toBe('14 days');- });-});diff --git a/app/test/e2e/specs/rewards-unlock-flow.spec.ts b/app/test/e2e/specs/rewards-unlock-flow.spec.tsdeleted file mode 100644index d1197afe99..0000000000--- a/app/test/e2e/specs/rewards-unlock-flow.spec.ts+++ /dev/null@@ -1,210 +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 } from '../helpers/shared-flows';-import {- resetMockBehavior,- setMockBehavior,- startMockServer,- stopMockServer,-} from '../mock-server';--/**- * Rewards & Progression — role-unlock flows (matrix rows 12.1.1 / 12.1.2 / 12.1.3).- *- * Goal: prove that the Rewards page renders the three unlock taxonomies the- * matrix tracks — activity-based, integration-based, plan-based — by- * pre-seeding `mockBehavior.rewardsScenario` for each case before the- * Rewards page fetches `/rewards/me`.- *- * Per-case strategy:- * - 12.1.1 activity-based unlock: `rewardsScenario=activity_unlocked` →- * streak achievement marked unlocked; assert "1 of 3 achievements unlocked"- * + "Unlocked" label on the streak card.- * - 12.1.2 integration-based unlock: `rewardsScenario=integration_unlocked`- * → discord membership=member, assignedDiscordRoleCount=1; assert- * "Joined the server" copy + Discord achievement card unlocked.- * - 12.1.3 plan-based unlock: `rewardsScenario=plan_unlocked` → plan=PRO,- * hasActiveSubscription=true; assert the plan-tier achievement is the- * unlocked one in the snapshot reflected in the UI.- *- * The mock has to be primed BEFORE the Rewards page mounts: `Rewards.tsx`- * fetches once on mount via `useEffect`. Each `it()` resets behavior,- * primes the scenario, then navigates fresh — the SPA hash router unmounts- * the previous Rewards instance, so re-navigating is enough to re-trigger- * the load (no full page reload needed).- *- * Mac2 skipped — Rewards content is rendered in the WKWebView and the- * Appium helpers do not yet expose the `Rewards` bottom-tab label cleanly.- * The Linux tauri-driver run is the source of truth for this spec, matching- * `whatsapp-flow.spec.ts` / `slack-flow.spec.ts` / `insights-dashboard.spec.ts`.- */-function stepLog(message: string, context?: unknown): void {- const stamp = new Date().toISOString();- if (context === undefined) {- console.log(`[RewardsUnlockE2E][${stamp}] ${message}`);- return;- }- console.log(`[RewardsUnlockE2E][${stamp}] ${message}`, JSON.stringify(context, null, 2));-}--async function navigateToRewards(): Promise<void> {- // /rewards is hash-routed (see AppRoutes.tsx line 109). On Linux- // tauri-driver we go via window.location.hash directly because the- // sidebar/bottom-tab affordances are icon-only buttons and existing- // `clickButton('Rewards')` matches conflict with the page header text- // "Earn Rewards & Discord Roles".- //- // Navigate to /home first so the React component always re-mounts when- // we arrive at /rewards. Without this, if the page is already at /rewards- // setting the same hash is a no-op and the component never re-fetches- // the mock scenario that was just primed.- await browser.execute(() => {- window.location.hash = '/home';- });- await browser.pause(1_000);- await browser.execute(() => {- // `/rewards` now lands on the Welcome landing; jump straight to the- // functional rewards view.- window.location.hash = '/rewards?view=main';- });- await browser.pause(2_000);-}--async function waitForRewardsSnapshot(timeout = 15_000): Promise<void> {- // The snapshot is in by the time `Your Progress` + the achievements-unlocked- // line render. We wait on the latter because it embeds the unlock count- // verbatim, so the next `textExists("X of Y achievements unlocked")` check- // in each it-case is meaningful (page already painted).- const deadline = Date.now() + timeout;- while (Date.now() < deadline) {- if (await textExists('Your Progress')) {- const stillLoading = await textExists('Loading rewards…');- if (!stillLoading) return;- }- await browser.pause(400);- }- throw new Error('[RewardsUnlockE2E] Rewards page did not finish loading snapshot in time');-}--// TODO(#6399): Rewards was retired; remove or replace this desktop suite.-describe.skip('Rewards role-unlock flows', () => {- before(async function beforeSuite() {- if (!supportsExecuteScript()) {- stepLog('Skipping suite on Mac2 — Rewards bottom-tab label not mapped for Appium');- this.skip();- }-- stepLog('starting mock server');- await startMockServer();- stepLog('waiting for app');- await waitForApp();- stepLog('triggering auth bypass deep link');- await triggerAuthDeepLinkBypass('e2e-rewards-unlock');- await waitForWindowVisible(25_000);- await waitForWebView(15_000);- await waitForAppReady(15_000);- await completeOnboardingIfVisible('[RewardsUnlockE2E]');- });-- after(async () => {- stepLog('resetting mock behavior');- resetMockBehavior();- stepLog('stopping mock server');- await stopMockServer();- });-- it('12.1.1 — activity-based unlock surfaces the streak achievement as Unlocked', async () => {- stepLog('priming activity_unlocked scenario');- resetMockBehavior();- setMockBehavior('rewardsScenario', 'activity_unlocked');-- stepLog('navigating to /rewards');- await navigateToRewards();- await waitForText('Your Progress', 15_000);- await waitForRewardsSnapshot();-- // Server-authoritative summary line proves the snapshot reflected the- // activity scenario (1 unlocked of 3 total).- expect(await textExists('1 of 3 achievements unlocked')).toBe(true);-- // Streak achievement title is rendered.- expect(await textExists('7-Day Streak')).toBe(true);-- // The activity-tier card must show its progress label switched to- // "Unlocked" — the snapshot.achievements[STREAK_7].progressLabel is the- // visible signal that the activity threshold flipped. We assert the- // count of "Unlocked" mentions is exactly 1 (one card unlocked) since- // the page also renders "Unlocked" / "Locked" on each achievement- // status pill.- const unlockedCount = await browser.execute(() => {- const all = Array.from(document.querySelectorAll('*'));- return all.filter(el => {- const text = el.textContent?.trim() ?? '';- // Match leaf-text occurrences exactly so we count one per card.- return text === 'Unlocked' && el.children.length === 0;- }).length;- });- stepLog('Unlocked-label leaf count', { unlockedCount });- expect(unlockedCount).toBeGreaterThanOrEqual(1);- });-- it('12.1.2 — integration-based unlock reflects Discord membership in the UI', async () => {- stepLog('priming integration_unlocked scenario');- resetMockBehavior();- setMockBehavior('rewardsScenario', 'integration_unlocked');-- stepLog('navigating to /rewards');- await navigateToRewards();- await waitForText('Your Progress', 15_000);- await waitForRewardsSnapshot();-- // Discord membership badge in the metrics footer (RewardsCommunityTab- // discordMembershipLabel) renders "Joined the server" when- // membershipStatus === 'member'.- expect(await textExists('Joined the server')).toBe(true);-- // The Discord achievement card must be rendered.- expect(await textExists('Discord Member')).toBe(true);-- // Server-authoritative count: 1 of 3.- expect(await textExists('1 of 3 achievements unlocked')).toBe(true);-- // The activity achievement remains locked in this integration-only- // scenario. Its progress element is a stable product test id; asserting- // it avoids coupling this behaviour test to cosmetic card classes.- const streakProgress = await browser.execute(- () =>- document.querySelector('[data-testid="rewards-achievement-progress-STREAK_7"]')?.textContent- );- expect(streakProgress?.trim()).toBe('0 / 7 days');- });-- it('12.1.3 — plan-based unlock surfaces the PRO achievement once plan + active sub are set', async () => {- stepLog('priming plan_unlocked scenario');- resetMockBehavior();- setMockBehavior('rewardsScenario', 'plan_unlocked');-- stepLog('navigating to /rewards');- await navigateToRewards();- await waitForText('Your Progress', 15_000);- await waitForRewardsSnapshot();-- // PRO plan unlocks the Pro Supporter achievement card.- expect(await textExists('Pro Supporter')).toBe(true);-- // Server-authoritative count: 1 of 3.- expect(await textExists('1 of 3 achievements unlocked')).toBe(true);-- // The plan-leg unlock must NOT also flip the integration label — discord- // remains disconnected in this scenario. This rules out a regression where- // the snapshot copy-paste logic accidentally promoted the discord branch.- expect(await textExists('Discord not connected')).toBe(true);- });-});diff --git a/app/test/e2e/specs/skill-activation-persistence.spec.ts b/app/test/e2e/specs/skill-activation-persistence.spec.tsindex 840edd7a11..8019a912cc 100644--- a/app/test/e2e/specs/skill-activation-persistence.spec.ts+++ b/app/test/e2e/specs/skill-activation-persistence.spec.ts@@ -12,8 +12,8 @@* 1. Seed an ACTIVE Composio connection and load the Skills page once so the* durable cache is populated.* 2. Inject a Composio backend fault so any *fresh* fetch would fail.- * 3. Re-mount the page (navigate away + back — the restart-equivalent the- * rewards-persistence spec also uses, since tauri-driver has no cheap real+ * 3. Re-mount the page (navigate away + back — the restart-equivalent this+ * suite uses throughout, since tauri-driver has no cheap real* restart) and assert the activated skill still renders, served from the* cache rather than a successful new fetch.*@@ -55,9 +55,8 @@ const AUTH_TOKEN = 'e2e-skill-activation-persistence-token';/*** Restart-equivalent: navigate away so the Skills page unmounts, then back so- * it re-mounts and re-runs its on-mount fetch — the same approach- * `rewards-progression-persistence.spec.ts` uses in lieu of a real process- * restart (which tauri-driver does not support cheaply).+ * it re-mounts and re-runs its on-mount fetch — stood in for a real process+ * restart, which tauri-driver does not support cheaply.*/async function simulateRestart(): Promise<void> {await navigateViaHash('/home');