From 9deb1dcfd6f049d1e79cb2252a129bf8ecbb4ba7 Mon Sep 17 00:00:00 2001 From: Matysh Date: Sun, 4 Oct 2026 17:10:40 +0300 Subject: [PATCH] test: keep LED owner mutant type-correct for runtime proof (#791) Issue: #791 User-Visible: no --- scripts/mutation-registry.mjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/mutation-registry.mjs b/scripts/mutation-registry.mjs index fe4de263..845e81bb 100644 --- a/scripts/mutation-registry.mjs +++ b/scripts/mutation-registry.mjs @@ -14512,8 +14512,12 @@ const MUTANT_DEFINITIONS = [ + 'without losing a valid neighbouring strip; the executable frame boundary needs no browser', patches: [{ file: 'src/led-strip-runtime.ts', - find: " if (!device || device.space !== input.space.id) continue;", - replace: " if (device && device.space !== input.space.id) continue;", + find: ' const device = byId.get(strip.marker as string);\n' + + ' if (!device || device.space !== input.space.id) continue;', + // Keep the mutant type-correct: the non-null assertion erases at runtime, + // so the Node oracle must catch the missing-owner crash, not a tsc error. + replace: ' const device = byId.get(strip.marker as string)!;\n' + + ' if (device && device.space !== input.space.id) continue;', }], }, {