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/calibration/scripts/tc_void_lib.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 / calibration / scripts / tc_void_lib.sh` 110 lines ยท 4303 bytes Raw Blame History 1 # SPDX-License-Identifier: Apache-2.0 2 # Copyright 2026 Drake Stapleton (AIEN / aien-dev) 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 # Turing calibration (EXP-001): the one VOID counter, shared by sealed generation, the frozen-tree tests and 17 # the evaluator (FAILURE_REPORTING.md section 2; CAL-0 review 2 Q1). Sourced by generate_sealed_data.sh and 18 # record_void.sh; turing-cal-eval implements the same rule in C (refuse_c). 19 # 20 # The counter is the number of void_receipt_.json files in 21 # $TC_EVAL_ROOT//run/bundle (TC_EVAL_ROOT default ~/aien-data/turing-cal/eval) 22 # the directory the sealed evaluation writes its bundle to (BLINDING_PROTOCOL.md step 8). A void receipt takes the 23 # first free n (exclusive create, never overwritten). The receipt with n >= 3 also writes final_receipt.json 24 # (kind inconclusive_infra, verdict INCONCLUSIVE, reason INFRA): EXP-001 ends there. Nothing may start once 25 # final_receipt.json exists or three void receipts exist. 26 27 TC_EVAL_ROOT="${TC_EVAL_ROOT:-$HOME/aien-data/turing-cal/eval}" 28 TC_MAX_ATTEMPTS=3 29 30 tc_void_dir() { printf '%s/%s/run/bundle\n' "$TC_EVAL_ROOT" "$1"; } 31 32 # tc_void_count DIR: number of void receipts (1, 2, ... without gaps). 33 tc_void_count() { 34 local n=0 35 while [ -e "$1/void_receipt_$((n + 1)).json" ]; do n=$((n + 1)); done 36 echo "$n" 37 } 38 39 # tc_void_ended DIR: true when EXP-001 has ended (a final receipt exists or the attempts are used up). 40 # (the experiment named in receipts is $EXP_ID, default EXP-001) 41 tc_void_ended() { [ -e "$1/final_receipt.json" ] || [ "$(tc_void_count "$1")" -ge "$TC_MAX_ATTEMPTS" ]; } 42 43 # JSON-safe text: quote, backslash and control characters become an apostrophe (as in turing-cal-eval). 44 tc_jclean() { printf '%s' "$1" | tr '"\\\000-\037' "'"; } 45 46 # tc_void_write C_F STAGE STEP CODE REASON COMMAND INPUTS PROFILE_DIGEST CANDIDATE_MANIFEST_SHA256 47 # Writes the next void receipt; prints its number. Writes the INCONCLUSIVE (INFRA) final receipt on the third. 48 tc_void_write() { 49 local cf="$1" stage="$2" step="$3" code="$4" reason command inputs pd="$8" cm="$9" dir n t f 50 reason="$(tc_jclean "$5")" command="$(tc_jclean "$6")" inputs="$(tc_jclean "$7")" 51 dir="$(tc_void_dir "$cf")" 52 mkdir -p "$dir" 53 t="$(date -u +%Y-%m-%dT%H:%M:%SZ)" 54 n=1 55 while :; do 56 f="$dir/void_receipt_$n.json" 57 if (set -C; : >"$f") 2>/dev/null; then break; fi 58 n=$((n + 1)) 59 [ "$n" -lt 1000 ] || return 1 60 done 61 cat >>"$f" <"$dir/final_receipt.json") 2>/dev/null; then 81 cat >>"$dir/final_receipt.json" <