From a625871538c2cf58c39efd2b0e52be912f2e04e4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 10 Sep 2026 19:03:21 +0300 Subject: [PATCH] test: a mutant for the only surviving wake-up of a replaced config body (#520) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the bodies no longer declared as Lit properties, `onBodyReplaced` is the single path that turns a replaced config reference into an update — AC2 of this issue rests on it, and until now only a hand-run mutation stood behind that column. The mutant drops the notification from `setConfig`; the existing unit in `test/config-adoption.test.mjs` reddens on it. Verified: `node scripts/mutation-gate.mjs --id=adoption-notifies-no-host-on-config-replacement` — «поймано 1 из 1». Issue: #520 User-Visible: no --- scripts/mutation-gate.mjs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/mutation-gate.mjs b/scripts/mutation-gate.mjs index cb691c88..6317e387 100644 --- a/scripts/mutation-gate.mjs +++ b/scripts/mutation-gate.mjs @@ -7260,6 +7260,18 @@ const MUTANT_DEFINITIONS = [ replace: " _serverCfg: { state: true },\n _devices: { state: true },", }], }, + { + id: 'adoption-notifies-no-host-on-config-replacement', + guard: 'node --test test/config-adoption.test.mjs', + because: 'since #520 the bodies are no longer declared Lit properties, so this call is the ' + + 'only thing that wakes an update when the config body is replaced: without it the ' + + 'geometry epoch never moves and the plan keeps painting the retired body (#520 AC2)', + patches: [{ + file: 'src/config-adoption.ts', + find: " this.config = next;\n this.onBodyReplaced?.('_serverCfg', previous);", + replace: ' this.config = next;', + }], + }, { id: 'live-editor-view-mode-routes-live', guard: 'node --test test/live-editor.test.mjs',