From 737e7b62aa2e5023277c57f24a4f63b8b6c0cd21 Mon Sep 17 00:00:00 2001 From: Matysh Date: Fri, 14 Aug 2026 15:18:46 +0300 Subject: [PATCH] fix: the golden mutant guard runs capture, because verify forbids one scene MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- scripts/mutation-gate.mjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/mutation-gate.mjs b/scripts/mutation-gate.mjs index 47a3b5f3..38b12d9f 100644 --- a/scripts/mutation-gate.mjs +++ b/scripts/mutation-gate.mjs @@ -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: [{