the smoke gate waits for the engine's async ban, and the AOT probe reports instead of dying
ci / lint the workflow and the shell (push) Successful in 7s
ci / build, test, smoke (push) Successful in 1m35s
ci / the operator page in a real browser (push) Successful in 2m27s
ci / the same smoke on an image with no base (push) Successful in 4m18s
ci / build the image and smoke it (push) Successful in 4m19s

Run 2500 went red on one assertion — `the two bans the edge wrote are inside one
block: expected 2, got 0` — while the same code was green at 149b2c0 (run 2482).
The engine's bans leave the request path through the durable writer, so the
listing is eventually consistent, and this host had a load average over 100 while
the writer had not run yet. The count is now polled until it answers twice,
bounded at 20 s, so a ban that never arrives still fails the gate. Locally after
the change: passed 256, failed 0.

Run 2501 is the x86-64 half of the AOT measurement and its gate passed there:
RID linux-musl-x64, `binary bytes: 56351320`, `file says: … x86-64 … static-pie
linked, stripped`, `program headers naming an interpreter: 0`, `NEEDED shared
objects: 0`, `image size: 94.5MB`. The job still went red one step later, on the
reporting step: `grep -c` exits 1 when it matches nothing, and a zero count of
refused queries is a finding rather than a step failure. Both greps now report
instead of aborting.
This commit is contained in:
Pavlo Ratushnyi
2026-10-06 09:25:14 +02:00
parent d08ec30e0a
commit 5278eb4ac2
2 changed files with 26 additions and 6 deletions
+7 -3
View File
@@ -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
+19 -3
View File
@@ -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'))")"