diff --git a/doc/plans/2026-10-09-speko-pr-qualification.md b/doc/plans/2026-10-09-speko-pr-qualification.md index 326fa577133..4066d2faeaa 100644 --- a/doc/plans/2026-10-09-speko-pr-qualification.md +++ b/doc/plans/2026-10-09-speko-pr-qualification.md @@ -95,3 +95,5 @@ October 13 master reconciliation: all 76 affected Storybook checks passed and na Final October 13 fixture evidence: all 624 Speko Storybook interaction/accessibility checks passed across 156 stories, both themes, 390/1200 widths and reduced motion on UI source 249cbc616a. The subsequent merge adds GitHub server guidance and documentation without changing Speko UI source. Narrow captures were inspected. Report requests now have ten-second abort deadlines, periodic saves cannot build a backlog, and server disk writes remain serialized after an aborted client request. All 21 proof tests passed, including stalled transport followed by a late server write and final evidence preservation. Browser client/server syntax checks passed. Live-call acceptance remains unproven. October 13 merge handoff: UI #15728 merged at 22d05644f4888ff75c344c471524acf993087338 after 55 passing checks and a fresh 5/5 review with no unresolved findings. Its final source b5684d9a42 passed all 152 affected page/launcher Storybook checks across both themes and narrow/desktop widths; the final build contains 157 Speko stories. Qualification is refreshed against merged master. The visual runner preserves both configurable local ports and the upstream external Storybook base URL override. No provider calls or lockfiles were added. + +Hosted Storybook review repair: the Speko request guard permits only the configured Storybook origin, including hosted URLs, and continues to reject unrelated provider requests. A deterministic browser regression serves a synthetic hosted origin without external traffic and verifies navigation/assets succeed while Speko requests are blocked. Hosted-origin isolation and representative local narrow-screen stories pass. Two CI jobs on the prior head were interrupted by runner shutdown signals, without assertion failures; the repair requires fresh current-head CI and review. diff --git a/tests/storybook-visual/speko-voice.spec.ts b/tests/storybook-visual/speko-voice.spec.ts index fcf10dfae6d..f935a97aab6 100644 --- a/tests/storybook-visual/speko-voice.spec.ts +++ b/tests/storybook-visual/speko-voice.spec.ts @@ -1,7 +1,7 @@ import { readFileSync } from "node:fs"; import { createRequire } from "node:module"; import { resolve } from "node:path"; -import { test, expect } from "@playwright/test"; +import { test, expect, type Page } from "@playwright/test"; const require = createRequire(import.meta.url); const root = resolve(import.meta.dirname, "../.."); @@ -9,15 +9,44 @@ const addon = require.resolve("@storybook/addon-a11y/package.json", { paths: [re const axePath = require.resolve("axe-core/axe.min.js", { paths: [addon] }); const index = JSON.parse(readFileSync(resolve(root, "ui/storybook-static/index.json"), "utf8")); const stories = (Object.values(index.entries) as { id: string; type: string }[]).filter((entry) => entry.type === "story" && entry.id.startsWith("connections-speko-")); +async function protectStoryOrigin(page: Page, baseURL: string, external: string[]) { + const storyOrigin = new URL(baseURL).origin; + await page.route(/^https?:\/\//, (route) => { + const url = new URL(route.request().url()); + if (url.origin !== storyOrigin) { + external.push(url.hostname); + return route.abort(); + } + return route.fallback(); + }); +} + +test("Speko network isolation permits hosted Storybook and blocks providers", async ({ page }) => { + const baseURL = "https://storybook.example.invalid"; + const external: string[] = []; + const served: string[] = []; + await page.route(/^https?:\/\//, (route) => { + served.push(route.request().url()); + return route.fulfill({ contentType: "text/html", body: "