// tests/fix-round-4-5b-mutations.mjs // The mutations of fix round 4-5b, for the shared red script // (tests/helpers/red-round.sh, through tests/helpers/red-mutate.mjs). An id // named here has tests that pass at the round's start point be0b631 (the // red-proof instruments are this round's own work, and they live in the // working tree's tests/ that the script copies into the clone); each is // proven red under its mutation instead. Every span must match exactly once // in the clone. Data only; never matched by `npm test`. Later steps append // entries. export const MUTATIONS = [ { key: 'E23a', id: 'E23a', what: 'the base run selects one --test-name-pattern per round id instead of one ^\\[ pattern', spans: [ { file: 'tests/helpers/red-round.sh', find: String.raw`run_tagged "$TMP/base.jsonl" --test-timeout=300000 --test-force-exit '--test-name-pattern=^\['`, replace: String.raw`PATS='' for id in $IDS; do PATS="$PATS --test-name-pattern=\\[$id\\]" done run_tagged "$TMP/base.jsonl" --test-timeout=300000 --test-force-exit $PATS`, }, ], }, { key: 'E23b', id: 'E23b', what: 'the base run loses its --test-timeout', spans: [ { file: 'tests/helpers/red-round.sh', find: 'run_tagged "$TMP/base.jsonl" --test-timeout=300000', replace: 'run_tagged "$TMP/base.jsonl"', }, ], }, { key: 'RS', id: 'RS', what: 'the clone checks out HEAD instead of the base', spans: [ { file: 'tests/helpers/red-round.sh', find: 'checkout --quiet --detach "$BASE"', replace: 'checkout --quiet --detach HEAD', }, ], }, { key: 'E23d', id: 'E23d', what: 'the red judge exits 0 on a usage error', spans: [ { file: 'tests/helpers/red-judge.mjs', find: 'process.exit(2);', replace: 'process.exit(0);', }, ], }, { key: 'E23f', id: 'E23f', what: 'the red reporter drops the result of a test named [X1] red...', spans: [ { file: 'tests/helpers/red-reporter.mjs', find: 'const d = event.data || {};', replace: "const d = event.data || {};\n if (String(d.name).startsWith('[X1] red')) continue;", }, ], }, ];