interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / research / atemporal / at1 / evaluator / run.sh

56 lines · 2595 bytes Raw Blame History
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.
26set -eu
27cd "$(dirname "$0")"
28ENGINE=${1:?engine command template required}
29ORACLE=${2:?oracle command template required}
30CASES=${3:-cases}
31OUT=${4:-build/qualify}
32HIDDEN=${5:-}
33make -s all
34mkdir -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; }
37tail -n 1 build/selftest.txt
38./build/at1-eval mutants build/MUTANT_RECEIPT.tsv
39cmp build/MUTANT_RECEIPT.tsv results/MUTANT_RECEIPT.tsv
40status=0
41./build/at1-eval qualify --cases "$CASES" --engine "$ENGINE" --oracle "$ORACLE" --out "$OUT" || status=1
42if [ -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
55fi
56exit $status