新增 release gate execution summary API
This commit is contained in:
@@ -3,6 +3,7 @@ import assert from "node:assert/strict";
|
||||
import {
|
||||
createProjectReleaseGateActionPlan,
|
||||
createProjectReleaseGateExecutionManifest,
|
||||
createProjectReleaseGateExecutionSummaryViewModel,
|
||||
createProjectReleaseGateManifest,
|
||||
createProjectReleaseGateResultMatrix,
|
||||
createProjectReleaseReadinessArtifactJsonWorkflow,
|
||||
@@ -126,6 +127,37 @@ assert.equal(
|
||||
partialExecutionManifest.rows.find(({ id }) => id === "standalone-cnc-semantics")?.observedOutput,
|
||||
null,
|
||||
);
|
||||
const partialExecutionSummary = createProjectReleaseGateExecutionSummaryViewModel(partialExecutionManifest);
|
||||
assert.equal(partialExecutionSummary.apiName, "project-release-gate-execution-summary-view-model");
|
||||
assert.equal(partialExecutionSummary.viewModelVersion, 1);
|
||||
assert.equal(partialExecutionSummary.phase, "waiting");
|
||||
assert.equal(partialExecutionSummary.ready, false);
|
||||
assert.equal(partialExecutionSummary.statusLine, "Waiting: standalone-cnc-semantics, interp-wasm, sim-config-inventory, ini-panel-browser, opfs-session-browser, ui-node-smokes, host-smokes, project-release-gate");
|
||||
assert.equal(partialExecutionSummary.gateCount, 11);
|
||||
assert.equal(partialExecutionSummary.passedCount, 3);
|
||||
assert.equal(partialExecutionSummary.unknownCount, 8);
|
||||
assert.equal(partialExecutionSummary.nextGateId, "standalone-cnc-semantics");
|
||||
assert.deepEqual(partialExecutionSummary.evidenceCounts, {
|
||||
"explicit-result": 1,
|
||||
"expected-output": 2,
|
||||
missing: 8,
|
||||
});
|
||||
assert.deepEqual(
|
||||
partialExecutionSummary.rows.map(({ id, value }) => [id, value]),
|
||||
[
|
||||
["gate-results", "3/11 passed"],
|
||||
["unknown-gates", "8"],
|
||||
["next-gate", "standalone-cnc-semantics"],
|
||||
["expected-output-evidence", "2"],
|
||||
["explicit-result-evidence", "1"],
|
||||
["missing", "standalone-cnc-semantics, interp-wasm, sim-config-inventory, ini-panel-browser, opfs-session-browser, ui-node-smokes, host-smokes, project-release-gate"],
|
||||
],
|
||||
);
|
||||
assert.equal(partialExecutionSummary.gateRows.length, manifest.gateCount);
|
||||
assert.equal(
|
||||
partialExecutionSummary.gateRows.find(({ id }) => id === "vendor-sync")?.evidence,
|
||||
"expected-output",
|
||||
);
|
||||
|
||||
const partialActionPlan = createProjectReleaseGateActionPlan({ gateResultMatrix: partialMatrix });
|
||||
assert.equal(partialActionPlan.apiName, "project-release-gate-action-plan");
|
||||
@@ -166,6 +198,10 @@ assert.deepEqual(report.gateManifest, manifest);
|
||||
assert.equal(report.gateExecutionManifest.apiName, "project-release-gate-execution-manifest");
|
||||
assert.equal(report.gateExecutionManifest.ready, true);
|
||||
assert.equal(report.gateExecutionManifest.passedCount, manifest.gateCount);
|
||||
assert.equal(report.gateExecutionSummaryViewModel.apiName, "project-release-gate-execution-summary-view-model");
|
||||
assert.equal(report.gateExecutionSummaryViewModel.statusLine, "Ready: All release gate evidence present");
|
||||
assert.equal(report.gateExecutionSummaryViewModel.rows[0].value, "11/11 passed");
|
||||
assert.equal(report.gateExecutionSummaryViewModel.nextGateId, null);
|
||||
assert.equal(report.gateResultMatrix.ready, true);
|
||||
assert.equal(report.gateResultMatrix.passedCount, manifest.gateCount);
|
||||
assert.equal(report.gateActionPlan.ready, true);
|
||||
@@ -256,6 +292,7 @@ assert.deepEqual(
|
||||
["gate-count", "11/11"],
|
||||
["gate-manifest", "ready"],
|
||||
["gate-execution-manifest", "ready"],
|
||||
["gate-execution-summary", "ready"],
|
||||
["gate-result-matrix", "ready"],
|
||||
["gate-action-plan", "ready"],
|
||||
["missing", "none"],
|
||||
@@ -383,6 +420,10 @@ assert.equal(
|
||||
staleArtifactValidationSummary.rows.find(({ id }) => id === "gate-execution-manifest")?.value,
|
||||
"missing",
|
||||
);
|
||||
assert.equal(
|
||||
staleArtifactValidationSummary.rows.find(({ id }) => id === "gate-execution-summary")?.value,
|
||||
"missing",
|
||||
);
|
||||
assert.equal(staleArtifactValidationActionPlan.phase, "blocked");
|
||||
assert.equal(staleArtifactValidationActionPlan.ready, false);
|
||||
assert.equal(staleArtifactValidationActionPlan.missingCount, staleArtifactValidation.missing.length);
|
||||
|
||||
@@ -36,6 +36,7 @@ import {
|
||||
createMachineSessionPersistenceSummary,
|
||||
createProjectReleaseGateActionPlan,
|
||||
createProjectReleaseGateExecutionManifest,
|
||||
createProjectReleaseGateExecutionSummaryViewModel,
|
||||
createProjectReleaseGateManifest,
|
||||
createProjectReleaseGateResultMatrix,
|
||||
createProjectReleaseReadinessArtifactJsonWorkflow,
|
||||
@@ -98,6 +99,7 @@ const requiredExports = [
|
||||
["createLinuxCncInterpSdk", createLinuxCncInterpSdk],
|
||||
["createProjectReleaseGateActionPlan", createProjectReleaseGateActionPlan],
|
||||
["createProjectReleaseGateExecutionManifest", createProjectReleaseGateExecutionManifest],
|
||||
["createProjectReleaseGateExecutionSummaryViewModel", createProjectReleaseGateExecutionSummaryViewModel],
|
||||
["createProjectReleaseGateManifest", createProjectReleaseGateManifest],
|
||||
["createProjectReleaseGateResultMatrix", createProjectReleaseGateResultMatrix],
|
||||
["createProjectReleaseReadinessArtifactJsonWorkflow", createProjectReleaseReadinessArtifactJsonWorkflow],
|
||||
@@ -294,6 +296,7 @@ assert.deepEqual(releaseReadinessArtifactValidation, {
|
||||
expectedGateIds: createProjectReleaseGateManifest().gateIds,
|
||||
gateManifestReady: true,
|
||||
gateExecutionManifestReady: true,
|
||||
gateExecutionSummaryReady: true,
|
||||
gateResultMatrixReady: true,
|
||||
gateActionPlanReady: true,
|
||||
blockedRuntimeFamilies: [
|
||||
@@ -322,6 +325,11 @@ assert.deepEqual(releaseReadinessArtifactValidation, {
|
||||
label: "Gate execution manifest",
|
||||
value: "ready",
|
||||
},
|
||||
{
|
||||
id: "gate-execution-summary",
|
||||
label: "Gate execution summary",
|
||||
value: "ready",
|
||||
},
|
||||
{
|
||||
id: "gate-result-matrix",
|
||||
label: "Gate result matrix",
|
||||
@@ -426,6 +434,7 @@ assert.deepEqual(
|
||||
"blockedRuntimeFamilies",
|
||||
"gateManifest",
|
||||
"gateExecutionManifest",
|
||||
"gateExecutionSummaryViewModel",
|
||||
"gateResultMatrix",
|
||||
"gateActionPlan",
|
||||
"gates.length",
|
||||
|
||||
Reference in New Issue
Block a user