aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / evidence / q36-batch-20261021 / run-gate.sh
| 1 | #!/bin/bash |
| 2 | # L354 chip gate runner (detached). Each test server loads under q36-extra (serve-batch.sh: one extra 35B at a |
| 3 | # time beside 18091, it waits in line), then: real batch door on 18089 -> gate-batch.sh real (must PASS); row-swap mutant |
| 4 | # (AIEN_Q36_TEST_ROW_SWAP=40) -> gate-batch.sh swap40 (must FAIL). Log run-gate.log, result run-gate-$PORT.result. |
| 5 | set -u |
| 6 | D=$(cd "$(dirname "$0")" && pwd); cd "$D"; S=$HOME/.local/state/aien-q36; SHA=${1:-8b5e95bb}; SLOTS=${2:-32}; export PORT=${PORT:-18089} |
| 7 | log() { echo "$(date -u +%FT%TZ) $*" >> run-gate.log; } |
| 8 | up() { for i in $(seq 1 1000); do curl -s -m 5 http://127.0.0.1:$PORT/v1/models | grep -q '"id"' && return 0; kill -0 $(cat $S/batch-$PORT.pid) 2>/dev/null || return 1; sleep 5; done; return 1; } |
| 9 | down() { local p=$(cat $S/batch-$PORT.pid); ps -o args= -p $p | grep -q "port $PORT" && kill $p; for i in $(seq 1 30); do ps -p $p >/dev/null || break; sleep 2; done; log "stopped $p"; } |
| 10 | run() { # <label> <want rc> [env] |
| 11 | local label=$1 want=$2; shift 2 |
| 12 | for t in 1 2 3; do |
| 13 | log "$label: start ($*)"; env "$@" ./serve-batch.sh $SHA $SLOTS 2048 $label >> run-gate.log 2>&1 |
| 14 | if ! up; then log "$label: server did not come up: $(tail -1 $S/batch-$PORT.log | cut -c1-300)"; down; sleep 60; continue; fi |
| 15 | ./gate-batch.sh 18091 $PORT $label >> run-gate.log 2>&1; rc=$?; down |
| 16 | [ $rc = 2 ] && { log "$label: no verdict, retry"; sleep 60; continue; } |
| 17 | log "$label: rc $rc (want $want)"; echo "$label rc=$rc want=$want" >> run-gate-$PORT.result; return 0 |
| 18 | done |
| 19 | echo "$label rc=2 want=$want (no verdict after 3 tries)" >> run-gate-$PORT.result |
| 20 | } |
| 21 | log "runner start (bin-$SHA, $SLOTS slots)" |
| 22 | run real$SLOTS 0 |
| 23 | [ "${SWAP:-1}" = 1 ] && run swap40-$SLOTS 1 AIEN_Q36_TEST_ROW_SWAP=40 |
| 24 | log "done"; echo done >> run-gate-$PORT.result |