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-architecture-mv/blob/main/tools/doctrine/gate.sh # aien-architecture-mv Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories. 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-architecture-mv / tools / doctrine / gate.sh` 19 lines ยท 854 bytes Raw Blame History 1 #!/bin/sh 2 # Bootstrap trust boundary: authenticate AIEN_OMC independently before executing it. 3 # Fixture judgments remain in gate.om; the compiler cannot authenticate itself. 4 set -eu 5 root="${1:?usage: gate.sh ROOT}" 6 cd "$(dirname "$0")" 7 not_run() { echo "gate.sh: AIEN_OMC is unavailable or not independently pinned (NOT_RUN)" >&2; exit 3; } 8 [ -n "${AIEN_OMC:-}" ] && [ -x "$AIEN_OMC" ] || not_run 9 want=$(sed -n 's/^omc_sha256: //p' ../zero-legacy/omega.pin) || not_run 10 [ "${#want}" -eq 64 ] || not_run 11 case "$want" in *[!0-9a-f]*) not_run ;; esac 12 have=$(sha256sum -- "$AIEN_OMC") || not_run 13 have=${have%% *} 14 [ "$have" = "$want" ] || not_run 15 mkdir -p build 16 "$AIEN_OMC" < gate.om > build/gate 17 chmod +x build/gate 18 [ -s build/gate ] || { echo "gate.sh: AIEN_OMC produced no program from gate.om (NOT_RUN)" >&2; exit 3; } 19 exec build/gate "$AIEN_OMC" "$root"