fix: report current M4 M5 runtime blockers
This commit is contained in:
@@ -2468,9 +2468,14 @@ function observedLiveIdentifier(value) {
|
||||
|
||||
function aggregatorLiveStateFromSources(sources) {
|
||||
const cloudApiDb = sources.devEdgeHealth.edgeHealth?.contracts?.deploy?.cloudApiDb ?? {};
|
||||
const dbLive = cloudApiDb.ready === true &&
|
||||
const edgeDbLive = cloudApiDb.ready === true &&
|
||||
(cloudApiDb.connected === true || cloudApiDb.liveConnected === true) &&
|
||||
cloudApiDb.liveDbEvidence === true;
|
||||
const m4LiveDb = sources.devM4Agent.publicEntrypoints?.api?.live?.db ?? {};
|
||||
const m4DbLive = m4LiveDb.ready === true &&
|
||||
(m4LiveDb.connected === true || m4LiveDb.liveConnected === true) &&
|
||||
m4LiveDb.liveDbEvidence === true;
|
||||
const dbLive = edgeDbLive || m4DbLive;
|
||||
const m3Operation = sources.devM3Hardware.liveOperation ?? {};
|
||||
const m3Live = statusIsPass(m3Operation.status) &&
|
||||
["operationId", "traceId", "auditId", "evidenceId"].every((field) =>
|
||||
@@ -2547,11 +2552,37 @@ function assertProtectedAggregatorDevLiveEvidence(item, label, liveState, assume
|
||||
);
|
||||
}
|
||||
|
||||
function assertNoStaleDbRuntimeBlocker(report, label, liveState) {
|
||||
if (!liveState.dbLive) {
|
||||
return;
|
||||
}
|
||||
|
||||
const staleDbScopes = new Set([
|
||||
"cloud-api-db",
|
||||
"cloud-api-db-health-gate",
|
||||
"cloud-api-db-live",
|
||||
"db-live"
|
||||
]);
|
||||
const staleBlocker = report.blockers?.find((blocker) => staleDbScopes.has(blocker.scope));
|
||||
assert.equal(
|
||||
staleBlocker,
|
||||
undefined,
|
||||
`${label}.blockers must not keep stale DB live/runtime-env blocker ${staleBlocker?.scope ?? ""} when DB live evidence is pass`
|
||||
);
|
||||
|
||||
const dbCheck = findById(report.dod.checks, "cloud-api-db-ready");
|
||||
assertObject(dbCheck, `${label}.dod.checks.cloud-api-db-ready`);
|
||||
assert.equal(dbCheck.status, "pass", `${label}.dod.checks.cloud-api-db-ready.status must be pass when DB live evidence is proven`);
|
||||
assert.equal(dbCheck.evidenceLevel, "DEV-LIVE", `${label}.dod.checks.cloud-api-db-ready.evidenceLevel must be DEV-LIVE when DB live evidence is proven`);
|
||||
}
|
||||
|
||||
async function assertAggregatorNonPromotionBoundaries(report, label) {
|
||||
const sources = await readAggregatorSourceReports(report, label);
|
||||
const liveState = aggregatorLiveStateFromSources(sources);
|
||||
const anyProtectedLiveBlocked = !liveState.dbLive || !liveState.m3Live || !liveState.m4Live || !liveState.m5Live;
|
||||
|
||||
assertNoStaleDbRuntimeBlocker(report, label, liveState);
|
||||
|
||||
assertObject(report.latestFrontendDevFact, `${label}.latestFrontendDevFact`);
|
||||
assert.equal(
|
||||
report.latestFrontendDevFact.promotesM3M4M5,
|
||||
|
||||
Reference in New Issue
Block a user