261 lines
9.8 KiB
JavaScript
261 lines
9.8 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)',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'M1',
|
|
id: 'M1',
|
|
what: 'the 13 name sites of the tests f6bdc2d added are put back to their untagged found in execution: names',
|
|
spans: [
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[WF] sibling: ${rel} no longer puts back what the coordinator did not return',
|
|
replace: 'found in execution: ${rel} no longer puts back what the coordinator did not return',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[WF] sibling: ${rel} says a finding is matched to its row',
|
|
replace: 'found in execution: ${rel} says a finding is matched to its row',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[WF] sibling: ${rel} puts back one copy per row',
|
|
replace: 'found in execution: ${rel} puts back one copy per row',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: "[WF] sibling: ${rel} says floor (b)'s counterpart",
|
|
replace: "found in execution: ${rel} says floor (b)'s counterpart",
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[M1r] README.md names no "leading recommendation" trigger',
|
|
replace: 'found in execution: README.md names no "leading recommendation" trigger',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[#113] sibling: README.md stars security-researcher nowhere',
|
|
replace: 'found in execution: README.md stars security-researcher nowhere',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[M1r] README.md lists security-researcher as no conditional agent',
|
|
replace: 'found in execution: README.md lists security-researcher as no conditional agent',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[#113] sibling: README.md names the deep-research case of wave 2',
|
|
replace: 'found in execution: README.md names the deep-research case of wave 2',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[#113] sibling: README.md runs contrarian-researcher after wave 1 returns',
|
|
replace: 'found in execution: README.md runs contrarian-researcher after wave 1 returns',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: "[#111] sibling: ${rel} item 3 names Pass 3's high-effort skip",
|
|
replace: "found in execution: ${rel} item 3 names Pass 3's high-effort skip",
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[#111] sibling: CHANGELOG ### Fixed has the **Across the round** label',
|
|
replace: 'found in execution: CHANGELOG ### Fixed has the **Across the round** label',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[#111] sibling: commands/trekreview.md high-effort section skips Pass 3',
|
|
replace: 'found in execution: commands/trekreview.md high-effort section skips Pass 3',
|
|
},
|
|
{
|
|
file: 'tests/lib/fix-round-4-5a-prose.test.mjs',
|
|
find: '[#111] sibling: agents/review-orchestrator.md quick mode skips pass 3',
|
|
replace: 'found in execution: agents/review-orchestrator.md quick mode skips pass 3',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'M1r',
|
|
id: 'M1r',
|
|
what: 'the README * = conditional line is put back to its 8a2a989 text, which names security-researcher when a leading recommendation forms',
|
|
spans: [
|
|
{
|
|
file: 'README.md',
|
|
find: "`* = conditional`: convention-scanner / test-strategist on medium+ codebases (50+ files); research-scout for unknown external tech; contrarian-researcher, when selected, runs in wave 2 after wave 1 returns, with the leading answer of wave 1's external findings to attack (with `--engine deep-research`, after the engine returns, from the leading answer of its report), always at `effort=high`; brief-conformance-reviewer skipped under `--quick`.",
|
|
replace: '`* = conditional`: convention-scanner / test-strategist on medium+ codebases (50+ files); research-scout for unknown external tech; security-researcher when a leading recommendation forms (or always at `effort=high`); contrarian-researcher, when selected, runs in wave 2 after the other external agents return, with their leading answer to attack (always at `effort=high`); brief-conformance-reviewer skipped under `--quick`.',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'M7r',
|
|
id: 'M7r',
|
|
what: 'a HEAD read that fails (exit 128, as on an unborn HEAD) counts as in HEAD, so nothing is parked',
|
|
spans: [
|
|
{
|
|
file: 'lib/util/park-attempt-files.mjs',
|
|
find: 'return r.status === 0;',
|
|
replace: 'return r.status === 0 || r.status === 128;',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
key: 'DJ4r',
|
|
id: 'DJ4r',
|
|
what: 'the lesson write returns when the lessons directory is missing, so the first lesson is never written',
|
|
spans: [
|
|
{
|
|
file: 'lib/review/recurrence.mjs',
|
|
find: 'mkdirSync(dirname(path), { recursive: true });',
|
|
replace: 'if (!existsSync(dirname(path))) return;',
|
|
},
|
|
],
|
|
},
|
|
];
|