153 lines
4.7 KiB
JavaScript
153 lines
4.7 KiB
JavaScript
// 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;",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'E20',
|
|
id: 'E20',
|
|
what: 'untitled findings are placed in arrival order, not in canonical order, in the contract and the workflow',
|
|
spans: [
|
|
{
|
|
file: 'lib/review/coordinator-contract.mjs',
|
|
find: 'untitled.sort(canon)',
|
|
replace: 'untitled',
|
|
},
|
|
{
|
|
file: 'scripts/trekreview-armB.workflow.mjs',
|
|
find: 'untitled.sort(canon)',
|
|
replace: 'untitled',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'E16a',
|
|
id: 'E16a',
|
|
what: 'the next-session-prompt validator CLI loses its refusal of a --state-file with no value',
|
|
spans: [
|
|
{
|
|
file: 'lib/validators/next-session-prompt-validator.mjs',
|
|
find: String.raw`
|
|
if (v === undefined || v.startsWith('--')) {
|
|
process.stderr.write('next-session-prompt-validator: --state-file needs a value\n');
|
|
process.exit(2);
|
|
}`,
|
|
replace: '',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'E17a',
|
|
id: 'E17a',
|
|
what: 'the two wave 2 sentences on outbound queries are deleted from /trekresearch',
|
|
spans: [
|
|
{
|
|
file: 'commands/trekresearch.md',
|
|
find: `It searches with the words it is given, so no
|
|
local file name or project term may be in them. `,
|
|
replace: '',
|
|
},
|
|
{
|
|
file: 'commands/trekresearch.md',
|
|
find: `When wave 1's external
|
|
findings hold no leading answer, say so and give it the research question
|
|
alone, stripped the same way. `,
|
|
replace: '',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'E18a',
|
|
id: 'E18a',
|
|
what: 'the summary-only triage row of /trekreview gains .claude/rules/**',
|
|
spans: [
|
|
{
|
|
file: 'commands/trekreview.md',
|
|
find: '| `summary-only` | `docs/**`, Markdown files at the repo root other than `CLAUDE.md` and `AGENTS.md` (README, CHANGELOG), `tests/fixtures/**`. |',
|
|
replace: '| `summary-only` | `docs/**`, Markdown files at the repo root other than `CLAUDE.md` and `AGENTS.md` (README, CHANGELOG), `tests/fixtures/**`, `.claude/rules/**`. |',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'Db',
|
|
id: 'Db',
|
|
what: 'a security-researcher* star is added to the README agent list, outside the diagram line',
|
|
spans: [
|
|
{
|
|
file: 'README.md',
|
|
find: '4 external agents (docs-researcher, community-researcher, security-researcher, contrarian-researcher)',
|
|
replace: '4 external agents (docs-researcher, community-researcher, security-researcher*, contrarian-researcher)',
|
|
},
|
|
],
|
|
},
|
|
];
|