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/cortex-rs/blob/main/om/gate.sh # cortex-rs Pure compiled native Rust memory engine with vector search and SQLite WAL 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 `cortex-rs / om / gate.sh` 31 lines ยท 1333 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 cortex_server \ 19 om/om2.om om/f64.om om/uni_rust.om om/json.om om/crc32c.om om/uni_fts.om om/flog.om om/fts.om \ 20 om/like.om om/http.om om/store.om om/log.om om/api.om om/api2.om om/api3.om om/qs.om om/enc.om \ 21 om/de.om om/brain.om om/srv.om om/main.om 22 23 build_det cortex_import om/om2.om om/crc32c.om om/sqlite.om om/import_main.om 24 25 # Negative control: missing/bad CLI usage must exit nonzero cleanly (no crash) 26 if "$SCR/cortex_import.1" >/dev/null 2>&1; then 27 echo "FAIL cortex_import accepted empty args" 28 exit 1 29 fi 30 echo "CONTROL_OK cortex_import refused missing args" 31 echo "CORTEX-OM-GATE PASS"