From c6479d6811b82b16db3eabf35b5842689332bdf0 Mon Sep 17 00:00:00 2001 From: Lumen Stage1 Date: Wed, 30 Sep 2026 14:40:24 -0500 Subject: [PATCH] Stage 6: prettier format run.ts --- pipeline/run.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pipeline/run.ts b/pipeline/run.ts index 3e0675a..4b3e3f9 100644 --- a/pipeline/run.ts +++ b/pipeline/run.ts @@ -71,9 +71,7 @@ const events = (schedule.events as Array>).map((ev) => ( function placeholderPng(id: string): Uint8Array { // 1x1 PNG-ish deterministic payload; hash/size budgets are what matter here. const marker = new TextEncoder().encode(`lumen-placeholder:${id}`); - const pngHeader = new Uint8Array([ - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, ...marker, - ]); + const pngHeader = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, ...marker]); return pngHeader; } const mapLevelIds = ( @@ -207,7 +205,10 @@ const pkg = built.pkg; const totalBytes = [...pkg.files.values()].reduce((s, f) => s + f.bytes, 0) + pkg.assets.reduce((s, a) => s + a.bytes, 0); -log("validate/build/hash", `ok — ${pkg.files.size} sections + ${pkg.assets.length} assets, ${String(totalBytes)} bytes (budget ≤40MB: ${totalBytes <= 40 * 1024 * 1024 ? "PASS" : "FAIL"})`); +log( + "validate/build/hash", + `ok — ${pkg.files.size} sections + ${pkg.assets.length} assets, ${String(totalBytes)} bytes (budget ≤40MB: ${totalBytes <= 40 * 1024 * 1024 ? "PASS" : "FAIL"})`, +); if (pkg.floorBytes > 16 * 1024) die(`emergency floor ${String(pkg.floorBytes)} > 16KB`); log("floor", `emergency floor compiled: ${String(pkg.floorBytes)} bytes (≤16KB)`); if (!pkg.signature) die("expected signature with test key"); @@ -228,10 +229,7 @@ writeFileSync(join(pkgDir, "signature.json"), JSON.stringify(pkg.signature, null // can re-verify offline. Production trust pins the key inside the app shell // (Stage 7 verifier) — never rely on a key published alongside the data. writeFileSync(join(pkgDir, "publicKey.pem"), kp.publicKeyPem); -writeFileSync( - join(pkgDir, "emergency-floor.json"), - JSON.stringify(pkg.emergencyFloor, null, 2), -); +writeFileSync(join(pkgDir, "emergency-floor.json"), JSON.stringify(pkg.emergencyFloor, null, 2)); // Mutable pointer — last write, so immutable files always exist before flip. writeFileSync(join(outDir, "latest.json"), JSON.stringify(pkg.latest, null, 2)); log("upload", `wrote immutable tree under ${pkgDir}/ + latest.json flip`);