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 <noreply@anthropic.com>
This commit is contained in:
parent
b02f577b39
commit
4bcd434828
4 changed files with 11 additions and 10 deletions
|
|
@ -292,7 +292,7 @@ whole context. Start the job as one background shell (run_in_background) with
|
|||
`SUMMARY=<scratchpad>/<job>.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 <scratchpad>/<job>.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 <n>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=<scratchpad>/<job>.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 <that log>`: it blocks
|
||||
in the foreground with `tools/stopgap/ygg-verify.sh wait <that log>`: 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
|
||||
<n>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
|
||||
|
|
|
|||
|
|
@ -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=<log>` keeps the full log and prints a bounded summary (verdict, counts, ZERO TESTS RAN, failing tests); `wait <log>` 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=<log>` keeps the full log and prints a bounded summary (verdict, counts, ZERO TESTS RAN, failing tests); `wait <log>` 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) |
|
||||
|
|
|
|||
|
|
@ -136,8 +136,9 @@ restore() {
|
|||
}
|
||||
# dirtied <mutated file>: 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
|
||||
|
|
|
|||
|
|
@ -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 <mutants file> <TEST> [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 <name> <must-contain | !must-not-contain>...
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue