This commit is contained in:
parent
1a13b9d58c
commit
c6479d6811
1 changed files with 6 additions and 8 deletions
|
|
@ -71,9 +71,7 @@ const events = (schedule.events as Array<Record<string, unknown>>).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`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue