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/aegis-runtime-mv/blob/main/om/gate.sh # aegis-runtime-mv Native Rust agent runtime: Axum WebSocket/SSE/REST gateway, heartbeat scheduler, dependency-aware task workflow, SQLite storage. Attachment of AienOS. Pre-alpha. 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 `aegis-runtime-mv / om / gate.sh` 34 lines ยท 1667 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 aegis_test om/om2.om om/sha2.om om/dag.om om/heartbeat.om om/policy.om om/journal.om om/gateway.om om/test.om 19 "$SCR/aegis_test.1" 20 21 build_det aegis_main om/om2.om om/sha2.om om/dag.om om/heartbeat.om om/policy.om om/journal.om om/gateway.om om/main.om 22 printf "INIT 4 10 5\nTOKEN aegis_operator_secret_token_012345\nREQ GET /health -\nVERIFY\nQUIT\n" | "$SCR/aegis_main.1" 23 24 # Planted mutant control: weaken unconfigured-token refusal -> aegis_test MUST fail 25 sed "s/ret POL_DENY_NO_TOKEN_CONFIG/ret POL_ALLOW/" om/policy.om > "$SCR/policy_mut.om" 26 cat om/om2.om om/sha2.om om/dag.om om/heartbeat.om "$SCR/policy_mut.om" om/journal.om om/gateway.om om/test.om > "$SCR/mut.om" 27 "$OMC" < "$SCR/mut.om" > "$SCR/mut.bin" || { echo "FAIL mutant failed to compile"; exit 1; } 28 chmod +x "$SCR/mut.bin" 29 if "$SCR/mut.bin" >/dev/null 2>&1; then 30 echo "FAIL mutant escaped" 31 exit 1 32 fi 33 echo "MUTANT_CAUGHT policy_bypass_refused" 34 echo "AEGIS-OM-GATE PASS"