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/open-humanity/blob/main/om/gate.sh # open-humanity Privacy-first peer assistance network for sovereign autonomous agents 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 `open-humanity / om / gate.sh` 41 lines ยท 1848 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 oh_test om/om2.om om/lib.om om/test.om 19 "$SCR/oh_test.1" 20 21 build_det oh_main om/om2.om om/lib.om om/main.om 22 printf "OPTIN 1\nNOW 1000\nDISTRESS 1 42 1 0 1000 60000 0 compiler err 404\nAUDIT\n" | "$SCR/oh_main.1" 23 24 build_det oh_tc_test om/om2.om om/lib.om om/sha512.om om/`ed25519`.om om/trace_contract.om om/trace_contract_test.om 25 "$SCR/oh_tc_test.1" 26 27 build_det oh_trace_recv om/om2.om om/lib.om om/sha512.om om/`ed25519`.om om/trace_contract.om om/trace_receiver_main.om 28 "$SCR/oh_trace_recv.1" version 29 "$SCR/oh_trace_recv.1" selfcheck 30 "$SCR/oh_trace_recv.1" wire-check 31 32 # Planted mutant control: disable zero-authority cap_flags check -> trace_contract_test MUST fail 33 sed "s/if ne oh_get_u64_le cbuf 88 0/if eq oh_get_u64_le cbuf 88 999999/" om/trace_contract.om > "$SCR/tc_mut.om" 34 cat om/om2.om om/lib.om om/sha512.om om/`ed25519`.om "$SCR/tc_mut.om" om/trace_contract_test.om > "$SCR/mut.om" 35 "$OMC" < "$SCR/mut.om" > "$SCR/mut.bin" && chmod +x "$SCR/mut.bin" 36 if "$SCR/mut.bin" >/dev/null 2>&1; then 37 echo "FAIL mutant escaped" 38 exit 1 39 fi 40 echo "MUTANT_CAUGHT zero_authority_bypass_refused" 41 echo "OPEN-HUMANITY-OM-GATE PASS"