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
refactor(e2e): remove redundant settings test from flow script
Steven Enamakela1c945671d84
diff --git a/app/scripts/e2e-run-all-flows.sh b/app/scripts/e2e-run-all-flows.shindex 4e582cd7cd..7bd4714d93 100755--- a/app/scripts/e2e-run-all-flows.sh+++ b/app/scripts/e2e-run-all-flows.sh@@ -397,7 +397,6 @@ if should_run_suite "settings"; thenrun "test/e2e/specs/settings-advanced-config.spec.ts" "settings-advanced" "settings"run "test/e2e/specs/settings-feature-preferences.spec.ts" "settings-features" "settings"run "test/e2e/specs/settings-search.spec.ts" "settings-search" "settings"- run "test/e2e/specs/chip-tabs-keyboard.spec.ts" "chip-tabs-keyboard" "settings"_mini_summary "settings"fidiff --git a/scripts/__tests__/e2e-run-shards.test.mjs b/scripts/__tests__/e2e-run-shards.test.mjsindex a667a1e072..688f9d9172 100644--- a/scripts/__tests__/e2e-run-shards.test.mjs+++ b/scripts/__tests__/e2e-run-shards.test.mjs@@ -19,6 +19,10 @@ test("local Linux E2E shards cover every CI suite", () => {path.join(repoRoot, ".github", "workflows", "e2e-reusable.yml"),"utf8",);+ const flowRunner = fs.readFileSync(+ path.join(repoRoot, "app", "scripts", "e2e-run-all-flows.sh"),+ "utf8",+ );const runnerStart = runner.indexOf("SHARDS=(");const runnerEnd = runner.indexOf("\n)", runnerStart);@@ -41,4 +45,22 @@ test("local Linux E2E shards cover every CI suite", () => {}assert.deepEqual(localShards, ciShards);+ assert.deepEqual(localShards, [+ { name: "foundation", suites: "auth,navigation,system" },+ { name: "chat", suites: "chat,skills,journeys" },+ { name: "connections", suites: "providers,provider-web,connectors" },+ { name: "settings", suites: "settings,notifications" },+ ]);++ const scheduled = Array.from(+ flowRunner.matchAll(/^\s*run "(test\/e2e\/specs\/[^\"]+)"\s+"[^\"]+"\s+"([^\"]+)"/gm),+ ([, spec, suite]) => ({ spec: path.join(repoRoot, "app", spec), suite }),+ );+ assert.ok(scheduled.length > 0);+ assert.equal(new Set(scheduled.map(({ spec }) => spec)).size, scheduled.length, "each native spec is scheduled once");+ for (const { spec } of scheduled) assert.ok(fs.existsSync(spec), `scheduled native spec exists: ${spec}`);+ const suites = new Set(scheduled.map(({ suite }) => suite));+ const assignedSuites = new Set(localShards.flatMap(({ suites: list }) => list.split(",")));+ assert.deepEqual([...suites].sort(), [...assignedSuites].sort());+ assert.ok(localShards.every(({ suites: list }) => list.split(",").some((suite) => suites.has(suite))));});diff --git a/scripts/__tests__/e2e-runner-ownership.test.mjs b/scripts/__tests__/e2e-runner-ownership.test.mjsnew file mode 100644index 0000000000..d81dadc17b--- /dev/null+++ b/scripts/__tests__/e2e-runner-ownership.test.mjs@@ -0,0 +1,40 @@+import assert from "node:assert/strict";+import fs from "node:fs";+import path from "node:path";+import test from "node:test";+import { checkOwnership } from "../ci/check-e2e-runner-ownership.mjs";++const fixtureRoot = fs.mkdtempSync(path.join(process.cwd(), "target", "e2e-ownership-test-"));+const roots = ["app/test/e2e/specs", "app/test/playwright/specs"];++function fixture(native = [], browser = []) {+ fs.rmSync(fixtureRoot, { recursive: true, force: true });+ for (const root of roots) fs.mkdirSync(path.join(fixtureRoot, root), { recursive: true });+ for (const name of native) fs.writeFileSync(path.join(fixtureRoot, roots[0], name), "native");+ for (const name of browser) fs.writeFileSync(path.join(fixtureRoot, roots[1], name), "browser");+}++test("ownership accepts exactly documented mixed pairs and independent files", () => {+ fixture(["smoke.spec.ts", "native-only.spec.ts"], ["smoke.spec.ts", "browser-only.spec.ts"]);+ assert.deepEqual(checkOwnership(fixtureRoot, [{ basename: "smoke.spec.ts", reason: "Distinct host and browser assertions." }]), []);+});++test("ownership rejects an unapproved duplicate basename", () => {+ fixture(["same.spec.ts"], ["same.spec.ts"]);+ assert.ok(checkOwnership(fixtureRoot, []).some((problem) => problem.includes("unapproved cross-runner duplicate same.spec.ts")));+});++test("ownership rejects stale allowlist entries and missing counterparts", () => {+ fixture(["native-only.spec.ts"], []);+ const stale = checkOwnership(fixtureRoot, [{ basename: "gone.spec.ts", reason: "old split" }]);+ assert.ok(stale.some((problem) => problem.includes("allowlisted file must exist")));+ const missing = checkOwnership(fixtureRoot, [{ basename: "native-only.spec.ts", reason: "split" }]);+ assert.ok(missing.some((problem) => problem.includes("allowlisted file must exist")));+});++test("ownership rejects entries without a reason", () => {+ fixture([], []);+ assert.ok(checkOwnership(fixtureRoot, [{ basename: "missing.spec.ts", reason: " " }]).some((problem) => problem.includes("nonempty reason")));+});++test.after(() => fs.rmSync(fixtureRoot, { recursive: true, force: true }));diff --git a/scripts/ci/check-e2e-runner-ownership.mjs b/scripts/ci/check-e2e-runner-ownership.mjsnew file mode 100644index 0000000000..a895e57d93--- /dev/null+++ b/scripts/ci/check-e2e-runner-ownership.mjs@@ -0,0 +1,70 @@+#!/usr/bin/env node+import fs from "node:fs";+import path from "node:path";+import { fileURLToPath } from "node:url";++export const MIXED_RUNNER_EXCEPTIONS = [+ { basename: "smoke.spec.ts", reason: "Native smoke proves a live Wry window and embedded core; Playwright smoke proves standalone browser bootstrap and RPC." },+ { basename: "login-flow.spec.ts", reason: "Native login proves desktop deep-link entry; Playwright login proves browser callback entry." },+ { basename: "auth-access-control.spec.ts", reason: "Native auth proves device reauthentication and expiry events; Playwright auth proves account, billing, logout and revocation UI." },+ { basename: "notifications.spec.ts", reason: "Native notifications prove OS permission and plugin calls; Playwright proves rendered notification content and empty-state UI." },+ { basename: "settings-data-management.spec.ts", reason: "Native reset proves the host reset IPC and embedded-core restart; Playwright proves confirmation and cancellation UI." },+];++const defaultRoots = [+ "app/test/e2e/specs",+ "app/test/playwright/specs",+];++export function checkOwnership(root, exceptions = MIXED_RUNNER_EXCEPTIONS) {+ const problems = [];+ const byName = new Map();+ for (const relativeDir of defaultRoots) {+ const dir = path.join(root, relativeDir);+ if (!fs.existsSync(dir)) {+ problems.push(`spec directory is missing: ${relativeDir}`);+ continue;+ }+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {+ if (!entry.isFile() || !/\.(?:spec\.(?:ts|tsx|js|mjs)|browser\.(?:ts|tsx|js|mjs))$/.test(entry.name)) continue;+ const matches = byName.get(entry.name) ?? [];+ matches.push(relativeDir);+ byName.set(entry.name, matches);+ }+ }++ const allowlist = new Map();+ for (const exception of exceptions) {+ if (!exception?.basename || typeof exception.reason !== "string" || !exception.reason.trim()) {+ problems.push(`allowlist entry must have a basename and nonempty reason: ${JSON.stringify(exception)}`);+ continue;+ }+ if (allowlist.has(exception.basename)) problems.push(`duplicate allowlist entry: ${exception.basename}`);+ allowlist.set(exception.basename, exception.reason);+ const roots = byName.get(exception.basename) ?? [];+ if (roots.length !== defaultRoots.length) {+ problems.push(`allowlisted file must exist in both spec roots: ${exception.basename} (found ${roots.length})`);+ }+ }++ for (const [basename, roots] of byName) {+ if (roots.length > 1 && !allowlist.has(basename)) {+ problems.push(`unapproved cross-runner duplicate ${basename}: ${roots.join(", ")}`);+ }+ if (roots.length === 1 && allowlist.has(basename)) {+ problems.push(`stale allowlist entry: ${basename}`);+ }+ }+ return problems;+}++if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");+ const problems = checkOwnership(root);+ if (problems.length) {+ console.error(problems.map((problem) => `- ${problem}`).join("\n"));+ process.exitCode = 1;+ } else {+ console.log("E2E runner ownership is valid (five documented mixed files).");+ }+}