From 606ffa08eed695ea72480c6bd8d06d02183ba488 Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Mon, 28 Sep 2026 20:04:49 +0200 Subject: [PATCH 1/2] feat(cells): A3 release pin + H1 hard cell timeout + H5 takt tripwires (#3715) A3 (operator 17:28Z): in release mode (APR_RELEASE_SHA256/APR_RELEASE_COMMIT) model_ladder.sh step 0 refuses any $APR that is not an ABSOLUTE path whose sha256 equals the pin and whose --version names the release commit. models_t1.sh hands both legs the rc build that way; the receipt records apr_sha256, and apr_sha is the release commit. check_ladder_apr_release_pin.sh plants a different-sha apr first on PATH: 9 cases (0 planted invocations), 5 mutants killed. H1 (operator 17:50Z): every cell runs under a hard timeout, 600 s by default, with per-class values floored at 300 s. A timeout is a FAIL with timeout_s, wall_s and timed_out recorded in the row. The whole process GROUP is killed: the old subprocess timeout killed only flock, so the apr grandchild kept the GPU. H5: --takt-plan arms clock-driven checkpoints (+2/+4/+6 h). A checkpoint below 90% of plan writes ANDON H5 to stderr and .andon at once. check_ladder_cell_timeout_takt.sh: 10 cases, 6 mutants killed. H4 sampling: --select :. Co-Authored-By: Claude Opus 5.5 Agent: aprender-0d --- scripts/check_ladder_apr_release_pin.sh | 101 +++++++++++++++++++ scripts/check_ladder_cell_timeout_takt.sh | 109 ++++++++++++++++++++ scripts/check_release_models_t1.sh | 16 ++- scripts/lib/model_ladder_cells_produce.py | 115 +++++++++++++++++++++- scripts/model_ladder.sh | 43 +++++++- scripts/release/models_t1.sh | 17 +++- 6 files changed, 385 insertions(+), 16 deletions(-) create mode 100755 scripts/check_ladder_apr_release_pin.sh create mode 100755 scripts/check_ladder_cell_timeout_takt.sh diff --git a/scripts/check_ladder_apr_release_pin.sh b/scripts/check_ladder_apr_release_pin.sh new file mode 100755 index 0000000000..ee643d7397 --- /dev/null +++ b/scripts/check_ladder_apr_release_pin.sh @@ -0,0 +1,101 @@ +#!/usr/bin/env bash +# check_ladder_apr_release_pin.sh — the release cells run the apr UNDER TEST, never a PATH lookup (#3715 A3). +# +# WHY. Operator 2026-09-28 17:28Z: "cells and every gate step invoke the binary UNDER TEST by absolute path +# (the rc.1 artifact) with a sha256 check; each receipt records `apr --version` SHA == rc.1 tag SHA. +# Falsifier: plant a different-sha apr first on PATH -> cell refuses. PATH lookup of apr on the gate path = 0." +# Four `apr` binaries once coexisted on one box and a bare `apr` resolved to a 26-day-old one. A cell measured +# on the wrong binary is a confident verdict about code nobody is shipping. +# +# WHAT. model_ladder.sh step 0, release mode (APR_RELEASE_SHA256 / APR_RELEASE_COMMIT set), driven through +# `--lock-probe` -- the same apr_locked every cell goes through -- in a temp root whose PATH has a PLANTED apr +# first. Every fake apr logs each invocation, so "the planted apr ran zero times" is observed, not assumed. +# +# Exit: 0 every case as expected and every mutant killed · 1 a case or mutant landed wrong · 2 could not check. +set -uo pipefail +cd "$(dirname "$0")/.." || exit 2 +LADDER_SH=scripts/model_ladder.sh +for t in sha256sum flock choom; do command -v "$t" > /dev/null || { echo "check_ladder_apr_release_pin: $t absent" >&2; exit 2; }; done +[ -f "$LADDER_SH" ] || { echo "check_ladder_apr_release_pin: $LADDER_SH absent" >&2; exit 2; } + +W=$(mktemp -d "${TMPDIR:-/tmp}/apr-pin.XXXXXX") || exit 2 +trap 'rm -rf -- "${W:?}"' EXIT +GOOD=abcdef1234567890abcdef1234567890abcdef12 # the "release commit" +OTHER=0123456789abcdef0123456789abcdef01234567 +mkdir -p "$W/root" "$W/rc" "$W/path" "$W/imp" +for d in contracts scripts evidence Cargo.toml; do ln -s "$PWD/$d" "$W/root/$d"; done +LOG="$W/calls" +fake() { #