From 273247e98d0c52490358d77223937e1e7c3e6f57 Mon Sep 17 00:00:00 2001 From: mawkone Date: Mon, 15 Jun 2026 17:25:40 -0700 Subject: [PATCH] Disable Turbopack in Verification Harness auto-build checks --- vibn-frontend/lib/ai/verification/runners.ts | 33 +++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/vibn-frontend/lib/ai/verification/runners.ts b/vibn-frontend/lib/ai/verification/runners.ts index 6e4ee314..a396bf3d 100644 --- a/vibn-frontend/lib/ai/verification/runners.ts +++ b/vibn-frontend/lib/ai/verification/runners.ts @@ -6,12 +6,7 @@ * injected ToolExecutor, so they are fully unit-testable with mocked outputs. */ -import type { - AcceptanceCheck, - CheckKind, - CheckResult, - ExecCtx, -} from "./types"; +import type { AcceptanceCheck, CheckKind, CheckResult, ExecCtx } from "./types"; // ── helpers ──────────────────────────────────────────────────────────────── @@ -29,7 +24,11 @@ export function redact(s: string): string { } export function clip(s: string, n = 400): string { - const out = redact(String(s ?? "").replace(/\s+/g, " ").trim()); + const out = redact( + String(s ?? "") + .replace(/\s+/g, " ") + .trim(), + ); return out.length > n ? out.slice(0, n) + "…" : out; } @@ -105,11 +104,7 @@ function str(spec: Record, key: string, dflt = ""): string { const v = spec[key]; return typeof v === "string" ? v : dflt; } -function num( - spec: Record, - key: string, - dflt: number, -): number { +function num(spec: Record, key: string, dflt: number): number { const v = spec[key]; return typeof v === "number" ? v : dflt; } @@ -137,7 +132,12 @@ const RUNNERS: Record< (check: AcceptanceCheck, ctx: ExecCtx) => Promise > = { build: (c, ctx) => - runShellExit(c, ctx, str(c.spec, "command", "npm run build"), "build"), + runShellExit( + c, + ctx, + str(c.spec, "command", "npx next build --no-turbopack"), + "build", + ), typecheck: (c, ctx) => runShellExit( @@ -156,7 +156,7 @@ const RUNNERS: Record< server_up: async (c, ctx) => { const raw = await ctx.exec("dev_server_start", { projectId: ctx.projectId, - command: str(c.spec, "command", "npm run dev"), + command: str(c.spec, "command", "npx next dev -H 0.0.0.0 --no-turbopack"), port: num(c.spec, "port", 3000), }); const r = parseToolResult(raw); @@ -183,7 +183,10 @@ const RUNNERS: Record< const codeStr = (r.stdout || r.raw).trim().match(/\d{3}/)?.[0]; if (codeStr && Number(codeStr) === expected) return ok(c, `${url} → ${codeStr}`); - return fail(c, `${url} returned ${codeStr ?? "no response"} (expected ${expected})`); + return fail( + c, + `${url} returned ${codeStr ?? "no response"} (expected ${expected})`, + ); }, console_clean: async (c, ctx) => {