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 / evidence / M18-UNCACHED / b20ff9e / runjob.sh

36 lines · 1535 bytes Raw Blame History
1#!/bin/bash
2# runjob.sh RUN_NAME REPS "gate args..." [more "gate args..."]
3# Runs build/omegatool with each arg string, REPS times, in the omega worktree (cwd).
4# Immutable: refuses an existing run dir. Never times out or kills the job.
5set -u
6EV="$HOME/workspace/evidence-out/M18-UNCACHED-20261003"
7PHYS="$HOME/workspace/hive-worktrees/qual-physics-6d7cf0d"
8RUN="$EV/$1"; REPS="$2"; shift 2
9[ -e "$RUN" ] && { echo "run dir exists: $RUN" >&2; exit 2; }
10mkdir -p "$RUN"
11git rev-parse HEAD > "$RUN/omega-head.txt"
12git -C "$PHYS" rev-parse HEAD > "$RUN/physics-head.txt"
13git status --short > "$RUN/git-status-before.txt"
14sha256sum build/omegatool > "$RUN/omegatool.sha256"
15date -u +%FT%TZ > "$RUN/started.txt"
16overall=0
17for r in $(seq 1 "$REPS"); do
18 for args in "$@"; do
19 tag=$(echo "$args" | tr -c 'A-Za-z0-9\n' '_')
20 log="$RUN/rep$r-$tag.log"
21 echo "### rep=$r cmd=build/omegatool $args" > "$log"
22 build/omegatool $args >> "$log" 2>&1
23 rc=$?
24 echo "rep=$r args=$args rc=$rc" >> "$RUN/exit-codes.txt"
25 echo "### exit=$rc" >> "$log"
26 [ $rc -ne 0 ] && overall=1
27 done
28done
29git status --short > "$RUN/git-status-after.txt"
30mkdir -p "$RUN/receipts"
31git status --short | awk '{print $2}' | while read -r p; do [ -e "$p" ] && cp -r --parents "$p" "$RUN/receipts/" 2>/dev/null; done
32git checkout -- . ; git clean -fdq -e build
33echo "$overall" > "$RUN/exit.txt"
34date -u +%FT%TZ > "$RUN/finished.txt"
35( cd "$RUN" && find . -type f ! -name SHA256SUMS -print0 | sort -z | xargs -0 sha256sum > SHA256SUMS )
36exit $overall