fix: the golden mutant guard runs capture, because verify forbids one scene

First real run of the gate failed before reaching a single mutant: the clean
run of the golden guard was red on untouched code. demo/golden/policy.mjs
refuses `verify --scenario=...` on purpose — a partial verify is the "make CI
green" loophole the policy exists to close. The gate built to catch dishonest
tests had reached for a dishonest shortcut, and the policy caught it.

capture keeps the whole check: a failed semantic assertion becomes status
error, and goldenRunFailed treats an error as failure in either mode. The scene
carries warmPixelRegion with minPixels 2500 over the receiving half, so a lamp
moved out of reach still fails it — which is exactly what this mutant asserts.

Issue: #85
User-Visible: no
This commit is contained in:
Matysh
2026-08-14 15:18:46 +03:00
parent f11a4e1085
commit 737e7b62aa
+6 -2
View File
@@ -98,10 +98,14 @@ export const MUTANTS = [
},
{
id: 'golden-lamp-out-of-reach',
guard: 'node demo/golden/run.mjs --mode=verify --scenario=lighting-opaque-glow-two-doorways-dark',
guard: 'node demo/golden/run.mjs --mode=capture --scenario=lighting-opaque-glow-two-doorways-dark',
because: 'сцена заведена как защита дверного света (#71) и однажды уже была '
+ 'пустой: лампа стояла так, что пятно не доходило до стены. Уведённая лампа '
+ 'обязана ронять семантический ассерт сцены, а не только пиксельный дифф',
+ 'обязана ронять семантический ассерт warmPixelRegion, а не только пиксельный дифф. '
+ 'Режим capture, а не verify: политика запрещает verify по одной сцене '
+ '(demo/golden/policy.mjs) — частичный verify это лазейка «чтобы CI позеленел». '
+ 'На capture семантический провал даёт status error, и goldenRunFailed '
+ 'краснеет в любом режиме — то есть проверка сохраняется полностью',
// Мутируется фикстура сцены, не продуктовый код: пустота сцены — свойство
// фикстуры. Пересборка бандла всё равно нужна, путь тот же.
patches: [{