omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / research / atemporal / at1 / evaluator / run.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 |
| 3 | # Copyright 2026 Drake Stapleton (AIEN / aien-dev) |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | # AT-1 Agent 4 qualification run (POSIX sh; Linux and macOS). |
| 18 | # sh run.sh '<engine command>' '<oracle command>' [cases-dir] [out-dir] [hidden-dir] |
| 19 | # Each command is a template: {case} is replaced by the case file path and |
| 20 | # {out} by the result file to write (without {out}, standard output is used). |
| 21 | # Example: sh run.sh '../model/build/at1-engine {case} {out}' '../oracle/build/at1-oracle {case} {out}' |
| 22 | # out-dir defaults to build/qualify (git-ignored), so a run leaves the tree clean. |
| 23 | # hidden-dir (only after the candidate freeze): the revealed hidden .case files and |
| 24 | # nothing else; their commitment must equal HIDDEN_COMMITMENT.txt before they are run. |
| 25 | # Exit 0 only when every step passes. |
| 26 | set -eu |
| 27 | cd "$(dirname "$0")" |
| 28 | ENGINE=${1:?engine command template required} |
| 29 | ORACLE=${2:?oracle command template required} |
| 30 | CASES=${3:-cases} |
| 31 | OUT=${4:-build/qualify} |
| 32 | HIDDEN=${5:-} |
| 33 | make -s all |
| 34 | mkdir -p build |
| 35 | ./build/at1-eval corpus-check cases |
| 36 | ./build/at1-eval selftest > build/selftest.txt || { cat build/selftest.txt; echo "SELFTEST FAILED" >&2; exit 1; } |
| 37 | tail -n 1 build/selftest.txt |
| 38 | ./build/at1-eval mutants build/MUTANT_RECEIPT.tsv |
| 39 | cmp build/MUTANT_RECEIPT.tsv results/MUTANT_RECEIPT.tsv |
| 40 | status=0 |
| 41 | ./build/at1-eval qualify --cases "$CASES" --engine "$ENGINE" --oracle "$ORACLE" --out "$OUT" || status=1 |
| 42 | if [ -n "$HIDDEN" ]; then |
| 43 | if [ -e "$HIDDEN/MANIFEST.tsv" ]; then |
| 44 | echo "HIDDEN SET REFUSED: $HIDDEN/MANIFEST.tsv exists; the commitment covers only the .case files" >&2 |
| 45 | exit 1 |
| 46 | fi |
| 47 | want=$(sed -n 's/^commitment //p' HIDDEN_COMMITMENT.txt) |
| 48 | got=$(./build/at1-eval hidden-commit "$HIDDEN" | sed -n 's/^commitment //p') |
| 49 | if [ -z "$got" ] || [ "$want" != "$got" ]; then |
| 50 | echo "HIDDEN COMMITMENT MISMATCH: committed $want, revealed ${got:-none}" >&2 |
| 51 | exit 1 |
| 52 | fi |
| 53 | echo "hidden commitment matches: $got" |
| 54 | ./build/at1-eval qualify --cases "$HIDDEN" --engine "$ENGINE" --oracle "$ORACLE" --out "$OUT-hidden" || status=1 |
| 55 | fi |
| 56 | exit $status |