Files
stack/agents/dewey/work/queue-143/extra-mutants.sh
jason.woltje 6bad02612a lead: commit dewey's untracked evidence (721 files: queue-124-review queue-143 queue-149 queue-165-review queue-170 queue-175 queue-177 queue-184 queue-191)
Unclaimed files left in the canonical checkout. Inventory: canonical-cleanup-inventory.md (commit-as-evidence groups). detect-secrets scan clean on 2026-11-02: hits are sha256 pins, git object ids, test sentinels already in tracked tests and unit-file lines.
2026-11-02 15:05:14 -06:00

13 lines
1.2 KiB
Bash
Raw Permalink 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
# Dewey's two extra row 143 mutants: the instance and repo conditions in #specThread.
# Usage: extra-mutants.sh <worktree with row143.patch applied> <outdir>. Restores broker.mjs on exit.
set -u
WT=$1; OUT=$(mkdir -p "$2" && cd "$2" && pwd) || exit 2; cd "$WT" || exit 2
F=packages/bus/src/broker.mjs; cp "$F" "$OUT/broker.bak" || exit 2; trap 'cp "$OUT/broker.bak" "$F"' EXIT
one() { node -e 'const fs=require("fs");const[f,a,b]=process.argv.slice(1);const s=fs.readFileSync(f,"utf8");if(s.split(a).length!==2){console.error("match!=1");process.exit(3)}fs.writeFileSync(f,s.replace(a,()=>b))' "$F" "$2" "$3" || { echo "$1: edit failed"; return; }
setsid -w timeout -k 10 400 node --test packages/bus/tests/spec-review.test.mjs > "$OUT/$1.out" 2>&1; rc=$?
echo "$1: exit $rc; $(grep -E '^ℹ (tests|pass|fail) ' "$OUT/$1.out" | tr '\n' ' ')"; grep -E '^✖' "$OUT/$1.out" | sort -u | sed 's/^/ failed: /'
cp "$OUT/broker.bak" "$F"; }
one d1-any-instance "AND t.owner=? AND t.instance=? AND p.repo=?" "AND t.owner=? AND (t.instance=? OR 1) AND p.repo=?"
one d2-any-project "AND t.owner=? AND t.instance=? AND p.repo=?" "AND t.owner=? AND t.instance=? AND (p.repo=? OR 1)"