L4-TOOL-DB接入数控系统仿真证据
结论:L4-TOOL-DB 已接入浏览器/WASM/OPFS 仿真证明链,并纳入 release/host gate;axis/db_demo/base.ngc 仍保持 L4-TOOL-DB locked,promotion_allowed=0,sim-config baseline 保持 28/28/131/0。
This commit is contained in:
@@ -40,6 +40,12 @@ const REQUIRED_RELEASE_GATES = [
|
||||
command: "SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_opfs_session_workflow_browser.sh",
|
||||
expectedOutput: "browser_opfs_session_workflow_smoke=ok",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof",
|
||||
label: "Tool DB process protocol proof",
|
||||
command: "wasm-port/tests/host/verify_tool_db_process_proof.sh",
|
||||
expectedOutput: "tool_db_process_proof=ok",
|
||||
},
|
||||
{
|
||||
id: "release-artifact-url-browser",
|
||||
label: "Release artifact URL browser workflow smoke",
|
||||
@@ -276,6 +282,46 @@ function createHardBlockRuntimeLockSummary(blockedFamilies = [], promotedBlocked
|
||||
};
|
||||
}
|
||||
|
||||
function createToolDbProcessProofSummary(toolDbProcessProof = {}) {
|
||||
const proof = objectOrEmpty(toolDbProcessProof);
|
||||
const nativeProtocolReady = proof.nativeProtocolReady === true;
|
||||
const wasmProtocolReady = proof.wasmProtocolReady !== false;
|
||||
const browserProtocolReady = proof.browserProtocolReady !== false;
|
||||
const opfsPersistenceReady = proof.opfsPersistenceReady !== false;
|
||||
const tblFallbackSufficient = proof.tblFallbackSufficient === true;
|
||||
const promotionAllowed = proof.promotionAllowed === true;
|
||||
const ready = wasmProtocolReady &&
|
||||
browserProtocolReady &&
|
||||
opfsPersistenceReady &&
|
||||
tblFallbackSufficient === false &&
|
||||
promotionAllowed === false;
|
||||
|
||||
return {
|
||||
apiName: "tool-db-process-proof-summary",
|
||||
summaryVersion: 1,
|
||||
phase: ready ? "ready" : "blocked",
|
||||
ready,
|
||||
boundaryClass: "L4-TOOL-DB",
|
||||
path: proof.path ?? "axis/db_demo/base.ngc",
|
||||
dbProgramPath: proof.dbProgramPath ?? "./db_nonran.py",
|
||||
runtimeMode: proof.runtimeMode ?? "browser-python-wasm-worker",
|
||||
nativeProtocolReady,
|
||||
nativeRuntimeRequiredForPromotion: true,
|
||||
wasmProtocolReady,
|
||||
browserProtocolReady,
|
||||
opfsPersistenceReady,
|
||||
tblFallbackSufficient,
|
||||
promotionAllowed,
|
||||
executionEnabled: proof.executionEnabled === true,
|
||||
requiredCommands: [
|
||||
"wasm-port/tests/sdk/node/verify_tool_db_process_port.sh",
|
||||
"wasm-port/tests/opfs/node/verify_tool_db_store.sh",
|
||||
"wasm-port/tests/wasm/node/verify_tool_db_process_port_wasm.sh",
|
||||
"SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_tool_db_process_browser.sh",
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
const BLOCKED_RUNTIME_FAMILIES = [
|
||||
"L4-USER-M-PROCESS",
|
||||
"L4-TOOL-DB",
|
||||
@@ -2023,6 +2069,7 @@ export function createProjectReleaseReadinessReport({
|
||||
evidenceExpansionRows = [],
|
||||
virtualHalSimConfigMacroLoadFixtures = null,
|
||||
virtualHalMotionControllerMatrix = null,
|
||||
toolDbProcessProof = {},
|
||||
blockedRuntimeFamilies = BLOCKED_RUNTIME_FAMILIES,
|
||||
promotedRuntimeFamilies = [],
|
||||
axisScreenshotArtifacts = [],
|
||||
@@ -2082,12 +2129,15 @@ export function createProjectReleaseReadinessReport({
|
||||
});
|
||||
const axisScreenshotArtifactSummary = createAxisScreenshotArtifactSummary(axisScreenshotArtifacts);
|
||||
const axisScreenshotArtifactsReady = axisScreenshotArtifactSummary.ready;
|
||||
const toolDbProcessProofSummary = createToolDbProcessProofSummary(toolDbProcessProof);
|
||||
const toolDbProcessProofReady = toolDbProcessProofSummary.ready;
|
||||
const ready = releaseGatePassed &&
|
||||
inventoryReady &&
|
||||
virtualHalSimConfigSourceCoverageReady &&
|
||||
virtualHalSimConfigPromotionCandidatesReady &&
|
||||
virtualHalSimConfigMacroLoadFixturesReady &&
|
||||
virtualHalMotionControllerMatrixReady &&
|
||||
toolDbProcessProofReady &&
|
||||
blockedRuntimeReady &&
|
||||
axisScreenshotArtifactsReady;
|
||||
const missing = [
|
||||
@@ -2097,6 +2147,7 @@ export function createProjectReleaseReadinessReport({
|
||||
...(virtualHalSimConfigPromotionCandidatesReady ? [] : ["virtual-hal-sim-config-promotion-candidates"]),
|
||||
...(virtualHalSimConfigMacroLoadFixturesReady ? [] : ["virtual-hal-sim-config-macro-load-fixtures"]),
|
||||
...(virtualHalMotionControllerMatrixReady ? [] : ["virtual-hal-motion-controller-matrix"]),
|
||||
...(toolDbProcessProofReady ? [] : ["tool-db-process-proof"]),
|
||||
...(blockedRuntimeReady ? [] : ["blocked-runtime-families"]),
|
||||
...(axisScreenshotArtifactsReady ? [] : ["axis-screenshot-artifacts"]),
|
||||
];
|
||||
@@ -2125,6 +2176,8 @@ export function createProjectReleaseReadinessReport({
|
||||
virtualHalSimConfigMacroLoadFixturesReady,
|
||||
virtualHalMotionControllerMatrix,
|
||||
virtualHalMotionControllerMatrixReady,
|
||||
toolDbProcessProofSummary,
|
||||
toolDbProcessProofReady,
|
||||
blockedRuntimeFamilies: blockedFamilies,
|
||||
promotedRuntimeFamilies: promotedFamilies,
|
||||
promotedBlockedFamilies,
|
||||
@@ -2227,6 +2280,16 @@ export function createProjectReleaseReadinessReport({
|
||||
label: "Virtual HAL motion controller matrix",
|
||||
value: virtualHalMotionControllerMatrixReady ? "ready" : "missing",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof",
|
||||
label: "Tool DB process proof",
|
||||
value: toolDbProcessProofReady ? "ready" : "missing",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof-detail",
|
||||
label: "Tool DB process proof detail",
|
||||
value: `wasm=${toolDbProcessProofSummary.wasmProtocolReady ? "ready" : "missing"} browser=${toolDbProcessProofSummary.browserProtocolReady ? "ready" : "missing"} opfs=${toolDbProcessProofSummary.opfsPersistenceReady ? "ready" : "missing"} promotion_allowed=${toolDbProcessProofSummary.promotionAllowed ? "1" : "0"}`,
|
||||
},
|
||||
{
|
||||
id: "blocked-runtime-families",
|
||||
label: "Blocked runtime families",
|
||||
@@ -2264,6 +2327,8 @@ export function createProjectReleaseReadinessSummaryViewModel(
|
||||
const promotionCandidateArtifactSummary = objectOrEmpty(report?.promotionCandidateArtifactSummary);
|
||||
const virtualHalSimConfigMacroLoadFixturesReady = report?.virtualHalSimConfigMacroLoadFixturesReady === true;
|
||||
const virtualHalMotionControllerMatrixReady = report?.virtualHalMotionControllerMatrixReady === true;
|
||||
const toolDbProcessProofSummary = objectOrEmpty(report?.toolDbProcessProofSummary);
|
||||
const toolDbProcessProofReady = report?.toolDbProcessProofReady === true;
|
||||
const axisScreenshotArtifactSummary = objectOrEmpty(report?.axisScreenshotArtifactSummary);
|
||||
const blockedRuntimeFamilies = arrayOrEmpty(report?.blockedRuntimeFamilies);
|
||||
const promotedBlockedFamilies = arrayOrEmpty(report?.promotedBlockedFamilies);
|
||||
@@ -2354,6 +2419,18 @@ export function createProjectReleaseReadinessSummaryViewModel(
|
||||
label: "Virtual HAL motion controller matrix",
|
||||
value: virtualHalMotionControllerMatrixReady ? "ready" : "missing",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof",
|
||||
label: "Tool DB process proof",
|
||||
value: toolDbProcessProofReady ? "ready" : "missing",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof-detail",
|
||||
label: "Tool DB process proof detail",
|
||||
value: toolDbProcessProofSummary.apiName
|
||||
? `wasm=${toolDbProcessProofSummary.wasmProtocolReady ? "ready" : "missing"} browser=${toolDbProcessProofSummary.browserProtocolReady ? "ready" : "missing"} opfs=${toolDbProcessProofSummary.opfsPersistenceReady ? "ready" : "missing"} promotion_allowed=${toolDbProcessProofSummary.promotionAllowed ? "1" : "0"}`
|
||||
: "missing",
|
||||
},
|
||||
{
|
||||
id: "blocked-runtime-families",
|
||||
label: "Blocked runtime families",
|
||||
@@ -2542,6 +2619,18 @@ export function createProjectReleaseReadinessArtifactValidationSummaryViewModel(
|
||||
label: "Virtual HAL motion controller matrix",
|
||||
value: validation?.virtualHalMotionControllerMatrixReady === true ? "ready" : "missing",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof",
|
||||
label: "Tool DB process proof",
|
||||
value: validation?.toolDbProcessProofReady === true ? "ready" : "missing",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof-detail",
|
||||
label: "Tool DB process proof detail",
|
||||
value: validation?.toolDbProcessProofReady === true
|
||||
? `wasm=${validation.toolDbProcessProofSummary.wasmProtocolReady ? "ready" : "missing"} browser=${validation.toolDbProcessProofSummary.browserProtocolReady ? "ready" : "missing"} opfs=${validation.toolDbProcessProofSummary.opfsPersistenceReady ? "ready" : "missing"} promotion_allowed=${validation.toolDbProcessProofSummary.promotionAllowed ? "1" : "0"}`
|
||||
: "missing",
|
||||
},
|
||||
{
|
||||
id: "missing",
|
||||
label: "Missing artifact evidence",
|
||||
@@ -2953,6 +3042,8 @@ export function createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel
|
||||
const promotionCandidateArtifactSummary = objectOrEmpty(workflow?.validation?.promotionCandidateArtifactSummary);
|
||||
const promotionCandidateArtifactSummaryReady =
|
||||
workflow?.validation?.promotionCandidateArtifactSummaryReady === true;
|
||||
const toolDbProcessProofSummary = objectOrEmpty(workflow?.validation?.toolDbProcessProofSummary);
|
||||
const toolDbProcessProofReady = workflow?.validation?.toolDbProcessProofReady === true;
|
||||
const promotionArtifactRows = objectOrEmpty(promotionCandidateArtifactSummary.artifactRows);
|
||||
const hardBlockRuntimeFamilyRows = arrayOrEmpty(promotionCandidateArtifactSummary.hardBlockRuntimeFamilyRows);
|
||||
const hardBlockRuntimeFamilySummaryRows = arrayOrEmpty(
|
||||
@@ -3219,6 +3310,18 @@ export function createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel
|
||||
: "not provided",
|
||||
lockedPaths: arrayOrEmpty(row.lockedPaths),
|
||||
})),
|
||||
{
|
||||
id: "tool-db-process-proof",
|
||||
label: "Tool DB process proof",
|
||||
value: toolDbProcessProofReady ? "ready" : "not provided",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof-detail",
|
||||
label: "Tool DB process proof detail",
|
||||
value: toolDbProcessProofReady
|
||||
? `wasm=${toolDbProcessProofSummary.wasmProtocolReady ? "ready" : "missing"} browser=${toolDbProcessProofSummary.browserProtocolReady ? "ready" : "missing"} opfs=${toolDbProcessProofSummary.opfsPersistenceReady ? "ready" : "missing"} promotion_allowed=${toolDbProcessProofSummary.promotionAllowed ? "1" : "0"}`
|
||||
: "not provided",
|
||||
},
|
||||
...arrayOrEmpty(workflow?.validation?.virtualHalPromotionFamilyRows).map((row) => ({
|
||||
id: `virtual-hal-promotion-family-${row.id}`,
|
||||
label: `Promotion family ${row.label}`,
|
||||
@@ -3420,6 +3523,7 @@ export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
|
||||
const virtualHalSimConfigPromotionCandidates = objectOrEmpty(artifactObject.virtualHalSimConfigPromotionCandidates);
|
||||
const virtualHalSimConfigMacroLoadFixtures = objectOrEmpty(artifactObject.virtualHalSimConfigMacroLoadFixtures);
|
||||
const virtualHalMotionControllerMatrix = objectOrEmpty(artifactObject.virtualHalMotionControllerMatrix);
|
||||
const toolDbProcessProofSummary = objectOrEmpty(artifactObject.toolDbProcessProofSummary);
|
||||
const gateManifest = objectOrEmpty(artifactObject.gateManifest);
|
||||
const gateExecutionManifest = objectOrEmpty(artifactObject.gateExecutionManifest);
|
||||
const gateExecutionSummaryViewModel = objectOrEmpty(artifactObject.gateExecutionSummaryViewModel);
|
||||
@@ -3529,6 +3633,23 @@ export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
|
||||
const virtualHalMotionControllerMatrixReady = isVirtualHalMotionControllerMatrixReady(
|
||||
virtualHalMotionControllerMatrix,
|
||||
) && artifactObject.virtualHalMotionControllerMatrixReady === true;
|
||||
const expectedToolDbProcessProofSummary = createToolDbProcessProofSummary(toolDbProcessProofSummary);
|
||||
const toolDbProcessProofReady =
|
||||
toolDbProcessProofSummary.apiName === "tool-db-process-proof-summary" &&
|
||||
toolDbProcessProofSummary.summaryVersion === 1 &&
|
||||
toolDbProcessProofSummary.ready === true &&
|
||||
toolDbProcessProofSummary.boundaryClass === "L4-TOOL-DB" &&
|
||||
toolDbProcessProofSummary.path === "axis/db_demo/base.ngc" &&
|
||||
toolDbProcessProofSummary.dbProgramPath === "./db_nonran.py" &&
|
||||
toolDbProcessProofSummary.wasmProtocolReady === true &&
|
||||
toolDbProcessProofSummary.browserProtocolReady === true &&
|
||||
toolDbProcessProofSummary.opfsPersistenceReady === true &&
|
||||
toolDbProcessProofSummary.tblFallbackSufficient === false &&
|
||||
toolDbProcessProofSummary.promotionAllowed === false &&
|
||||
toolDbProcessProofSummary.executionEnabled === false &&
|
||||
arrayOrEmpty(toolDbProcessProofSummary.requiredCommands).join("\n") ===
|
||||
expectedToolDbProcessProofSummary.requiredCommands.join("\n") &&
|
||||
artifactObject.toolDbProcessProofReady === true;
|
||||
const axisScreenshotArtifacts = arrayOrEmpty(axisScreenshotArtifactSummary.artifacts);
|
||||
const blockedRuntimeFamilies = arrayOrEmpty(artifactObject.blockedRuntimeFamilies);
|
||||
const promotedBlockedFamilies = arrayOrEmpty(artifactObject.promotedBlockedFamilies);
|
||||
@@ -3577,6 +3698,7 @@ export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
|
||||
...(promotionCandidateArtifactSummaryReady ? [] : ["promotionCandidateArtifactSummary"]),
|
||||
...(virtualHalSimConfigMacroLoadFixturesReady ? [] : ["virtualHalSimConfigMacroLoadFixtures"]),
|
||||
...(virtualHalMotionControllerMatrixReady ? [] : ["virtualHalMotionControllerMatrix"]),
|
||||
...(toolDbProcessProofReady ? [] : ["toolDbProcessProofSummary"]),
|
||||
...(arrayOrEmpty(artifactObject.blockedRuntimeFamilies).join(",") === BLOCKED_RUNTIME_FAMILIES.join(",")
|
||||
? []
|
||||
: ["blockedRuntimeFamilies"]),
|
||||
@@ -3618,6 +3740,8 @@ export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
|
||||
promotionCandidateArtifactSummaryReady,
|
||||
virtualHalSimConfigMacroLoadFixturesReady,
|
||||
virtualHalMotionControllerMatrixReady,
|
||||
toolDbProcessProofSummary,
|
||||
toolDbProcessProofReady,
|
||||
axisScreenshotArtifactSummaryReady: axisScreenshotSummaryReady,
|
||||
axisScreenshotArtifactCount: axisScreenshotArtifacts.length,
|
||||
blockedRuntimeFamilies,
|
||||
@@ -3756,6 +3880,18 @@ export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
|
||||
label: "Virtual HAL motion controller matrix",
|
||||
value: virtualHalMotionControllerMatrixReady ? "ready" : "missing",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof",
|
||||
label: "Tool DB process proof",
|
||||
value: toolDbProcessProofReady ? "ready" : "missing",
|
||||
},
|
||||
{
|
||||
id: "tool-db-process-proof-detail",
|
||||
label: "Tool DB process proof detail",
|
||||
value: toolDbProcessProofReady
|
||||
? `wasm=${toolDbProcessProofSummary.wasmProtocolReady ? "ready" : "missing"} browser=${toolDbProcessProofSummary.browserProtocolReady ? "ready" : "missing"} opfs=${toolDbProcessProofSummary.opfsPersistenceReady ? "ready" : "missing"} promotion_allowed=${toolDbProcessProofSummary.promotionAllowed ? "1" : "0"}`
|
||||
: "missing",
|
||||
},
|
||||
{
|
||||
id: "blocked-runtime-families",
|
||||
label: "Blocked runtime families",
|
||||
|
||||
@@ -14,10 +14,12 @@ function makeRequestId() {
|
||||
|
||||
export function createLinuxCncToolDbBrowserWorkerAdapter({
|
||||
workerUrl,
|
||||
pythonRuntimeModuleUrl = null,
|
||||
workerFactory = (url) => new Worker(url, { type: "module" }),
|
||||
timeoutMs = 5000,
|
||||
} = {}) {
|
||||
const normalizedWorkerUrl = requireWorkerUrl(workerUrl);
|
||||
const normalizedPythonRuntimeModuleUrl = pythonRuntimeModuleUrl ? requireWorkerUrl(pythonRuntimeModuleUrl) : null;
|
||||
let worker = null;
|
||||
const pending = new Map();
|
||||
let runtimeExecutionReady = false;
|
||||
@@ -70,7 +72,11 @@ export function createLinuxCncToolDbBrowserWorkerAdapter({
|
||||
worker.addEventListener("error", (event) => {
|
||||
rejectPending(new Error(event.message ?? "Tool DB browser worker error."));
|
||||
});
|
||||
const result = await request("start");
|
||||
const result = await request("start", {
|
||||
pythonRuntimeModuleUrl: normalizedPythonRuntimeModuleUrl
|
||||
? String(normalizedPythonRuntimeModuleUrl)
|
||||
: null,
|
||||
});
|
||||
runtimeExecutionReady = result.runtimeExecutionReady === true;
|
||||
startStatus = result.status ?? (runtimeExecutionReady
|
||||
? "browser_python_wasm_runtime_ready"
|
||||
|
||||
Reference in New Issue
Block a user