ygg-verify: stop forcing CARGO_TARGET_DIR; parallel mutants shared it

cargo-mutants --jobs N workers all built into /src/target and tested each
other's binaries, so parallel kill counts were noise (idunn-watchdog Soul
s3). Cargo's default target dir is already inside /src.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-01 01:14:27 +02:00
commit a755a60f94
2 changed files with 24 additions and 1 deletions

View file

@ -2,6 +2,25 @@
Record each change to the skill together with the evidence that motivated it.
## 2026-10-01: the stopgap no longer forces CARGO_TARGET_DIR
In idunn-watchdog's Idunn incident cut, Soul pass s3 ran cargo-mutants twice
on the same two mutants with `--jobs 3`, and the two runs gave opposite
verdicts. The cause: `ygg-verify.sh` passed `-e CARGO_TARGET_DIR=/src/target`
to every container. cargo-mutants gives each worker its own copy of the tree,
but the forced variable points them all at one target directory, so a worker
can test another worker's binary. With the variable unset, `true` was reported
missed and `false` caught, which is the right answer.
Every `--jobs` greater than 1 mutation count reported through the stopgap
before this change is unreliable. That covers both sessions' campaigns. A
survivor may have been reported caught, or a kill reported missed. Treat those
counts as unproven, and rerun a cut's mutation evidence when its rule matters.
What changed: the variable is gone. Cargo's default, `<workspace>/target`, is
already inside `/src`. The scar about not sharing build output between
checkouts still stands, and cargo's default honours it.
## 2026-09-30: Soul pays for each rerun once
The sccache measurement below showed that verify-slot queueing dominates a

View file

@ -22,6 +22,10 @@
# 3. Runs <command> in <image> under a CPU and memory cap, niced. Each
# toolchain gets one shared registry cache. The build output directory
# stays inside the work directory and is never shared between checkouts.
# CARGO_TARGET_DIR is deliberately NOT set: cargo's default (<workspace>/
# target) is already inside /src, and forcing it made cargo-mutants' --jobs
# workers share one target dir and test each other's binaries, so parallel
# kill counts were noise (Soul, idunn-watchdog, 2026-10-01).
# 4. Removes the work directory unless KEEP=1, and exits with the job's status.
#
# At most $SLOTS jobs run at once on Yggdrasil. The operator raised this to 3 on
@ -190,7 +194,7 @@ sudo nice -n 10 docker run --rm --name "$cname" --cpus="$cpus" --memory="$mem" \
-v "$work:/src" -v /etc/machine-id:/etc/machine-id:ro \
-v eureka-cargo-registry:/usr/local/cargo/registry -v eureka-nuget:/root/.nuget/packages \
-v eureka-sccache:/sccache \
-e CARGO_TARGET_DIR=/src/target -e BASH_ENV=/tmp/.ygg-bash-env \
-e BASH_ENV=/tmp/.ygg-bash-env \
-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory -e GIT_CONFIG_VALUE_0='*' \
$docker_args \
-w /src "$image" bash -o pipefail -c "printf 'set -o pipefail\n' >/tmp/.ygg-bash-env; $cmd"