From 2171f8ea3b9943cf34630ecbd2fe7110984c6d6e Mon Sep 17 00:00:00 2001 From: pat-s Date: Mon, 31 Aug 2026 10:26:09 +0000 Subject: [PATCH] test(verify): follow redirects and bypass the edge cache Two ways the harness lied about what it was measuring. The router answers an index request with a redirect, and fetch() did not pass -L, so a --live byte comparison compared against a 302 body rather than the index a client ends up with. A purge is asynchronous, so a run started right after a reindex read whatever the edge still held. That produced a phantom '161 regressions' on amd64/alpine323 whose PACKAGES.rds was already correct - the .gz was simply a stale copy, and re-measuring after the purge settled showed zero. A verification tool that races the thing it verifies is worse than no tool. --- scripts/verify-r-minor-routing.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/verify-r-minor-routing.sh b/scripts/verify-r-minor-routing.sh index 3957f67..a38e0ed 100755 --- a/scripts/verify-r-minor-routing.sh +++ b/scripts/verify-r-minor-routing.sh @@ -104,10 +104,12 @@ fetch() { return 0 fi local status + # -L: the router answers an index request with a redirect, so the bytes a + # client ends up with are only visible by following it. if [ -n "$ua" ]; then - status=$(curl -sS -A "$ua" -o "$dest" -w '%{http_code}' --max-time 120 "$url" 2>/dev/null) + status=$(curl -sSL -A "$ua" -o "$dest" -w '%{http_code}' --max-time 120 "$url" 2>/dev/null) else - status=$(curl -sS -o "$dest" -w '%{http_code}' --max-time 120 "$url" 2>/dev/null) + status=$(curl -sSL -o "$dest" -w '%{http_code}' --max-time 120 "$url" 2>/dev/null) fi echo "$status" > "$dest.status" echo "$status"