Files
stack/agents/darkwing/work/queue-74-review/r2/mut.mjs
T
jason.woltjeandClaude Opus 5.5 3a2b051736 review(74): Darkwing round 2 packet, approve (#1568 comment 27486)
Round 2 candidate 17b6d7f6 on 17ea0dbc. 22 of 23 mutants killed, joined-value
equivalent; probes cover repeated Host, proxy Host, HEAD and absolute-form.
r1/ holds the round 1 findings sent to Dewey in place of a verdict.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 18:30:48 -05:00

7 lines
351 B
JavaScript

// node mut.mjs <file> <from> <to>: replace exactly one occurrence, else exit 3.
import { readFileSync, writeFileSync } from 'node:fs';
const [f, a, b] = process.argv.slice(2);
const s = readFileSync(f, 'utf8'); const n = s.split(a).length - 1;
if (n !== 1) { console.error(`matches=${n}`); process.exit(3); }
writeFileSync(f, s.replace(a, () => b));