interplane.Get Omega
Read in your language

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

branch main Branches Tags History

aien-sovereign-core-mv / evidence / motor-chip-20261021 / scripts / stroke8-gate.sh

53 lines · 2661 bytes Raw Blame History
1#!/usr/bin/env bash
2# Stroke gate at N = 8 heads (L312, coordinator 02:22Z "8 conversations at once"), red before green, then
3# the same command at N = 1, 2, 4 for the ms-per-beat ladder. The tool takes the chip lock itself and waits
4# for memory. START=n resumes at step n. Logs: ~/handoffs/motor-stroke8-gate.log, evidence in $E.
5set -u
6B=$HOME/workspace/targets/motor/sc/release/qwen36_stroke_gate
7M=$HOME/models/qwen3.6-35b-a3b-fp8-95a723d0
8G=$HOME/workspace/sc-motor/evidence/q36-host-20261020
9E=$HOME/workspace/sc-motor/evidence/motor-chip-20261021
10LOG=$HOME/handoffs/motor-stroke8-gate.log
11START=${START:-1}
12TAG=${TAG:-stroke8} # output name prefix for the N=8 runs (stroke8-real.json ...)
13PROSE=${PROSE:-gen-chat-prose} # the prose golden (gen-chat-prose2 replaces the one that fails alone)
14P8="$G/gen-p1.json $G/gen-p2.json $G/gen-p3.json $G/gen-p4.json $G/gen-chat-code.json $G/$PROSE.json $G/gen-chat-chat.json $G/gen-chat-review.json"
15say() { echo "$(date -u +%FT%TZ) $*" | tee -a "$LOG"; }
16# run NAME GOLDENS [ENV=VAL ...]: one tool run; retries when the box is crowded (exit 2 + "refusing"). Sets rc.
17run() {
18 local name=$1 goldens=$2; shift 2
19 local try
20 for try in 1 2 3 4 5 6; do
21 env "$@" nice -n 5 "$B" "$M" "$E/$name.json" $goldens > "$E/$name.log" 2>&1; rc=$?
22 if [ $rc -eq 2 ] && grep -q "refusing" "$E/$name.log"; then
23 say "$name attempt $try: memory guard refused ($(grep -m1 'refusing' "$E/$name.log" | cut -c1-120)); retrying"
24 sleep 60; continue
25 fi
26 break
27 done
28 say "$name exit $rc: $(grep -m1 '^QWEN36_STROKE_GATE' "$E/$name.log" | cut -c1-230)"
29}
30for g in $P8; do [ -s "$g" ] || { say "STOP: golden $g missing"; exit 4; }; done
31say "stroke8 gate start bin sha $(sha256sum "$B" | cut -c1-16) START=$START TAG=$TAG PROSE=$PROSE"
32if [ "$START" -le 1 ]; then
33 run $TAG-mutant4 "$P8" AIEN_Q36_TEST_MUTANT=4
34 [ "$rc" -eq 1 ] || { say "STOP: mutant 4 did not go red (exit $rc)"; exit 4; }
35fi
36if [ "$START" -le 2 ]; then
37 run $TAG-swap-control "$P8" AIEN_STROKE_SWAP=control
38 [ "$rc" -eq 1 ] || { say "STOP: swap control did not go red (exit $rc)"; exit 4; }
39fi
40if [ "$START" -le 3 ]; then
41 run $TAG-real "$P8"
42 [ "$rc" -eq 0 ] || { say "STOP: the real N=8 run did not pass (exit $rc)"; exit 4; }
43fi
44if [ "$START" -le 4 ]; then
45 run $TAG-swap-feature "$P8" AIEN_STROKE_SWAP=feature
46 [ "$rc" -eq 0 ] || { say "STOP: swap feature did not pass (exit $rc)"; exit 4; }
47fi
48if [ "$START" -le 5 ]; then
49 run stroke1-real "$G/gen-p1.json"
50 run stroke2-real "$G/gen-p1.json $G/gen-p2.json"
51 run stroke4-real "$G/gen-p1.json $G/gen-p2.json $G/gen-p3.json $G/gen-p4.json"
52fi
53say "stroke8 gate done"