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 / tests / physics0 / learner / pd0b_freeze.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 | # Print the PD0B_FREEZE facts in a stable text format (print only; nothing is written). |
| 18 | # usage: pd0b_freeze.sh <harness-binary> |
| 19 | # Output: git tree hash of each frozen directory, sha256 of every tracked file under them |
| 20 | # (sorted by path, C locale), a dirty-tree flag, and the sha256 of the harness binary |
| 21 | # (which embeds the learner, the ladder checker, the scorer and the controls). |
| 22 | set -eu |
| 23 | H=${1:?usage: pd0b_freeze.sh <harness-binary>} |
| 24 | [ -f "$H" ] || { echo "pd0b_freeze: harness binary not found: $H" >&2; exit 2; } |
| 25 | export LC_ALL=C |
| 26 | DIRS="src/physics0/learner src/physics0/ladder src/physics0/score src/physics0/controls" |
| 27 | echo "freeze_head: $(git rev-parse HEAD)" |
| 28 | for d in $DIRS; do echo "tree $d $(git rev-parse HEAD:$d)"; done |
| 29 | dirty=$(git status --porcelain -- $DIRS tests/physics0/verify | wc -l | tr -d ' ') |
| 30 | echo "frozen_dirs_modified_in_worktree: $dirty" |
| 31 | for d in $DIRS; do git ls-files "$d"; done | sort | while read -r f; do echo "file $(sha256sum "$f" | cut -d' ' -f1) $f"; done |
| 32 | echo "harness_binary_sha256: $(sha256sum "$H" | cut -d' ' -f1)" |