FN-8416: guard engine playwright-core dependency
Protect the engine's lazy feature-video import from undeclared dependency regressions. - Assert playwright-core remains a direct engine dependency. - Assert the feature-video client retains its lazy playwright-core import. Files changed: .../engine/src/review-artifacts/feature-video.test.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) Fusion-Task-Id: FN-8416 Fusion-Task-Lineage: 046e53bb-820c-4b64-90b8-f80f42e6b567 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { mkdtemp, writeFile } from "node:fs/promises";
|
||||
import { mkdtemp, readFile, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
@@ -33,6 +33,22 @@ function store(document: typeof scenario | null = scenario) {
|
||||
}
|
||||
|
||||
describe("generateFeatureVideo", () => {
|
||||
/*
|
||||
FNXC:ReviewArtifacts 2026-07-20-00:00:
|
||||
FN-8416 requires the lazy playwright-core import to remain directly declared by
|
||||
@fusion/engine. pnpm isolation otherwise turns this best-effort capture seam into
|
||||
a TS2307 bootstrap failure before its browser-unavailable fallback can run.
|
||||
*/
|
||||
it("keeps playwright-core directly declared for the lazy feature-video client", async () => {
|
||||
const packageJson = JSON.parse(await readFile(new URL("../../package.json", import.meta.url), "utf8")) as {
|
||||
dependencies?: Record<string, string>;
|
||||
};
|
||||
const source = await readFile(new URL("./feature-video.ts", import.meta.url), "utf8");
|
||||
|
||||
expect(packageJson.dependencies?.["playwright-core"], "FN-8416: missing direct dependency causes TS2307 in engine typecheck").toBeTruthy();
|
||||
expect(source).toContain('import("playwright-core")');
|
||||
});
|
||||
|
||||
it("registers a WebM video linked to its task through the existing registry", async () => {
|
||||
const artifactStore = store();
|
||||
const result = await generateFeatureVideo({ store: artifactStore, task, settings: { reviewArtifacts: "on" }, client: await videoClient(), sleep: async () => undefined });
|
||||
|
||||
Reference in New Issue
Block a user