igneum/tools/class-v5/census-remote.sh
2026-10-07 19:25:53 +00:00

19 lines
1.6 KiB
Bash
Executable file

#!/usr/bin/env bash
# The class v5 (c''') census (docs/design/class-v5-stored-state.md section 14) on igneum-build-2 through the pool lease
# (main's rule, 7 October 2026, 20:17 UK: no sweep or thread-bound job starts on a box except through `lease pool`).
# Runs igneum-pow's ignored test `v5_hot_census` from the test binary the suite build left under the worktree's
# target (so the binary is the commit the suite judged), copies the log back under docs/design/class-v5-harness/.
# tools/class-v5/census-remote.sh [seeds] [from] [threads] defaults 4600 0 88
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
WT="$(basename "$ROOT")"
HOST=build@142.132.249.238
KEY="$HOME/.ssh/igneum_ed25519"
REMOTE_ROOT="/srv/builds/$WT"
SEEDS="${1:-4600}"; FROM="${2:-0}"; THREADS="${3:-88}"
OUT="$ROOT/docs/design/class-v5-harness"
mkdir -p "$OUT"
LOG="v5-census-$SEEDS-$FROM.log"
ssh -i "$KEY" "$HOST" "set -e; cd $REMOTE_ROOT/igneum-pow; bin=\$(ls -t target/release/deps/igneum_pow-* | grep -v '\.d\$' | head -1); echo \"census: binary \$bin (\$(stat -c %y \$bin | cut -c1-19)), commit \$(git -C $REMOTE_ROOT rev-parse --short HEAD)\"; mkdir -p /srv/builds/_log/v5-class; /srv/builds/_bin/lease pool $THREADS --label 'class v5 c3 census: $SEEDS seeds from $FROM' --owner class-v5 --min 16 -- env IGNEUM_V5_CENSUS_SEEDS=$SEEDS IGNEUM_V5_CENSUS_FROM=$FROM IGNEUM_V5_CENSUS_THREADS={cores} \$bin --ignored v5_hot_census --nocapture --test-threads 1 2>&1 | tee /srv/builds/_log/v5-class/$LOG"
rsync -a -e "ssh -i $KEY" "$HOST:/srv/builds/_log/v5-class/$LOG" "$OUT/"
echo "census: log at $OUT/$LOG"