From dc118f66f0b99776531d9341c352694ca87fae67 Mon Sep 17 00:00:00 2001 From: scanner Date: Sun, 11 Oct 2026 20:28:39 -0400 Subject: [PATCH] fix(ci): keep availability probe's ::error:: annotation on curl transport failures Under Actions' default `bash -eo pipefail`, a curl exit code from a DNS, TLS or timeout failure propagated through `status=$(curl ...)` and aborted the step before the `::error::` line ran. The job still went red, but without the annotation runbooks/availability-failure.md tells responders to read first ("a connection or TLS error (no status) points at DNS, certificate or network"). Guard the substitution with `|| true`, the same shape scripts/check-links.sh already uses, so --write-out's 000 reaches the != 200 test and the annotation is emitted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner --- .github/workflows/links.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index c2baf94..99de0fd 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -31,9 +31,12 @@ jobs: https://hivecommons.dev/llms.txt https://hivecommons.dev/sitemap.xml \ https://hivecommons.dev/robots.txt \ https://hivecommons.dev/404.html; do + # `|| true` keeps a curl transport failure (DNS, TLS, timeout) from + # tripping `set -e` before the ::error:: line below is printed; + # --write-out still yields 000 in that case, which fails the != 200 test. status=$(curl --silent --show-error --output /dev/null \ --write-out '%{http_code}' --connect-timeout 10 --max-time 30 \ - --retry 2 --retry-delay 5 "$url") + --retry 2 --retry-delay 5 "$url" || true) if [[ "$status" != 200 ]]; then echo "::error::Live page $url returned HTTP $status (expected 200)" exit 1