Files
workinf_Blender_Wasm/tools/web/check-rc-known-limitations.mjs
mes123456 7c16b279ae
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
Advance M7 workflows and release operations
2026-08-15 17:43:53 -04:00

51 lines
2.4 KiB
JavaScript

import assert from "node:assert/strict";
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const limitationsPath = path.join(repoRoot, "docs/web/KNOWN_LIMITATIONS.md");
const limitations = fs.readFileSync(limitationsPath, "utf8");
const notes = fs.readFileSync(path.join(repoRoot, "docs/web/RELEASE_NOTES.md"), "utf8");
const engine = JSON.parse(fs.readFileSync(path.join(repoRoot, "web/app/public/engine-manifest.json"), "utf8"));
assert.ok(notes.includes("[Known limitations](KNOWN_LIMITATIONS.md)"), "release notes do not link known limitations");
for (const variant of engine.variants) {
assert.equal(variant.memory.initialPages, 256);
assert.equal(variant.memory.maximumPages, 32_768);
}
for (const required of [
"Chromium is the only V1 browser baseline",
"crossOriginIsolated",
"SharedArrayBuffer",
"PTHREAD_REQUIRED",
"SINGLE_REQUIRED",
"ENGINE_VARIANT_INTEGRITY_FAILED",
"REFRESH_REQUIRED",
"256 initial WebAssembly pages (16 MiB)",
"32,768-page ceiling (2 GiB)",
"bound to the exact scheme, host and port",
"reserves no minimum capacity",
"64 MiB",
"16,384 pixels per dimension",
"256 requested",
"VDB input is bounded to 512 MiB",
"NanoVDB bundle to 1 GiB",
"residency to at most 512 MiB",
"Automatic viewport page-fault feedback",
]) {
assert.ok(limitations.includes(required), `known limitations omit: ${required}`);
}
const renderAssets = fs.readFileSync(path.join(repoRoot, "web/protocol/render-assets.ts"), "utf8");
assert.match(renderAssets, /MAX_GPU_TEXTURE_BYTES = 64 \* 1024 \* 1024/);
assert.match(renderAssets, /MAX_GPU_TEXTURE_DIMENSION = 16_384/);
assert.match(renderAssets, /MAX_GPU_TEXTURE_ASSETS = 256/);
const volume = fs.readFileSync(path.join(repoRoot, "web/protocol/volume-vdb.ts"), "utf8");
assert.match(volume, /VDB_MAX_RESOURCE_BYTES = 512 \* 1024 \* 1024/);
assert.match(volume, /NANOVDB_MAX_BUNDLE_BYTES = 1024 \* 1024 \* 1024/);
assert.match(volume, /NANOVDB_MAX_GPU_RESIDENT_BYTES = 512 \* 1024 \* 1024/);
for (const link of ["V1_SCOPE.md", "parity-ledger.json", "DEPLOYMENT.md", "operations-diagnostics.json"]) {
assert.ok(limitations.includes(`](${link})`), `known limitations omit link: ${link}`);
}
process.stdout.write(`rc-known-limitations-ok variants=${engine.variants.length} wasmMaximumPages=${engine.variants[0].memory.maximumPages}\n`);