Disable Turbopack in Verification Harness auto-build checks

This commit is contained in:
2026-06-15 17:25:40 -07:00
parent e88a566609
commit 273247e98d

View File

@@ -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<string, unknown>, key: string, dflt = ""): string {
const v = spec[key];
return typeof v === "string" ? v : dflt;
}
function num(
spec: Record<string, unknown>,
key: string,
dflt: number,
): number {
function num(spec: Record<string, unknown>, 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<CheckResult>
> = {
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) => {