Files
stack/agents/darkwing/work/queue-69/mutants.sh
T
jason.woltjeandClaude Opus 5.5 544563e3f5 agents: darkwing row 69 build packet (#1562)
Hidden decide box names the way out, its status line stops promising y,
tests for the narrow-terminal guard, U+18D08 and a cut help or detail
box. Candidate manifest c68e6582. Mutants 6/6 killed; gate 13 suites
green on dad20531 plus build.patch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 17:59:51 -05:00

32 lines
1.6 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# Row 69 (#1562) mutants: the brief's four, then two on this row's own
# lines. Run from the candidate worktree's root:
# LOG=/some/dir bash mutants.sh /path/to/mut.mjs > mutants.txt
# Each mutant edits one site with mut.mjs (exactly one match, else exit 3),
# runs the app tests and restores the file. "killed" means the run failed;
# "survived" means it passed.
set -u
MUT=$1
run() {
local name=$1 file=$2 from=$3 to=$4; shift 4
cp -- "$file" "$file.orig"
if ! node "$MUT" "$file" "$from" "$to"; then
echo "$name: NO MATCH"; mv -- "$file.orig" "$file"; return
fi
if node --test "$@" > "${LOG:-.}/mut-$name.log" 2>&1; then
echo "$name: survived"
else
echo "$name: killed ($(grep -m1 -o 'ℹ fail [0-9]*' "${LOG:-.}/mut-$name.log"); $(grep '^✖ ' "${LOG:-.}/mut-$name.log" | grep -v 'failing tests' | sort -u | sed 's/^✖ //; s/ ([0-9.]*ms)$//' | paste -sd '|'))"
fi
mv -- "$file.orig" "$file"
}
S=packages/cli/src/screens.mjs
A=packages/cli/src/app.mjs
T=(packages/cli/tests/app.test.mjs)
run shown-no-min-cols $S 'return cols >= MIN_COLS && rows >= MIN_ROWS && o?.kind' 'return rows >= MIN_ROWS && o?.kind' "${T[@]}"
run r3-shown-no-min $S 'return cols >= MIN_COLS && rows >= MIN_ROWS && o?.kind' 'return o?.kind' "${T[@]}"
run n9-17000-end-off $S '(n >= 0x17000 && n <= 0x18d08)' '(n >= 0x17000 && n <= 0x18cff)' "${T[@]}"
run cut-drops-choice $S 'const tail = b.slice(-2);' 'const tail = b.slice(-1);' "${T[@]}"
run hidden-no-way-out $S ', "Resize, or use mosaic decide."]' ']' "${T[@]}"
run hidden-status-promises-y $A 'const state = hidden ? {' 'const state = false ? {' "${T[@]}"