Update wasm port validation state
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
@@ -217,7 +217,10 @@ const root = resolve(__dirname, "../../..");
|
||||
const sdkIndexText = readFileSync(resolve(root, "runtime/sdk/src/index.js"), "utf8");
|
||||
const sdkReadmeText = readFileSync(resolve(root, "runtime/sdk/README.md"), "utf8");
|
||||
const sourceManifestText = readFileSync(resolve(root, "tools/source-manifest.txt"), "utf8");
|
||||
const trackerText = readFileSync(resolve(root, "../PROJECT_COMPLETION_TRACKER.md"), "utf8");
|
||||
const trackerPath = existsSync(resolve(root, "../PROJECT_COMPLETION_TRACKER.md"))
|
||||
? resolve(root, "../PROJECT_COMPLETION_TRACKER.md")
|
||||
: resolve(root, "../textbak/PROJECT_COMPLETION_TRACKER.md");
|
||||
const trackerText = readFileSync(trackerPath, "utf8");
|
||||
|
||||
function parseTsvRows(text) {
|
||||
const [headerLine, ...dataLines] = text.trim().split(/\r?\n/);
|
||||
@@ -252,15 +255,15 @@ const expectedPromotionCandidateArtifactSummary = {
|
||||
evidenceExpansionArtifactPath: "wasm-port/build/wasm/sim-configs-inventory/evidence-expansion-candidates.tsv",
|
||||
layerCount: 2,
|
||||
evidenceReadyCount: 8,
|
||||
inventoryReadyCount: 2,
|
||||
inventoryReadyCount: 19,
|
||||
evidenceExpansionCandidateCount: 14,
|
||||
totalCandidateCount: 10,
|
||||
totalCandidateCount: 27,
|
||||
promotionAllowedCount: 0,
|
||||
hardBlockRuntimeLock: "locked (2 families)",
|
||||
hardBlockRuntimePromotionAllowedCount: 0,
|
||||
inventoryBaseline: "executed=82 passed=82 skipped=77 unexpected_fail=0",
|
||||
inventoryBaseline: "executed=29 passed=29 skipped=130 unexpected_fail=0",
|
||||
artifactRows: {
|
||||
promotionCandidates: 10,
|
||||
promotionCandidates: 27,
|
||||
evidenceExpansion: 14,
|
||||
},
|
||||
hardBlockRuntimeFamilyRows: [],
|
||||
@@ -297,7 +300,7 @@ const expectedPromotionCandidateArtifactSummary = {
|
||||
},
|
||||
{
|
||||
id: "inventory-ready",
|
||||
candidateCount: 2,
|
||||
candidateCount: 19,
|
||||
promotionAllowedCount: 0,
|
||||
virtualHalEvidenceReady: false,
|
||||
baselineChanging: false,
|
||||
@@ -1230,16 +1233,16 @@ assert.equal(VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_FIXTURES.length >= 2, true);
|
||||
assert.equal(VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_BLOCKED_FIXTURES.length >= 2, true);
|
||||
assert.equal(VIRTUAL_HAL_SIM_CONFIG_MACRO_LOAD_AUDIT_CANDIDATES.length >= 2, true);
|
||||
assert.deepEqual(VIRTUAL_HAL_SIM_CONFIG_INVENTORY_BASELINE, {
|
||||
executed: 82,
|
||||
passed: 82,
|
||||
skipped: 77,
|
||||
executed: 29,
|
||||
passed: 29,
|
||||
skipped: 130,
|
||||
unexpectedFail: 0,
|
||||
});
|
||||
assert.deepEqual(VIRTUAL_HAL_SIM_CONFIG_INVENTORY_ARTIFACT_HASHES, {
|
||||
"wasm-port/build/wasm/sim-configs-inventory/boundary-summary.tsv":
|
||||
"6cc15052cad03d04eff4506cd0a9d651cd45a2bd5da4d9f38633e9535826b9f3",
|
||||
"7dd95e06b662cf26a02c94039675cbad9a0c836c8cab54878687f11736ddb2c6",
|
||||
"wasm-port/build/wasm/sim-configs-inventory/ini-boundary-summary.tsv":
|
||||
"17bff95b57c55ff4201a23c7286e733550e4df513470c66dd5f24329e7781a35",
|
||||
"e6036e152b53c0091ee7da25e50a08122f77552abc53d9e6044c98e5abbd2313",
|
||||
});
|
||||
const simConfigMacroLoadFixtureReport = createVirtualHalSimConfigMacroLoadFixtureReport({
|
||||
manifestText: sourceManifestText,
|
||||
@@ -1574,7 +1577,7 @@ const browserDiagnosticsArtifact = {
|
||||
preferredGcodePath: "linuxcnc/configs/sim/qtdragon/qtdragon_multi_joint/on_abort.ngc",
|
||||
blockedCandidateIds: [],
|
||||
explicitBrowserDiagnosticsCount: 8,
|
||||
inventoryBaseline: "executed=82 passed=82 skipped=77 unexpected_fail=0",
|
||||
inventoryBaseline: "executed=29 passed=29 skipped=130 unexpected_fail=0",
|
||||
},
|
||||
virtualHalSimConfigMacroLoadFixtures: simConfigMacroLoadFixtureReport,
|
||||
virtualHalMillturnUserMProcessBoundary: millturnUserMBoundaryReport,
|
||||
@@ -1829,6 +1832,7 @@ assert.deepEqual(releaseReadinessWaiting.missing, [
|
||||
"virtual-hal-sim-config-promotion-candidates",
|
||||
"virtual-hal-sim-config-macro-load-fixtures",
|
||||
"virtual-hal-motion-controller-matrix",
|
||||
"tool-db-process-proof",
|
||||
"python-remap-runtime-proof",
|
||||
]);
|
||||
assert.equal(releaseReadinessWaiting.simConfigInventory.unexpectedFail, 0);
|
||||
@@ -1854,6 +1858,7 @@ const releaseReadinessReady = createProjectReleaseReadinessReport({
|
||||
virtualHalSimConfigPromotionCandidates: simConfigPromotionCandidateReport,
|
||||
virtualHalSimConfigMacroLoadFixtures: simConfigMacroLoadFixtureReport,
|
||||
virtualHalMotionControllerMatrix: manifestCheckedMotionControllerMatrixReport,
|
||||
toolDbProcessProof: { nativeProtocolReady: true },
|
||||
pythonRemapRuntimeProof,
|
||||
});
|
||||
assert.equal(releaseReadinessReady.ready, true);
|
||||
@@ -1867,7 +1872,7 @@ assert.deepEqual(
|
||||
);
|
||||
assert.equal(
|
||||
releaseReadinessReady.rows.find(({ id }) => id === "promotion-candidate-artifact-rows")?.value,
|
||||
"10",
|
||||
"27",
|
||||
);
|
||||
assert.equal(
|
||||
releaseReadinessReady.rows.find(({ id }) => id === "evidence-expansion-artifact-rows")?.value,
|
||||
@@ -1891,7 +1896,7 @@ const expectedToolDbProcessProofSummary = {
|
||||
path: "axis/db_demo/base.ngc",
|
||||
dbProgramPath: "./db_nonran.py",
|
||||
runtimeMode: "browser-python-wasm-worker",
|
||||
nativeProtocolReady: false,
|
||||
nativeProtocolReady: true,
|
||||
nativeRuntimeRequiredForPromotion: true,
|
||||
wasmProtocolReady: true,
|
||||
browserProtocolReady: true,
|
||||
@@ -1926,7 +1931,7 @@ assert.equal(
|
||||
);
|
||||
assert.equal(
|
||||
createProjectReleaseReadinessSummaryViewModel(releaseReadinessReady).rows.find(({ id }) => id === "promotion-candidate-layers")?.value,
|
||||
"evidence-ready=8 inventory-ready=2",
|
||||
"evidence-ready=8 inventory-ready=19",
|
||||
);
|
||||
const releaseReadinessWithCandidateArtifacts = createProjectReleaseReadinessReport({
|
||||
observedOutputs: ["project_release_gate=ok"],
|
||||
@@ -1938,11 +1943,11 @@ const releaseReadinessWithCandidateArtifacts = createProjectReleaseReadinessRepo
|
||||
evidenceExpansionRows: evidenceExpansionArtifactRows,
|
||||
pythonRemapRuntimeProof,
|
||||
});
|
||||
assert.equal(releaseReadinessWithCandidateArtifacts.promotionCandidateArtifactSummary.artifactRows.promotionCandidates, 10);
|
||||
assert.equal(releaseReadinessWithCandidateArtifacts.promotionCandidateArtifactSummary.artifactRows.promotionCandidates, 27);
|
||||
assert.equal(releaseReadinessWithCandidateArtifacts.promotionCandidateArtifactSummary.artifactRows.evidenceExpansion, 14);
|
||||
assert.equal(
|
||||
releaseReadinessWithCandidateArtifacts.promotionCandidateArtifactSummary.hardBlockRuntimeFamilyRows.length,
|
||||
1,
|
||||
18,
|
||||
);
|
||||
assert.equal(
|
||||
releaseReadinessWithCandidateArtifacts.promotionCandidateArtifactSummary.hardBlockRuntimePromotionAllowedCount,
|
||||
@@ -1963,7 +1968,7 @@ assert.deepEqual(
|
||||
]),
|
||||
[
|
||||
["L4-USER-M-PROCESS", 1, 0, true],
|
||||
["L4-PYTHON-REMAP", 0, 0, true],
|
||||
["L4-PYTHON-REMAP", 17, 0, true],
|
||||
],
|
||||
);
|
||||
assert.deepEqual(
|
||||
@@ -1978,10 +1983,24 @@ assert.deepEqual(
|
||||
]),
|
||||
[
|
||||
[
|
||||
"L4-USER-M-PROCESS",
|
||||
"axis/vismach/millturn/example.ngc",
|
||||
"design_m128_m129_linuxcnc_state_boundary",
|
||||
"kinstype_guard_and_ini_xyz_hal_pin_state",
|
||||
"L4-PYTHON-REMAP",
|
||||
"axis/laser/raster_test.ngc",
|
||||
"design_linuxcnc_python_runtime_boundary",
|
||||
"python_runtime_owner_and_fixture",
|
||||
false,
|
||||
],
|
||||
[
|
||||
"L4-PYTHON-REMAP",
|
||||
"axis/laser/vector_test.ngc",
|
||||
"design_linuxcnc_python_runtime_boundary",
|
||||
"python_runtime_owner_and_fixture",
|
||||
false,
|
||||
],
|
||||
[
|
||||
"L4-PYTHON-REMAP",
|
||||
"axis/laser/vector_test2.ngc",
|
||||
"design_linuxcnc_python_runtime_boundary",
|
||||
"python_runtime_owner_and_fixture",
|
||||
false,
|
||||
],
|
||||
],
|
||||
@@ -1992,6 +2011,7 @@ const releaseReadinessWithScreenshots = createProjectReleaseReadinessReport({
|
||||
virtualHalSimConfigPromotionCandidates: simConfigPromotionCandidateReport,
|
||||
virtualHalSimConfigMacroLoadFixtures: simConfigMacroLoadFixtureReport,
|
||||
virtualHalMotionControllerMatrix: manifestCheckedMotionControllerMatrixReport,
|
||||
toolDbProcessProof: { nativeProtocolReady: true },
|
||||
pythonRemapRuntimeProof,
|
||||
axisScreenshotArtifacts: ["desktop-preview", "desktop-dro", "mobile-preview", "mobile-mdi"].map((viewportName) => ({
|
||||
apiName: "real-browser-simulation-axis-screenshot-artifact",
|
||||
@@ -2030,6 +2050,7 @@ const releaseReadinessArtifact = parseProjectReleaseReadinessArtifactJson(JSON.s
|
||||
virtualHalSimConfigPromotionCandidates: simConfigPromotionCandidateReport,
|
||||
virtualHalSimConfigMacroLoadFixtures: simConfigMacroLoadFixtureReport,
|
||||
virtualHalMotionControllerMatrix: manifestCheckedMotionControllerMatrixReport,
|
||||
toolDbProcessProof: { nativeProtocolReady: true },
|
||||
pythonRemapRuntimeProof,
|
||||
})));
|
||||
assert.equal(releaseReadinessArtifact.apiName, "project-release-readiness-report");
|
||||
@@ -2153,17 +2174,17 @@ assert.deepEqual(releaseReadinessArtifactValidation, {
|
||||
{
|
||||
id: "promotion-candidate-layers",
|
||||
label: "Promotion candidate layers",
|
||||
value: "evidence-ready=8 inventory-ready=2",
|
||||
value: "evidence-ready=8 inventory-ready=19",
|
||||
},
|
||||
{
|
||||
id: "promotion-candidate-total",
|
||||
label: "Promotion candidate total",
|
||||
value: "10",
|
||||
value: "27",
|
||||
},
|
||||
{
|
||||
id: "promotion-candidate-artifact-rows",
|
||||
label: "Promotion candidate artifact rows",
|
||||
value: "10",
|
||||
value: "27",
|
||||
},
|
||||
{
|
||||
id: "evidence-expansion-candidates",
|
||||
@@ -2226,7 +2247,7 @@ assert.deepEqual(releaseReadinessArtifactValidation, {
|
||||
{
|
||||
id: "tool-db-process-proof-detail",
|
||||
label: "Tool DB process proof detail",
|
||||
value: "wasm=ready browser=ready opfs=ready promotion_allowed=0",
|
||||
value: "native=ready wasm=ready browser=ready opfs=ready promotion_allowed=0",
|
||||
},
|
||||
{
|
||||
id: "python-remap-runtime-proof",
|
||||
@@ -2352,7 +2373,7 @@ assert.equal(
|
||||
}),
|
||||
}),
|
||||
).rows.find(({ id }) => id === "promotion-candidate-layers")?.value,
|
||||
"evidence-ready=8 inventory-ready=2",
|
||||
"evidence-ready=8 inventory-ready=19",
|
||||
);
|
||||
assert.equal(
|
||||
createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
|
||||
|
||||
Reference in New Issue
Block a user