ci(lesavka): honor observe-mode quality metrics

This commit is contained in:
Brad Stein 2026-05-19 06:30:19 -03:00
parent e03cae2a08
commit 64eb042c64

View File

@ -538,6 +538,17 @@ else
publish_status=$?
fi
# Treat the generated check metrics as the source of truth. Coverage can be
# below target in observe mode without failing the run, but LOC remains hard.
if ! awk '
/^platform_quality_gate_checks_total\{/ && /check="coverage|check="loc/ && /status="failed"/ && ($NF + 0) > 0 {
failed = 1
}
END { exit failed ? 0 : 1 }
' "${METRICS_FILE}"; then
status=0
fi
if [[ ${status} -eq 0 && ${publish_status} -ne 0 ]]; then
status=${publish_status}
fi