igneum/tools/attack/adv-mixer-3/x-lock.sh
igneum-labs 3ecf559e3c adv-mixer-3: yield to v5 gate and v5 kit waiters before every lease
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 19:26:29 +00:00

12 lines
1 KiB
Bash
Executable file

#!/usr/bin/env bash
# adv-mixer-3: run one harness command through the build-server lane's pool lease (main's rule, 7 October 2026, 19:2x UTC:
# no sweep starts on a box except through `lease pool`). Up to 48 free cores of the bounded pool, at least 16; the lease
# pins the command to the cores it took at nice 10 and replaces {cores} in the arguments with the count taken.
# Usage: x-lock.sh [v2] <label> <args to adv-mixer-3, with --threads {cores}>
B=/srv/builds/_adv-mixer-3/bin/adv-mixer-3; if [ "${1:-}" = v2 ]; then B=$B-v2; shift; fi
LABEL="$1"; shift
# main's pool rule (19:2x UTC): the release builds and the class v5 suites outrank every sweep; while a waiter labelled
# "v5 gate" or "v5 kit" is in the lease queue, no adversarial lease competes: finish the shard in hand, then wait here.
yield_v5() { while /srv/builds/_bin/lease status 2>/dev/null | sed -n '/^waiting/,$p' | grep -qiE "v5 gate|v5 kit"; do sleep 30; done; }
yield_v5
exec /srv/builds/_bin/lease pool "${THREADS:-48}" --min 16 --label "adv-mixer-3 $LABEL" --owner adv-mixer-3 -- "$B" "$@"