Files
stack/agents/darkwing/work/queue-62/out/mutants.sh
T
jason.woltjeandClaude Opus 5.5 6b83edc36a docs(queue-62): row 62 candidate packet, project trees (darkwing)
Candidate manifest sha256 ec3f7a42f3bf6436634a5a83a12bb5678ca1e58a10ff4f66a23dfca7ff3f375f,
13 files on edc5de71. Gate on 6ae8b844: 13 suites green. The candidate
itself is not committed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 14:12:05 -05:00

22 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.
#!/bin/bash
# Each mutant edits one source file in the build worktree, runs the tasks tests, then restores
# the file from the worktree index (the candidate). Expect every mutant to fail at least one test.
# The tasks tests run for each mutant; the cli tests too for the config.mjs one.
export TMPDIR=~/darkwing-scratch/r62/tmp
cd ~/darkwing-scratch/r62/build
S=packages/tasks/src/sync.mjs; U=packages/tasks/src/startup.mjs
run() { # name file sed-expr [test glob]
sed -i "$3" "$2"
if git diff --quiet -- "$2"; then echo "$1: MUTATION DID NOT APPLY"; return; fi
node --test "${4:-packages/tasks/tests/*.test.mjs}" > ~/darkwing-scratch/r62/tmp/mut-$1.log 2>&1
echo "$1: rc=$? $(grep -E '^ℹ (pass|fail) ' ~/darkwing-scratch/r62/tmp/mut-$1.log | tr '\n' ' ')"
grep -E '^not ok|^# Subtest|✖ ' ~/darkwing-scratch/r62/tmp/mut-$1.log | grep -v '^ℹ' | sed 's/^/ /' | sort -u | head -8
git checkout -q -- "$2"
}
run no-leave-tree-check $S 's/} else if (!ctx.tree.has(project)) {/} else if (false) {/'
run no-watch-only-bucket $S 's/^const fieldsFor = .*/const fieldsFor = (task, bucket) => taskFields(task, bucket);/'
run placed-by-id $S 's/placed.add(ref(project, id));/placed.add(id);/; s/.filter((r) => !placed.has(r));/.filter((r) => !placed.has(parseRef(r).task));/'
run keep-archived $U 's/if (p.is_archived || p.id === ctx.project) continue;/if (p.id === ctx.project) continue;/'
run config-drops-descendants packages/cli/src/config.mjs 's/ descendants: v\["tracker.descendants"\],/ descendants: false,/' 'packages/cli/tests/*.test.mjs'
git diff --quiet -- $S $U packages/cli/src/config.mjs && echo "restored: sources match the candidate index"