api/checkpoint: bind the row the hand merge dropped (every caller read "cp is not defined" from 12:23 BST); the site deploy asserts api/checkpoint?source=dn3 ok on igneum-devnet-3 and the reference-apps pages

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-08 11:23:41 +00:00
parent 93e211bfba
commit 53202510e3

View file

@ -18,7 +18,7 @@ LIVE_NETWORK="${LIVE_NETWORK:-igneum-devnet-3}"
INDEX_STRINGS=("At launch the strongest chip in our public model" "git.igneum.network/igneum-network/")
LEGAL_PAGE="${LEGAL_PAGE:-/litepaper}"; LEGAL_STRING="Not legal advice" # the legal line lives on the litepaper in master's tree (22:16 UK: no commit put it on the index)
MINERS_MIN_ROWS="${MINERS_MIN_ROWS:-20}" # the current-class table alone (the datacentre rows sit in their own table since 8 Oct 2026)
SERVED_PAGES=(swap "faucet|Devnet 3 faucet" "build|Built to prove every block" "grants|Not legal advice.") # clean URLs every deploy must answer 200 (8 Oct 2026: the DEX lane's /swap, the builder lane's /faucet; /light /receipt /oracle /build /grants join as they land)
SERVED_PAGES=(swap "faucet|Devnet 3 faucet" "build|Built to prove every block" "grants|Not legal advice." proving tx/0x0 "light|<title>" "receipt|<title>" "oracle|<title>" "lc/test|<title>" lc/app.js lc/core.js lc/verify-receipt.js) # clean URLs every deploy must answer 200 (8 Oct 2026: the DEX lane's /swap, the builder lane's /faucet; /light /receipt /oracle /build /grants join as they land)
SITE="${SITE_URL:-https://igneum.network}"
# the /miners row count: the rows of the current-class table (table#bench-current, the regrouped bench of 8 Oct 2026; the datacentre
# and earlier tables sit under their own ids); known-failed: an empty table reads 0
@ -52,7 +52,10 @@ post_checks() { # one pass: prints the first mismatch as "field: detail" and ret
[ "$code" = 200 ] || { echo "page /$path: HTTP $code (want 200)"; return 1; }
[ -z "$want" ] || printf '%s' "$body" | /usr/bin/grep -cF -- "$want" >/dev/null || { echo "page /$path: string missing: \"$want\""; return 1; }
done
echo "ok: api/live $n, ${#INDEX_STRINGS[@]} index strings, the legal line on $LEGAL_PAGE, $rows miners rows, ${#SERVED_PAGES[@]} pages 200"
# the certified-checkpoint API (the receipt, the light wallet and the explorer's per-block re-check read it): ok:true on Devnet 3
local ckp; ckp=$(curl -fsS "${nc[@]}" --max-time 25 "$SITE/api/checkpoint?source=dn3&x=$RANDOM" 2>/dev/null) || { echo "api/checkpoint: not reachable"; return 1; }
printf '%s' "$ckp" | python3 -c 'import sys,json; d=json.load(sys.stdin); sys.exit(0 if d.get("ok") is True and d.get("network")=="igneum-devnet-3" else 1)' 2>/dev/null || { echo "api/checkpoint?source=dn3: $(printf '%s' "$ckp" | head -c 120)"; return 1; }
echo "ok: api/live $n, ${#INDEX_STRINGS[@]} index strings, the legal line on $LEGAL_PAGE, $rows miners rows, ${#SERVED_PAGES[@]} pages 200, checkpoint ok"
}
if [ "${1:-}" = --self-test-checks ]; then
# known-failed first: a network constant the live site cannot carry must read RED with the field; then the live read as it stands