解锁L4-TOOL-DB主机运行环境

结论:已识别RIP版LinuxCNC主机运行时,Tool DB native protocol probe可通过,inventory baseline保持28/28/131/0且promotion继续锁定。
This commit is contained in:
2026-06-19 06:28:38 +08:00
parent f101932bf1
commit d9ac3770a7
18 changed files with 3041 additions and 184 deletions

View File

@@ -134,20 +134,65 @@ function createPromotionFamilySummaryRows(candidateReport = {}) {
function createPromotionCandidateArtifactSummary({
candidateReport = {},
evidenceExpansionReport = {},
inventory = DEFAULT_SIM_CONFIG_INVENTORY_BASELINE,
blockedFamilies = BLOCKED_RUNTIME_FAMILIES,
promotedBlockedFamilies = [],
promotionCandidateRows = [],
evidenceExpansionRows = [],
} = {}) {
const rows = arrayOrEmpty(objectOrEmpty(candidateReport).rows);
const candidateArtifactRows = arrayOrEmpty(promotionCandidateRows);
const evidenceExpansionArtifactRows = arrayOrEmpty(evidenceExpansionRows);
const evidenceReadyCount = rows.filter((row) =>
row.currentNodeInventoryStatus === "PASS" &&
row.blockedKind === "-" &&
row.currentMatrixBrowserStatus === "explicit-browser-diagnostics" &&
row.targetBrowserEvidence === "explicit-browser-diagnostics"
).length;
const inventoryReadyCount = 20;
const evidenceExpansionCandidateCount = 13;
const promotionAllowedCount = 0;
const artifactEvidenceReadyRows = candidateArtifactRows
.filter((row) => row.candidate_kind === "evidence-ready");
const artifactInventoryReadyRows = candidateArtifactRows
.filter((row) => row.candidate_kind === "inventory-ready");
const artifactEvidenceReadyCount = artifactEvidenceReadyRows.length;
const inventoryReadyCount = artifactInventoryReadyRows.length > 0
? artifactInventoryReadyRows.length
: 20;
const evidenceExpansionCandidateCount = evidenceExpansionArtifactRows.length > 0
? evidenceExpansionArtifactRows.length
: 13;
const promotionAllowedCount = candidateArtifactRows.length > 0
? candidateArtifactRows.filter((row) => String(row.promotion_allowed ?? row.promotionAllowed) === "1").length
: 0;
const hardBlockRuntimeFamilyRows = artifactInventoryReadyRows
.filter((row) => blockedFamilies.includes(row.skip_kind ?? row.blocked_kind ?? row.blockedKind))
.map((row, index) => ({
candidateId: row.candidate_id ?? row.path ?? "unknown",
path: row.path ?? "unknown",
skipKind: row.skip_kind ?? row.blocked_kind ?? row.blockedKind ?? "unknown",
promotionAllowed: String(row.promotion_allowed ?? row.promotionAllowed ?? "0") === "1",
blockReason: row.block_reason ?? row.blockReason ?? "-",
recommendedNextCommand: row.recommended_next_command ?? row.recommendedNextCommand ?? "-",
detailId: `hard-block-runtime-detail-${index + 1}`,
}));
const resolvedEvidenceReadyCount = artifactEvidenceReadyCount > 0 ? artifactEvidenceReadyCount : evidenceReadyCount;
const hardBlockRuntimePromotionAllowedCount = hardBlockRuntimeFamilyRows
.filter((row) => row.promotionAllowed)
.length;
const hardBlockRuntimeFamilySummaryRows = blockedFamilies.map((family) => {
const familyRows = hardBlockRuntimeFamilyRows.filter((row) => row.skipKind === family);
const promotionAllowedRows = familyRows.filter((row) => row.promotionAllowed);
return {
family,
candidateCount: familyRows.length,
promotionAllowedCount: promotionAllowedRows.length,
locked: promotionAllowedRows.length === 0,
lockedPaths: familyRows.map((row) => row.path),
firstPath: familyRows[0]?.path ?? null,
firstBlockReason: familyRows[0]?.blockReason ?? null,
nextProof: familyRows[0]?.recommendedNextCommand ?? null,
};
});
const hardBlockRuntimeLockSummary = createHardBlockRuntimeLockSummary(
blockedFamilies,
promotedBlockedFamilies,
@@ -167,17 +212,36 @@ function createPromotionCandidateArtifactSummary({
artifactPath: "wasm-port/build/wasm/sim-configs-inventory/promotion-candidates.tsv",
evidenceExpansionArtifactPath: "wasm-port/build/wasm/sim-configs-inventory/evidence-expansion-candidates.tsv",
layerCount: 2,
evidenceReadyCount,
evidenceReadyCount: resolvedEvidenceReadyCount,
inventoryReadyCount,
evidenceExpansionCandidateCount,
totalCandidateCount: evidenceReadyCount + inventoryReadyCount,
totalCandidateCount: resolvedEvidenceReadyCount + inventoryReadyCount,
promotionAllowedCount,
hardBlockRuntimeLock: hardBlockRuntimeLockSummary.lockValue,
hardBlockRuntimePromotionAllowedCount,
inventoryBaseline: baselineText,
artifactRows: {
promotionCandidates: candidateArtifactRows.length > 0
? candidateArtifactRows.length
: resolvedEvidenceReadyCount + inventoryReadyCount,
evidenceExpansion: evidenceExpansionArtifactRows.length > 0
? evidenceExpansionArtifactRows.length
: evidenceExpansionCandidateCount,
},
hardBlockRuntimeFamilyRows,
hardBlockRuntimeFamilyDetailRows: hardBlockRuntimeFamilyRows.map((row) => ({
id: row.detailId,
family: row.skipKind,
path: row.path,
blockReason: row.blockReason,
nextProof: row.recommendedNextCommand,
promotionAllowed: row.promotionAllowed,
})),
hardBlockRuntimeFamilySummaryRows,
layers: [
{
id: "evidence-ready",
candidateCount: evidenceReadyCount,
candidateCount: resolvedEvidenceReadyCount,
promotionAllowedCount: 0,
virtualHalEvidenceReady: true,
baselineChanging: false,
@@ -193,6 +257,9 @@ function createPromotionCandidateArtifactSummary({
evidenceExpansion: {
id: "browser-diagnostics-expansion",
candidateCount: evidenceExpansionCandidateCount,
artifactRowCount: evidenceExpansionArtifactRows.length > 0
? evidenceExpansionArtifactRows.length
: evidenceExpansionCandidateCount,
promotionAllowedCount: 0,
baselineChanging: false,
nextEvidence: "browser-diagnostics-binding",
@@ -1951,6 +2018,9 @@ export function createProjectReleaseReadinessReport({
simConfigInventory = DEFAULT_SIM_CONFIG_INVENTORY_BASELINE,
virtualHalSimConfigSourceCoverage = null,
virtualHalSimConfigPromotionCandidates = null,
virtualHalSimConfigEvidenceExpansion = null,
promotionCandidateRows = [],
evidenceExpansionRows = [],
virtualHalSimConfigMacroLoadFixtures = null,
virtualHalMotionControllerMatrix = null,
blockedRuntimeFamilies = BLOCKED_RUNTIME_FAMILIES,
@@ -2003,9 +2073,12 @@ export function createProjectReleaseReadinessReport({
const hardBlockRuntimeLockSummary = createHardBlockRuntimeLockSummary(blockedFamilies, promotedBlockedFamilies);
const promotionCandidateArtifactSummary = createPromotionCandidateArtifactSummary({
candidateReport: virtualHalSimConfigPromotionCandidates,
evidenceExpansionReport: virtualHalSimConfigEvidenceExpansion,
inventory,
blockedFamilies,
promotedBlockedFamilies,
promotionCandidateRows,
evidenceExpansionRows,
});
const axisScreenshotArtifactSummary = createAxisScreenshotArtifactSummary(axisScreenshotArtifacts);
const axisScreenshotArtifactsReady = axisScreenshotArtifactSummary.ready;
@@ -2044,6 +2117,7 @@ export function createProjectReleaseReadinessReport({
virtualHalSimConfigSourceCoverageReady,
virtualHalSimConfigPromotionCandidates,
virtualHalSimConfigPromotionCandidatesReady,
virtualHalSimConfigEvidenceExpansion,
virtualHalPromotionFamilySummary,
virtualHalPromotionFamilyRows,
promotionCandidateArtifactSummary,
@@ -2087,6 +2161,16 @@ export function createProjectReleaseReadinessReport({
label: "Promotion candidate artifact",
value: promotionCandidateArtifactSummary.artifactPath,
},
{
id: "promotion-candidate-artifact-rows",
label: "Promotion candidate artifact rows",
value: `${promotionCandidateArtifactSummary.artifactRows.promotionCandidates}`,
},
{
id: "evidence-expansion-artifact-rows",
label: "Evidence expansion artifact rows",
value: `${promotionCandidateArtifactSummary.artifactRows.evidenceExpansion}`,
},
{
id: "promotion-candidate-layers",
label: "Promotion candidate layers",
@@ -2388,6 +2472,13 @@ export function createProjectReleaseReadinessArtifactValidationSummaryViewModel(
? `${validation.promotionCandidateArtifactSummary.totalCandidateCount}`
: "missing",
},
{
id: "promotion-candidate-artifact-rows",
label: "Promotion candidate artifact rows",
value: validation?.promotionCandidateArtifactSummaryReady === true
? `${validation.promotionCandidateArtifactSummary.artifactRows.promotionCandidates}`
: "missing",
},
{
id: "evidence-expansion-candidates",
label: "Evidence expansion candidates",
@@ -2395,6 +2486,13 @@ export function createProjectReleaseReadinessArtifactValidationSummaryViewModel(
? `${validation.promotionCandidateArtifactSummary.evidenceExpansionCandidateCount}`
: "missing",
},
{
id: "evidence-expansion-artifact-rows",
label: "Evidence expansion artifact rows",
value: validation?.promotionCandidateArtifactSummaryReady === true
? `${validation.promotionCandidateArtifactSummary.artifactRows.evidenceExpansion}`
: "missing",
},
{
id: "evidence-expansion-next-evidence",
label: "Evidence expansion next evidence",
@@ -2837,6 +2935,17 @@ export function createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel
) {
const missing = arrayOrEmpty(workflow?.missing);
const promotionCandidateSummary = objectOrEmpty(workflow?.diagnosticsArtifact?.virtualHalPromotionCandidateSummary);
const promotionCandidateReportRows = arrayOrEmpty(
workflow?.diagnosticsArtifact?.virtualHalSimConfigPromotionCandidates?.rows,
);
const evidenceReadyCandidateRows = promotionCandidateReportRows.filter((row) =>
row?.complete === true &&
row?.currentNodeInventoryStatus === "PASS" &&
row?.blockedKind === "-" &&
row?.targetBrowserEvidence === "explicit-browser-diagnostics" &&
row?.currentMatrixBrowserStatus === "explicit-browser-diagnostics"
);
const preferredEvidenceReadyCandidate = evidenceReadyCandidateRows[0] ?? {};
const promotionCandidateSummaryReady = promotionCandidateSummary.ready === true;
const validationRows = arrayOrEmpty(workflow?.validation?.rows);
const hardBlockRuntimeLock = validationRows.find(({ id }) => id === "hard-block-runtime-lock")?.value;
@@ -2844,6 +2953,16 @@ export function createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel
const promotionCandidateArtifactSummary = objectOrEmpty(workflow?.validation?.promotionCandidateArtifactSummary);
const promotionCandidateArtifactSummaryReady =
workflow?.validation?.promotionCandidateArtifactSummaryReady === true;
const promotionArtifactRows = objectOrEmpty(promotionCandidateArtifactSummary.artifactRows);
const hardBlockRuntimeFamilyRows = arrayOrEmpty(promotionCandidateArtifactSummary.hardBlockRuntimeFamilyRows);
const hardBlockRuntimeFamilySummaryRows = arrayOrEmpty(
promotionCandidateArtifactSummary.hardBlockRuntimeFamilySummaryRows,
);
const hardBlockRuntimeFamilyDetailRows = arrayOrEmpty(
promotionCandidateArtifactSummary.hardBlockRuntimeFamilyDetailRows,
);
const hardBlockRuntimeDetailPreviewRows = hardBlockRuntimeFamilyDetailRows.slice(0, 5);
const hardBlockRuntimePreviewRows = hardBlockRuntimeFamilyRows.slice(0, 3);
const evidenceExpansionRows = arrayOrEmpty(
workflow?.diagnosticsArtifact?.virtualHalSimConfigEvidenceExpansion?.rows,
);
@@ -2910,6 +3029,38 @@ export function createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel
? `${promotionCandidateArtifactSummary.totalCandidateCount}`
: "not provided",
},
{
id: "evidence-ready-candidate-rows",
label: "Evidence-ready candidate rows",
value: `${evidenceReadyCandidateRows.length}`,
},
{
id: "evidence-ready-candidate-preview",
label: "Evidence-ready candidate preview",
value: preferredEvidenceReadyCandidate.id ?? "not provided",
},
{
id: "evidence-ready-candidate-preview-gcode",
label: "Evidence-ready candidate preview G-code",
value: preferredEvidenceReadyCandidate.gcodePath ?? "not provided",
},
{
id: "evidence-ready-candidate-promotion-allowed",
label: "Evidence-ready candidate promotion allowed",
value: "0",
},
{
id: "evidence-ready-candidate-baseline-changing",
label: "Evidence-ready candidate baseline changing",
value: "no",
},
{
id: "promotion-candidate-artifact-rows",
label: "Promotion candidate artifact rows",
value: promotionCandidateArtifactSummaryReady
? `${promotionArtifactRows.promotionCandidates ?? "not provided"}`
: "not provided",
},
{
id: "evidence-expansion-candidates",
label: "Evidence expansion candidates",
@@ -2917,6 +3068,13 @@ export function createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel
? `${promotionCandidateArtifactSummary.evidenceExpansionCandidateCount}`
: "not provided",
},
{
id: "evidence-expansion-artifact-rows",
label: "Evidence expansion artifact rows",
value: promotionCandidateArtifactSummaryReady
? `${promotionArtifactRows.evidenceExpansion ?? "not provided"}`
: "not provided",
},
{
id: "evidence-expansion-next-evidence",
label: "Evidence expansion next evidence",
@@ -2985,6 +3143,82 @@ export function createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel
? `${promotionCandidateArtifactSummary.promotionAllowedCount}`
: "not provided",
},
{
id: "hard-block-runtime-locked-rows",
label: "Hard-block locked inventory rows",
value: promotionCandidateArtifactSummaryReady
? `${hardBlockRuntimeFamilyRows.length}`
: "not provided",
},
{
id: "hard-block-runtime-locked-preview",
label: "Hard-block locked row preview",
value: hardBlockRuntimePreviewRows.length > 0
? hardBlockRuntimePreviewRows.map((row) => `${row.skipKind}:${row.path}`).join(", ")
: "not provided",
},
{
id: "hard-block-runtime-promotion-allowed",
label: "Hard-block promotions allowed",
value: promotionCandidateArtifactSummaryReady
? `${promotionCandidateArtifactSummary.hardBlockRuntimePromotionAllowedCount ?? "not provided"}`
: "not provided",
},
{
id: "hard-block-runtime-family-count",
label: "Hard-block runtime families",
value: promotionCandidateArtifactSummaryReady
? `${hardBlockRuntimeFamilySummaryRows.length}`
: "not provided",
},
{
id: "hard-block-runtime-family-summary",
label: "Hard-block runtime family summary",
value: hardBlockRuntimeFamilySummaryRows.length > 0
? hardBlockRuntimeFamilySummaryRows
.map((row) => `${row.family}:${row.candidateCount} locked=${row.locked ? "yes" : "no"}`)
.join(", ")
: "not provided",
},
{
id: "hard-block-runtime-detail-row-count",
label: "Hard-block detail rows",
value: promotionCandidateArtifactSummaryReady
? `${hardBlockRuntimeFamilyDetailRows.length}`
: "not provided",
},
...hardBlockRuntimeDetailPreviewRows.map((row, index) => ({
id: `hard-block-runtime-detail-preview-${index + 1}`,
label: `Hard-block detail ${index + 1}`,
value: `${row.family}:${row.path}; reason=${row.blockReason}; next=${row.nextProof}; promotion_allowed=${row.promotionAllowed ? "1" : "0"}`,
family: row.family,
path: row.path,
blockReason: row.blockReason,
nextProof: row.nextProof,
promotionAllowed: row.promotionAllowed,
})),
...hardBlockRuntimeFamilySummaryRows.map((row) => ({
id: `hard-block-runtime-family-${row.family}`,
label: `Hard-block family ${row.family}`,
value: [
`${row.candidateCount} locked rows`,
`promotion_allowed=${row.promotionAllowedCount}`,
`first=${row.firstPath ?? "not provided"}`,
`reason=${row.firstBlockReason ?? "not provided"}`,
`next=${row.nextProof ?? "not provided"}`,
].join("; "),
firstPath: row.firstPath,
firstBlockReason: row.firstBlockReason,
nextProof: row.nextProof,
})),
...hardBlockRuntimeFamilySummaryRows.map((row) => ({
id: `hard-block-runtime-family-${row.family}-paths`,
label: `Hard-block family ${row.family} paths`,
value: arrayOrEmpty(row.lockedPaths).length > 0
? row.lockedPaths.join(", ")
: "not provided",
lockedPaths: arrayOrEmpty(row.lockedPaths),
})),
...arrayOrEmpty(workflow?.validation?.virtualHalPromotionFamilyRows).map((row) => ({
id: `virtual-hal-promotion-family-${row.id}`,
label: `Promotion family ${row.label}`,
@@ -3242,10 +3476,12 @@ export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
const promotionCandidateArtifactSummary = objectOrEmpty(artifactObject.promotionCandidateArtifactSummary);
const expectedPromotionCandidateArtifactSummary = createPromotionCandidateArtifactSummary({
candidateReport: virtualHalSimConfigPromotionCandidates,
evidenceExpansionReport: artifactObject.virtualHalSimConfigEvidenceExpansion,
inventory: simConfigInventory,
blockedFamilies: arrayOrEmpty(artifactObject.blockedRuntimeFamilies),
promotedBlockedFamilies: arrayOrEmpty(artifactObject.promotedBlockedFamilies),
});
const artifactRows = objectOrEmpty(promotionCandidateArtifactSummary.artifactRows);
const promotionCandidateArtifactSummaryReady =
promotionCandidateArtifactSummary.apiName === expectedPromotionCandidateArtifactSummary.apiName &&
promotionCandidateArtifactSummary.summaryVersion === 1 &&
@@ -3259,7 +3495,15 @@ export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
promotionCandidateArtifactSummary.totalCandidateCount === expectedPromotionCandidateArtifactSummary.totalCandidateCount &&
promotionCandidateArtifactSummary.promotionAllowedCount === 0 &&
promotionCandidateArtifactSummary.hardBlockRuntimeLock === expectedPromotionCandidateArtifactSummary.hardBlockRuntimeLock &&
promotionCandidateArtifactSummary.hardBlockRuntimePromotionAllowedCount === 0 &&
Number.isFinite(promotionCandidateArtifactSummary.hardBlockRuntimePromotionAllowedCount) &&
promotionCandidateArtifactSummary.inventoryBaseline === expectedPromotionCandidateArtifactSummary.inventoryBaseline &&
artifactRows.promotionCandidates ===
promotionCandidateArtifactSummary.evidenceReadyCount + promotionCandidateArtifactSummary.inventoryReadyCount &&
(
artifactRows.evidenceExpansion === 0 ||
artifactRows.evidenceExpansion === promotionCandidateArtifactSummary.evidenceExpansionCandidateCount
) &&
arrayOrEmpty(promotionCandidateArtifactSummary.layers).some((row) =>
row.id === "evidence-ready" &&
row.candidateCount === expectedPromotionCandidateArtifactSummary.evidenceReadyCount &&
@@ -3442,6 +3686,13 @@ export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
? `${promotionCandidateArtifactSummary.totalCandidateCount}`
: "missing",
},
{
id: "promotion-candidate-artifact-rows",
label: "Promotion candidate artifact rows",
value: promotionCandidateArtifactSummaryReady
? `${artifactRows.promotionCandidates}`
: "missing",
},
{
id: "evidence-expansion-candidates",
label: "Evidence expansion candidates",
@@ -3449,6 +3700,13 @@ export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
? `${promotionCandidateArtifactSummary.evidenceExpansionCandidateCount}`
: "missing",
},
{
id: "evidence-expansion-artifact-rows",
label: "Evidence expansion artifact rows",
value: promotionCandidateArtifactSummaryReady
? `${artifactRows.evidenceExpansion}`
: "missing",
},
{
id: "evidence-expansion-next-evidence",
label: "Evidence expansion next evidence",