build(foundry): harden map release artifacts
This commit is contained in:
@@ -13,7 +13,7 @@ const foundryRoot = resolve(workspaceRoot, "NODEDC_DESIGN_GUIDELINE");
|
||||
const artifactDir = resolve(
|
||||
process.env.NODEDC_DEPLOY_ARTIFACT_DIR || resolve(scriptDir, "../deploy-artifacts"),
|
||||
);
|
||||
const [patchId = "module-foundry-map-grid-lod-20260805-001", ...extra] =
|
||||
const [patchId = "module-foundry-map-grid-lod-20260805-002", ...extra] =
|
||||
process.argv.slice(2);
|
||||
|
||||
if (extra.length || !/^module-foundry-map-grid-lod-\d{8}-\d{3}$/.test(patchId)) {
|
||||
@@ -28,9 +28,10 @@ const files = Object.freeze([
|
||||
"apps/catalog/src/MapFixturePreview.tsx",
|
||||
"apps/catalog/src/mapGridPolicy.d.mts",
|
||||
"apps/catalog/src/mapGridPolicy.mjs",
|
||||
"package.json",
|
||||
"apps/catalog/src/styles.css",
|
||||
"runtime-seed/page-layouts/map.json",
|
||||
"scripts/map-grid-lod.test.mjs",
|
||||
"scripts/map-object-layers.test.mjs",
|
||||
"server/catalog-server.mjs",
|
||||
"server/foundry-mcp.mjs",
|
||||
]);
|
||||
@@ -69,7 +70,7 @@ try {
|
||||
checksum,
|
||||
sha256,
|
||||
services: ["nodedc-module-foundry"],
|
||||
transition: "five-band-grid-lod-with-seamless-layer-swap",
|
||||
transition: "five-lod-mmap-parity-fast-grid-and-focus-recovery",
|
||||
files,
|
||||
}, null, 2));
|
||||
} finally {
|
||||
@@ -80,31 +81,40 @@ async function assertGridLodBoundary() {
|
||||
const policy = await readFile(join(foundryRoot, "apps/catalog/src/mapGridPolicy.mjs"), "utf8");
|
||||
const renderer = await readFile(join(foundryRoot, "apps/catalog/src/CesiumMapRenderer.tsx"), "utf8");
|
||||
const inspector = await readFile(join(foundryRoot, "apps/catalog/src/MapFixturePreview.tsx"), "utf8");
|
||||
const styles = await readFile(join(foundryRoot, "apps/catalog/src/styles.css"), "utf8");
|
||||
const server = await readFile(join(foundryRoot, "server/catalog-server.mjs"), "utf8");
|
||||
const tests = await readFile(join(foundryRoot, "scripts/map-grid-lod.test.mjs"), "utf8");
|
||||
const focusTests = await readFile(join(foundryRoot, "scripts/map-object-layers.test.mjs"), "utf8");
|
||||
|
||||
for (const marker of ["gridLod1MaxHeightKm", "gridLod5StepKm", "GRID_LOD_HYSTERESIS_RATIO"]) {
|
||||
for (const marker of ["gridLodProfile", "gridLodProfiles", "GRID_LOD_HYSTERESIS_RATIO"]) {
|
||||
if (!policy.includes(marker)) throw new Error(`grid_policy_marker_missing:${marker}`);
|
||||
}
|
||||
for (const marker of ["class GridLayerController", "corridor:", "gridLineDiameterMeters"]) {
|
||||
for (const marker of ["class GridLayerController", "gridLegacyMode", "lineDiameterMeters", "viewer.flyTo(entity"]) {
|
||||
if (!renderer.includes(marker)) throw new Error(`grid_renderer_marker_missing:${marker}`);
|
||||
}
|
||||
if (/function rebuildElevatedGrid[\s\S]*?entities\.removeAll\(\)/.test(renderer)) {
|
||||
throw new Error("grid_renderer_destructive_layer_swap_detected");
|
||||
}
|
||||
for (const marker of ["LOD 5: режим", "3D-линии: диаметр", "Гратикула: толщина"]) {
|
||||
for (const marker of ["LOD ${index + 1}", "Конус видимости 3D", "Размер major-тайла ENU", "Радиус ENU-поля", "Диаметр 3D-линий", "Кружки: диаметр", "Кресты: длина"]) {
|
||||
if (!inspector.includes(marker)) throw new Error(`grid_inspector_marker_missing:${marker}`);
|
||||
}
|
||||
for (const marker of ["gridLod5Mode", "gridLineDiameterMeters", "gridRebuildOnMoveEnd"]) {
|
||||
for (const marker of ["catalog-map-grid-lod-tabs", "flex: 1 1 0"]) {
|
||||
if (!styles.includes(marker)) throw new Error(`grid_styles_marker_missing:${marker}`);
|
||||
}
|
||||
for (const marker of ["gridLodProfiles", "validateGridLodProfiles", "gridRebuildOnMoveEnd"]) {
|
||||
if (!server.includes(marker)) throw new Error(`grid_server_contract_missing:${marker}`);
|
||||
}
|
||||
for (const marker of [
|
||||
"five grid LODs preserve the close 3D and distant graticule contract",
|
||||
"LOD hysteresis holds the previous band around a threshold",
|
||||
"renderer swaps double-buffered data sources and never clears the live grid first",
|
||||
"canonical defaults preserve the exact effective MMAP/MOSCOWMAP five-LOD donor profile",
|
||||
"every LOD owns independent metric and angular spacing and visual fields",
|
||||
"LOD hysteresis holds the previous band for eight percent on either side of a threshold",
|
||||
"renderer uses fixed ENU sectors, angular graticules and a non-blank double-buffer swap",
|
||||
]) {
|
||||
if (!tests.includes(marker)) throw new Error(`grid_regression_missing:${marker}`);
|
||||
}
|
||||
for (const marker of ["void viewer\\.flyTo\\(entity", "HeadingPitchRange\\(0, -0\\.9, 8_000\\)"]) {
|
||||
if (!focusTests.includes(marker)) throw new Error(`map_focus_regression_missing:${marker}`);
|
||||
}
|
||||
}
|
||||
|
||||
async function assertFresh(path) {
|
||||
|
||||
Reference in New Issue
Block a user