From 4bcd4348283e13fb2bd2602e8f51fc4a7013d12f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 1 Oct 2026 16:43:26 +0200 Subject: [PATCH] mutation-table: name the mutated file from the workdir; briefs: wait calls take a 280000 ms Bash timeout The pollution note listed nothing when the workdir was below the repo root (ls-files ran from the root); the mock now runs from a subdirectory so that regresses visibly. Every brief/INDEX line showing ygg-verify wait now says to pass a Bash timeout of at least 280000 ms. Co-Authored-By: Claude Sonnet 5.5 --- references/briefs.md | 4 ++-- tools/INDEX.md | 4 ++-- tools/mutation-table.sh | 5 +++-- tools/test-tools.sh | 8 ++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/references/briefs.md b/references/briefs.md index 4447c27..e18b3d2 100644 --- a/references/briefs.md +++ b/references/briefs.md @@ -292,7 +292,7 @@ whole context. Start the job as one background shell (run_in_background) with `SUMMARY=/.log` in front of `tools/stopgap/ygg-verify.sh`, a fresh log path per job. Then wait in the foreground, one call at a time: `tools/stopgap/ygg-verify.sh wait /.log` blocks for at most -270 s, so your cache stays warm, and prints the bounded summary when the job is +270 s (run it with a Bash tool `timeout` of at least 280000 ms: the default 120 s backgrounds the call and costs a wake), so your cache stays warm, and prints the bounded summary when the job is done. If it prints `RUNNING s` (exit 99), call it again. Exit 98 means the launcher is gone with no verdict: rerun the job, do not guess its outcome. A call longer than 5 minutes rewrites your whole context. Never run a second watcher @@ -370,7 +370,7 @@ Admit one verdict and its findings, and nothing else. - Long jobs: wait for them and finish, and never end your turn before your report. Run the job as one background shell with `SUMMARY=/.log` in front of `tools/stopgap/ygg-verify.sh` (a fresh log path per job), and wait - in the foreground with `tools/stopgap/ygg-verify.sh wait `: it blocks + in the foreground with `tools/stopgap/ygg-verify.sh wait `: pass a Bash tool `timeout` of at least 280000 ms (the default 120 s backgrounds the call and costs a wake); it blocks at most 270 s and prints the bounded summary when the job is done, or `RUNNING s` (exit 99) and you call it again. Exit 98 means no verdict: rerun, do not guess. No second watcher, no timer under 60 s in a loop of your own, and no diff --git a/tools/INDEX.md b/tools/INDEX.md index 25efd0c..deb8c50 100644 --- a/tools/INDEX.md +++ b/tools/INDEX.md @@ -8,7 +8,7 @@ gets a Soul pass before merge. | script | purpose | consumer | named by | |---|---|---|---| -| `tools/stopgap/ygg-verify.sh` | Pushes an exact revision to a mirror on Yggdrasil and runs one command in a capped, niced container. `SUMMARY=` keeps the full log and prints a bounded summary (verdict, counts, ZERO TESTS RAN, failing tests); `wait ` blocks at most 270 s and returns the summary once. Dies with the stopgap when Idunn's verify transaction lands. | Hands, Soul, Imagination probes | `references/briefs.md` (Hands long jobs and verification, Soul long jobs), `SKILL.md` (Yggdrasil) | -| `tools/mutation-table.sh` | One verify job that runs a list of hand mutants (file, before, after, test) against a revision and returns a kill table: CAUGHT with the killing test, SURVIVED, UNVIABLE, TIMEOUT, NOAPPLY, ERROR. Refuses a red or zero-test baseline. Replaces per-agent runmut/mutrun/strykrun scripts. | Soul, Hands (scoped run) | `references/briefs.md` (Hands verification, Soul reruns) | +| `tools/stopgap/ygg-verify.sh` | Pushes an exact revision to a mirror on Yggdrasil and runs one command in a capped, niced container. `SUMMARY=` keeps the full log and prints a bounded summary (verdict, counts, ZERO TESTS RAN, failing tests); `wait ` blocks at most 270 s and returns the summary once; call it with a Bash tool `timeout` of at least 280000 ms. Dies with the stopgap when Idunn's verify transaction lands. | Hands, Soul, Imagination probes | `references/briefs.md` (Hands long jobs and verification, Soul long jobs), `SKILL.md` (Yggdrasil) | +| `tools/mutation-table.sh` | One verify job that runs a list of hand mutants (file, before, after, test) against a revision and returns a kill table: CAUGHT with the killing test, SURVIVED, UNVIABLE, TIMEOUT, NOAPPLY, ERROR. Refuses a red or zero-test baseline and a red BUILD; rows print live; the whole tree is restored after each mutant. Replaces per-agent runmut/mutrun/strykrun scripts. | Soul, Hands (scoped run) | `references/briefs.md` (Hands verification, Soul reruns) | | `tools/testparse.sh` | Sourced library: failing test names and pass/fail/skip counts from cargo, dotnet, vitest and pytest logs. Shared by the summary and the kill table. | the two scripts above | not named by a brief; it lives and dies with them | | `tools/test-tools.sh` | Local fixture check of the parsers and the summary over `tools/fixtures/logs` (real cargo and mutation logs, plus hand-written dotnet, vitest, pytest, exit-0-but-failed and no-verdict logs). Run it before merging a change to the scripts above. | whoever changes those scripts | `SKILL.md` (Shared tools) | diff --git a/tools/mutation-table.sh b/tools/mutation-table.sh index 037998e..a8580dd 100644 --- a/tools/mutation-table.sh +++ b/tools/mutation-table.sh @@ -136,8 +136,9 @@ restore() { } # dirtied : what a run changed beyond the mutated file and the baseline dirtied() { - local rel; rel=$(git -C "$SRC" ls-files --full-name -- "$1" 2>/dev/null | head -n 1) - tree_state | grep -vxF -- "$base_state" | grep -vF -- " $rel" | sed 's/^...//' | head -n 3 | paste -sd, - + local rel; rel=$(git ls-files --full-name -- "$1" 2>/dev/null | head -n 1) + [ -n "$rel" ] || return 0 # cannot name the mutated file: report nothing rather than everything + tree_state | grep -vxF -- "$base_state" | grep -vF -- " $rel" | sed "s/^...//" | head -n 3 | paste -sd, - } declare -A based diff --git a/tools/test-tools.sh b/tools/test-tools.sh index df73f9a..5f7d17f 100644 --- a/tools/test-tools.sh +++ b/tools/test-tools.sh @@ -37,14 +37,14 @@ check no-verdict.log 97 "NO VERDICT" check no-verdict.log 97 "RED" "GREEN" # ---- tools/mutation-table.sh, container half, against the mock in -# fixtures/mutation-mock (shell scripts that print cargo/vitest-shaped output). +# fixtures/mutation-mock, run from the subdirectory pkg/ (a workdir below the repo root) (shell scripts that print cargo/vitest-shaped output). # One case per finding of the 2026-10-01 Soul pass; each fails if it regresses. mt() { # mt [BUILD]: sets mt_out, mt_rc, mt_repo local root; root=$(mktemp -d); mt_repo=$root/repo; mkdir -p "$mt_repo" "$root/mt" - cp -r "$here/fixtures/mutation-mock/." "$mt_repo/" + mkdir -p "$mt_repo/pkg"; cp -r "$here/fixtures/mutation-mock/." "$mt_repo/pkg/" git -C "$mt_repo" init -q && git -C "$mt_repo" add -A && git -C "$mt_repo" -c user.name=t -c user.email=t@t commit -qm mock cp "$here/testparse.sh" "$root/mt/"; cp "$here/fixtures/mutation-mock/$1" "$root/mt/mutants.txt" - mt_out=$(MT_SRC=$mt_repo MT_DIR=$root/mt TEST=$2 BUILD=${3:-} MUT_TIMEOUT=${MT_TO:-15} timeout "${MT_WALL:-120}" bash "$here/mutation-table.sh" --in-container 2>&1) + mt_out=$(WORKDIR=pkg MT_SRC=$mt_repo MT_DIR=$root/mt TEST=$2 BUILD=${3:-} MUT_TIMEOUT=${MT_TO:-15} timeout "${MT_WALL:-120}" bash "$here/mutation-table.sh" --in-container 2>&1) mt_rc=$? } mtcheck() { # mtcheck ... @@ -70,7 +70,7 @@ YGG_NONCE=n0nce1 mt mutants-b.txt 'bash test.sh' mtcheck B-nonce "YGG-SUMMARY/n0nce1: [1/1] " "!YGG-SUMMARY: " # C: a test that rewrites a tracked file or leaks an untracked one must not decide the next mutant mt mutants-c.txt 'bash test.sh' -mtcheck C-pollution "stamp-bad | CAUGHT | tests::b_write" "also changed: data.txt,leak.tmp" "untested-equiv | SURVIVED" "!untested-equiv | CAUGHT" +mtcheck C-pollution "stamp-bad | CAUGHT | tests::b_write" "also changed: pkg/data.txt,pkg/leak.tmp" "untested-equiv | SURVIVED" "!untested-equiv | CAUGHT" [ -z "$(git -C "$mt_repo" status --porcelain)" ] || { echo "FAIL mutation C: tree not restored"; fail=1; } # D: a test file that fails to load is not a kill; a named failing test is mt mutants-d.txt 'bash vtest.sh'