diff --git a/.github/workflows/aot-probe.yml b/.github/workflows/aot-probe.yml index 6b1c02c..a2d67cd 100644 --- a/.github/workflows/aot-probe.yml +++ b/.github/workflows/aot-probe.yml @@ -80,8 +80,12 @@ jobs: "$IMAGE" >/dev/null sleep 20 docker inspect --format 'container state: {{.State.Status}} health: {{if .State.Health}}{{.State.Health.Status}}{{else}}no healthcheck{{end}}' aotprobe - docker logs aotprobe 2>&1 | grep -m1 -E 'Hosting failed to start|unable to start|DllNotFoundException|Dynamic loading not supported|queries refused' \ - || echo 'no startup failure line found — that would be news worth reading' - docker logs aotprobe 2>&1 | grep -c "Query wasn't precompiled and dynamic code isn't supported with NativeAOT" \ + # `|| true` on both greps: grep exits 1 when it matches nothing, and a + # zero count is a finding, not a step failure. Measured on run 2501, + # where the reporting step died on exactly that while the static-link + # gate above it had already passed (56,351,320-byte static-pie x86-64 + # binary, 0 interpreters, 0 NEEDED, 94.5 MB image). + docker logs aotprobe 2>&1 | { grep -m1 -E 'Hosting failed to start|DllNotFoundException|Dynamic loading not supported' || echo 'no startup failure line found — that would be news worth reading'; } + docker logs aotprobe 2>&1 | { grep -c "Query wasn't precompiled and dynamic code isn't supported with NativeAOT" || true; } \ | sed 's/^/queries refused at run time: /' docker rm -f aotprobe >/dev/null 2>&1 diff --git a/scripts/smoke.sh b/scripts/smoke.sh index f918af5..a11e2cc 100755 --- a/scripts/smoke.sh +++ b/scripts/smoke.sh @@ -620,9 +620,25 @@ for src in "$NET_A" "$NET_B"; do code -H "X-Forwarded-For: $src" "$(from wp-admin)" >/dev/null code -H "X-Forwarded-For: $src" "$(from wp-admin)" >/dev/null done -check 'the two bans the edge wrote are inside one block' 2 \ - "$(curl -s -H "X-Admin-Token: $TOKEN" "http://127.0.0.1:$EDGE_PORT/admin-api/blocks?source=engine" \ - | python3 -c "import sys,json;print(len([b for b in json.load(sys.stdin) if b['sourceKey'].startswith('203.0.113.2')]))")" +# Polled, not sampled once. The engine's bans leave the request path through the +# durable writer, so the listing is eventually consistent: measured on the runner +# at d08ec30 (run 2500) this read 0 and the gate went red, while the same code +# read 2 at 149b2c0 (run 2482) — the host's load average was over 100 and the +# writer had not run yet. An assertion on one instant of an async write is not a +# contract; the bound is, so a ban that never arrives still fails. +engine_bans_in_range() { + local seen=0 _ + for _ in $(seq 1 40); do + seen=$(curl -s -H "X-Admin-Token: $TOKEN" \ + "http://127.0.0.1:$EDGE_PORT/admin-api/blocks?source=engine" \ + | python3 -c "import sys,json;print(len([b for b in json.load(sys.stdin) if b['sourceKey'].startswith('203.0.113.2')]))" \ + 2>/dev/null || printf 0) + [ "$seen" = 2 ] && break + sleep 0.5 + done + printf '%s' "$seen" +} +check 'the two bans the edge wrote are inside one block' 2 "$(engine_bans_in_range)" check 'the edge offers that block as a range' "$NET_RANGE" \ "$(curl -s -H "X-Admin-Token: $TOKEN" "http://127.0.0.1:$EDGE_PORT/admin-api/netblocks" \ | python3 -c "import sys,json;print(next(n['match'] for n in json.load(sys.stdin)['netblocks'] if n['match']=='$NET_RANGE'))")"