Files
workinf_Blender_Wasm/web/playwright.clip.config.ts
mes123456 11a69f6354
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
feat(web): bind Clip acceptance receipts to a frozen candidate
run-clip-headed.mjs --freeze hardlink-snapshots the served source tree into
web/.frozen/CLIP-<stamp>-<wasm8> with a sha256 manifest; --candidate refuses a
tree that does not verify, and the Playwright config serves the frozen root.
Receipts record servedBy, servedRoot, frozenAt and the manifest sha256, and
check-clip-headed.mjs re-verifies them against disk.

The full suite passes 28/28 on the frozen candidate
(tests/golden/CLIP-HEADED-20261204-155221, wasm 3c81eb06, manifest 695b50c0);
release acceptance stays NOT_CLAIMED.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-04 16:09:13 +08:00

23 lines
1.7 KiB
TypeScript

import path from "node:path";
import { fileURLToPath } from "node:url";
import base from './playwright.config';
/* Clip suite: MovieClip engine read, frame decode, missing source and
* save/reopen, demonstrated on the upstream tripod-motion tracking fixture.
* The specs instantiate WebEngineClient directly, so they run against the Vite
* dev server (same convention as tracking-mask-production) rather than a built
* bundle where `/src/...` module URLs do not exist. CLIP_SERVED_ROOT points the
* server at a frozen snapshot (run-clip-headed.mjs --freeze); without it the
* live web/app tree is served. */
const port = Number(process.env.WEB_TEST_PORT ?? 5314);
const jsonOutput = process.env.PLAYWRIGHT_JSON_OUTPUT_FILE;
const servedRoot = process.env.CLIP_SERVED_ROOT;
const viteBin = path.join(path.dirname(fileURLToPath(import.meta.url)), "node_modules/vite/bin/vite.js");
export default { ...base, testMatch: ['clip-*-production.spec.ts'], timeout: 420_000,
...(jsonOutput ? { reporter: [...(Array.isArray(base.reporter) ? base.reporter : []), ['json', { outputFile: jsonOutput }] as const] } : {}),
use: { ...base.use, baseURL: `http://127.0.0.1:${port}`, viewport: { width: 1440, height: 900 },
headless: process.env.WEB_TEST_HEADLESS === '1' ? true : base.use?.headless },
webServer: servedRoot
? { command: `node "${viteBin}" --config app/vite.config.ts --host 127.0.0.1 --port ${port} --strictPort`, cwd: servedRoot, url: `http://127.0.0.1:${port}`, reuseExistingServer: false, timeout: 30_000 }
: { command: `npm run dev -- --host 127.0.0.1 --port ${port} --strictPort`, url: `http://127.0.0.1:${port}`, reuseExistingServer: false, timeout: 30_000 },
};