Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-protocols-mv/blob/main/evidence/aienet0-20261028/host-checks.sh # aien-protocols-mv Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-protocols-mv / evidence / aienet0-20261028 / host-checks.sh` 72 lines ยท 2946 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # Host-only checks behind the Aienet-0 job path evidence (HOST_TESTED, Spark). 3 # usage: host-checks.sh OMC OMEGA_MV OH_TREE CORE_TREE 4 # OMC pinned omc (sha256 `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`) 5 # OMEGA_MV omega-mv checkout holding the pinned OM-2 SHA-256 unit 6 # OH_TREE open-humanity checkout at feat/aienet0-mjb1-carrier 7 # CORE_TREE aien-sovereign-core-mv checkout holding ref pr662 (Core PR #662) 8 # Writes build/parity/mutants/xcheck logs next to this script. Exit 0 only 9 # when every step passes. 10 set -u -o pipefail 11 omc=${1:?} mv=${2:?} oh=${3:?} core=${4:?} 12 here=$(cd "$(dirname "$0")" && pwd) 13 root=$(cd "$here/../.." && pwd) 14 jp=$root/specs/aienet/jobpath 15 work=$(mktemp -d) 16 trap 'rm -rf "$work"' EXIT 17 fail=0 18 step() { # NAME CMD... : run, log to NAME.log, record rc 19 local name=$1 20 shift 21 { echo "\$ $*"; "$@"; } >"$here/$name.log" 2>&1 22 local rc=$? 23 echo "$name rc=$rc" | tee -a "$here/host-checks.rc" 24 [[ $rc == 0 ]] || fail=1 25 } 26 : >"$here/host-checks.rc" 27 bin=$work/matmul_u32_recompute 28 step build env OMEGA_OMC="$omc" OMEGA_MV="$mv" "$jp/build.sh" "$bin" 29 sha256sum "$bin" | sed "s|$work/||" >"$here/recompute.sha256" 30 step parity "$jp/parity.sh" "$bin" 31 step mutants-protocols env OMEGA_MV="$mv" "$jp/mutants.sh" "$omc" 32 step mutants-open-humanity "$oh/scripts/aienet0/mutants.sh" "$work/oh-mutants" 33 mkdir -p "$here/mutants-open-humanity" 34 cp "$work"/oh-mutants/*.diff "$here/mutants-open-humanity/" 35 for d in "$work"/oh-mutants/*.controls; do 36 [[ -f $d/summary.tsv ]] && cp "$d/summary.tsv" "$here/mutants-open-humanity/$(basename "$d").summary.tsv" 37 done 38 39 # Three-way agreement: Core #662 task.rs (oracle and run) vs the Rust worker 40 # kernel (aien-microjob) vs the Omega recompute, on the same payloads. 41 mkdir -p "$work/x/src" 42 cp "$here/xcheck662/Cargo.toml" "$work/x/" 43 cp "$here/xcheck662/main.rs" "$work/x/src/" 44 git -C "$core" show pr662:crates/aien-hetjob/src/task.rs >"$work/x/src/task.rs" 45 { 46 echo "core pr662 $(git -C "$core" rev-parse pr662)" 47 echo "task.rs sha256 $(sha256sum <"$work/x/src/task.rs" | cut -c1-64)" 48 } >"$here/xcheck662.pins" 49 (cd "$root" && cargo build -q -p aien-microjob --example an0_digest) 50 ex=$root/target/debug/examples/an0_digest 51 xcheck() { 52 (cd "$work/x" && cargo build -q --release) || return 1 53 local agree=0 bad=0 54 while read -r m k n seed; do 55 read -r payload rust < <("$ex" "$m" "$k" "$n" "$seed") 56 om=$(printf '%s' "$payload" | xxd -r -p | "$bin" | tr -d '\n') 57 core=$(echo "$payload" | "$work/x/target/release/xcheck662") 58 if [[ $rust == "$om" && $om == "$core" ]]; then v=AGREE; agree=$((agree + 1)); else v=DISAGREE; bad=$((bad + 1)); fi 59 echo "$m $k $n $seed core662=$core rust=$rust omega=$om $v" 60 done <<'EOF' 61 1 1 1 0 62 2 3 4 7 63 64 64 64 `1311768467463790320` 64 64 64 64 `2716205057` 65 128 64 32 99 66 256 256 256 `2716205057` 67 EOF 68 echo "agree=$agree disagree=$bad" 69 [[ $bad == 0 ]] 70 } 71 step xcheck662 xcheck 72 exit $fail