From 830b77af1803c6b57e2c528f78bf63e059bb8bb9 Mon Sep 17 00:00:00 2001 From: archipelago Date: Wed, 5 Aug 2026 13:05:42 -0400 Subject: [PATCH] =?UTF-8?q?fix(13-09):=20verify-aiui-deploy=20false-negati?= =?UTF-8?q?ve=20=E2=80=94=20pipefail=20EPIPEs=20curl=20on=20grep=20-q=20ea?= =?UTF-8?q?rly=20exit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit curl | grep -q under set -o pipefail: grep's first-match exit EPIPEs curl (exit 23) whenever the marker precedes the tail of a >64KB chunk, so a genuine deploy read as FAIL (bit during 13-08's AIUI redeploy — marker at 27% of a 416KB chunk failed 3/3 runs). Fetch to a temp file, then grep. Negative control still fails as it should. Co-Authored-By: Claude Fable 5 --- scripts/verify-aiui-deploy.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/verify-aiui-deploy.sh b/scripts/verify-aiui-deploy.sh index 11476d32..e0204209 100755 --- a/scripts/verify-aiui-deploy.sh +++ b/scripts/verify-aiui-deploy.sh @@ -63,11 +63,17 @@ echo "$(timestamp) Resolved ${#LIVE_PATHS[@]} live chunk(s) from the precache ma FOUND=0 CHECKED=0 +# Fetch to a temp file and grep that, NOT `curl | grep -q`: under this +# script's pipefail, grep -q's early exit EPIPEs curl (exit 23) whenever +# the marker sits before the tail of a >64KB chunk, turning a genuine +# match into a nondeterministic FAIL. +BODY_TMP="$(mktemp)" +trap 'rm -f "$BODY_TMP"' EXIT for path in "${LIVE_PATHS[@]}"; do [ -z "$path" ] && continue CHECKED=$((CHECKED + 1)) url="${BASE}/aiui/${path}" - if curl -sf -m 15 "$url" 2>/dev/null | grep -q -- "$MARKER"; then + if curl -sf -m 15 -o "$BODY_TMP" "$url" 2>/dev/null && grep -q -- "$MARKER" "$BODY_TMP"; then echo "$(timestamp) MATCH: $path" FOUND=1 break