





















@@ -307,7 +307,36 @@ jobs:
307307 exit 1
308308 fi
309309 report_md="${report_json%.json}.md"
310+ effective_status="$status"
311+ if [[ "$FAIL_ON_REGRESSION" == "true" && "$status" != "0" ]]; then
312+ if REPORT_JSON="$report_json" node <<'NODE'
313+ const fs = require("node:fs");
314+ const report = JSON.parse(fs.readFileSync(process.env.REPORT_JSON, "utf8"));
315+ const statuses = report.summary?.statuses ?? {};
316+ const nonPassStatuses = Object.entries(statuses)
317+ .filter(([status, count]) => status !== "PASS" && Number(count) > 0);
318+ const baselineRegressionCount =
319+ Number(report.baseline?.comparison?.regressionCount ?? report.gate?.baseline?.regressionCount ?? 0);
320+ const gate = report.gate;
321+ const toleratedPartial =
322+ gate?.verdict === "PARTIAL" &&
323+ Number(gate.blockingCount ?? 0) === 0 &&
324+ baselineRegressionCount === 0 &&
325+ nonPassStatuses.length === 0;
326+ if (!toleratedPartial) {
327+ process.exit(1);
328+ }
329+ NODE
330+ then
331+ effective_status=0
332+ {
333+ echo "Kova returned a partial release-gate verdict for filtered performance coverage, but all selected scenarios passed and no baseline regression was reported."
334+ echo
335+ } >> "$GITHUB_STEP_SUMMARY"
336+ fi
337+ fi
310338 echo "status=$status" >> "$GITHUB_OUTPUT"
339+ echo "effective_status=$effective_status" >> "$GITHUB_OUTPUT"
311340 echo "report_json=$report_json" >> "$GITHUB_OUTPUT"
312341 echo "report_md=$report_md" >> "$GITHUB_OUTPUT"
313342@@ -344,8 +373,8 @@ jobs:
344373 EOF
345374 cat "$summary_path" >> "$GITHUB_STEP_SUMMARY"
346375347- if [[ "$FAIL_ON_REGRESSION" == "true" && "$status" != "0" ]]; then
348- exit "$status"
376+ if [[ "$FAIL_ON_REGRESSION" == "true" && "$effective_status" != "0" ]]; then
377+ exit "$effective_status"
349378 fi
350379351380 - name: Fetch previous source performance baseline
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。