Lock: a 'run' mode for functional runs that lets builds continue; rule updated

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-04 19:08:36 +00:00
parent fd13f967f7
commit 81d5127b9d

View file

@ -3,14 +3,20 @@
# MEASUREMENTS (test networks, hash-rate samples, simulators, anything whose numbers go in the bench log).
# tools/lock/with-lock.sh build <command...> one build at a time (builds also nice -n 19, 4 jobs)
# tools/lock/with-lock.sh measure <command...> one measurement at a time, and no build may start meanwhile
# tools/lock/with-lock.sh run <command...> a functional run (test network, attack harness, simulator whose
# outputs are counts, locks, forks, seconds): one at a time, but
# builds may continue; nothing hash-rate, latency-in-ms or power
# Rule (4 October 2026): code and documents run in parallel; builds and measurements queue. Waits up to 2 hours.
# Evening of 4 October: a 3-hour finality network run held the build lock with six agents queued behind it, so
# functional runs now take the measure lock only (`run`); `measure` stays for numbers a nice-19 build could disturb.
set -euo pipefail
kind="$1"; shift
dir=/tmp/igneum-locks; mkdir -p "$dir"
case "$kind" in
build) locks=("$dir/build");;
measure) locks=("$dir/measure" "$dir/build");;
*) echo "usage: with-lock.sh build|measure <command...>" >&2; exit 2;;
run) locks=("$dir/measure");;
*) echo "usage: with-lock.sh build|measure|run <command...>" >&2; exit 2;;
esac
fds=(); i=9
for l in "${locks[@]}"; do