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/spark-rsi-mv/blob/main/om/gate.sh # spark-rsi-mv Native Rust recursive self-improvement engine with paired bootstrap evaluation and cryptographic ledger 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 `spark-rsi-mv / om / gate.sh` 40 lines ยท 1834 bytes Raw Blame History 1 #!/bin/sh 2 set -eu 3 OMC="${OMC:-/home/drakestapleton/canon/omega-mv/seed/out/omc}" 4 [ -x "$OMC" ] || { echo "NOT_RUN: set OMC to seed/out/omc"; exit 3; } 5 SCR=$(mktemp -d) 6 trap "rm -rf $SCR" EXIT 7 8 build_det() { 9 name=$1; shift 10 cat "$@" > "$SCR/$name.om" 11 "$OMC" < "$SCR/$name.om" > "$SCR/$name.1" 2> "$SCR/$name.err" || { echo "FAIL compile $name"; cat "$SCR/$name.err"; exit 1; } 12 "$OMC" < "$SCR/$name.om" > "$SCR/$name.2" 2>> "$SCR/$name.err" || { echo "FAIL compile2 $name"; exit 1; } 13 cmp -s "$SCR/$name.1" "$SCR/$name.2" || { echo "FAIL nondeterministic $name"; exit 1; } 14 chmod +x "$SCR/$name.1" 15 echo "BUILD_OK $name bytes=$(wc -c < "$SCR/$name.1") sha256=$(sha256sum "$SCR/$name.1" | awk "{print \$1}")" 16 } 17 18 build_det rsi_gov_test om/om2.om om/governance/promotion_gate.om om/tls/sha2.om om/governance/ledger.om om/governance/test.om 19 "$SCR/rsi_gov_test.1" 20 21 build_det rsi_eval_test om/om2.om om/eval/evaluator.om om/tls/sha2.om om/eval/canary.om om/eval/rollback.om om/eval/eval_test.om 22 "$SCR/rsi_eval_test.1" 23 24 build_det rsi_v2_test om/p256/sha256.om om/p256/p256.om om/governance/receipt_v2.om om/governance/v2_test.om 25 "$SCR/rsi_v2_test.1" 26 27 build_det rsi_v2_gate om/p256/sha256.om om/p256/p256.om om/governance/receipt_v2.om om/governance/v2_main.om 28 "$SCR/rsi_v2_gate.1" version 29 "$SCR/rsi_v2_gate.1" selfcheck 30 31 # Planted mutant control: weaken format_version == 2 guard -> v2_test MUST fail 32 sed "s/if ne get rv2_meta 0 2/if eq get rv2_meta 0 99/" om/governance/receipt_v2.om > "$SCR/receipt_v2_mut.om" 33 cat om/p256/sha256.om om/p256/p256.om "$SCR/receipt_v2_mut.om" om/governance/v2_test.om > "$SCR/mut.om" 34 "$OMC" < "$SCR/mut.om" > "$SCR/mut.bin" && chmod +x "$SCR/mut.bin" 35 if "$SCR/mut.bin" >/dev/null 2>&1; then 36 echo "FAIL mutant escaped" 37 exit 1 38 fi 39 echo "MUTANT_CAUGHT v1_bypass_refused" 40 echo "SPARK-RSI-OM-GATE PASS"