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/omega-mv/blob/main/tests/one_layer/generalization/dev/pack_dev.sh # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tests / one_layer / generalization / dev / pack_dev.sh` 29 lines ยท 2026 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # tests/one_layer/generalization/dev/pack_dev.sh -- pack and seal the PUBLIC GEN dev fixtures 3 # devgen01..devgen10 (aien-spark/omega#476) into /tasks.tar + /TASKS.sha256, exactly the 4 # held-out layout of tests/one_layer/acceptance/HARNESS_INTERFACE_V2.md section 3. Same steps as 5 # tests/one_layer/exp445/pack_dev.sh (which packs only its own directory, so it cannot be called here): 6 # first every hidden/expected is checked against gen_expected.c (computed from the prompts, independently 7 # of reference.osc; a mismatch refuses), and the case directories must be exactly the task ids of META. 8 # Reproducible bytes (ustar, sorted, owner 0, mtime 0). META stays OUTSIDE the tarball (member rules). 9 # Then: tests/one_layer/acceptance/ola.sh tasks-check /tasks.tar /TASKS.sha256 10 set -euo pipefail 11 HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 12 OUT="${1:?usage: pack_dev.sh }" 13 mkdir -p "$OUT"; OUT="$(realpath -e "$OUT")" 14 T="$(mktemp -d "${TMPDIR:-/tmp}/gen-pack.XXXXXXXX")"; trap 'rm -rf "$T"' EXIT 15 ${CC:-cc} -std=gnu11 -Wall -Wextra -Werror -O2 -o "$T/gen" "$HERE/gen_expected.c" 16 awk '!/^#/ && NF && $0 != "gen-meta 1" { print $1 }' "$HERE/META" | LC_ALL=C sort > "$T/meta.ids" 17 (cd "$HERE/tasks/cases" && ls -1) | LC_ALL=C sort > "$T/case.ids" 18 cmp -s "$T/meta.ids" "$T/case.ids" || { echo "pack_dev: META task ids differ from tasks/cases/" >&2; exit 1; } 19 n=0 20 for c in "$HERE"/tasks/cases/*/; do 21 id="$(basename "$c")" 22 "$T/gen" "$id" < "$c/hidden/inputs" > "$T/exp" 23 cmp -s "$T/exp" "$c/hidden/expected" || { echo "pack_dev: $id hidden/expected differs from gen_expected" >&2; exit 1; } 24 n=$((n + 1)) 25 done 26 (cd "$HERE" && tar --format=ustar --sort=name --owner=0 --group=0 --numeric-owner --mtime=@0 -cf "$OUT/tasks.tar.tmp" tasks) 27 mv "$OUT/tasks.tar.tmp" "$OUT/tasks.tar" 28 (cd "$OUT" && sha256sum tasks.tar > TASKS.sha256.tmp && mv TASKS.sha256.tmp TASKS.sha256) 29 echo "pack_dev: $n dev tasks -> $OUT/tasks.tar ($(cut -c1-16 "$OUT/TASKS.sha256")...)"