test: a mutant guard may be pytest, not only node (#329)

The registry contract demanded that every guard name a `.mjs` file, which was
true until this task added the first backend mutant —
junction-limit-backend-raw-baseline is guarded by pytest, and the mutation-gate
job already installs it. My mistake: I ran `--check` and the single mutant
after adding it, but not the unit suite that owns the registry contract, so CI
caught what I should have.

The contract keeps its point: a guard must name a file that exists.

Issue: #329
User-Visible: no
This commit is contained in:
Codex
2026-08-28 00:28:12 +03:00
parent 0824e51014
commit 26c6e87079
+5 -1
View File
@@ -32,7 +32,11 @@ test('every mutant patch anchors exactly once in the current source', () => {
test('every guard command points at a file that exists', () => {
for (const mutant of MUTANTS) {
const script = mutant.guard.split(' ').find((part) => part.endsWith('.mjs'));
// Гвард — не обязательно node: бэкенд-зеркала (#329) красит pytest, и
// окружение мутант-джоба его ставит. Проверяем одно: команда называет
// существующий файл, а не выдуманный путь.
const script = mutant.guard.split(' ')
.find((part) => part.endsWith('.mjs') || part.endsWith('.py'));
assert.ok(script, `${mutant.id}: guard не называет исполняемый файл`);
assert.ok(existsSync(join(repoRoot, script)),
`${mutant.id}: guard-файла ${script} не существует`);