test: check model invariants for references and wall records

Issue: #254
User-Visible: no
This commit is contained in:
Matysh
2026-08-23 09:34:32 +03:00
parent c8d7d282a4
commit 5cf52707c4
4 changed files with 421 additions and 0 deletions
+24
View File
@@ -165,6 +165,30 @@ export const MUTANTS = [
replace: ' const span = centre;',
}],
},
{
id: 'invariant-loses-wall-record',
guard: 'node --test --test-name-pattern="исчезнувшая запись толщины" '
+ 'test/model-invariants.test.mjs',
because: 'потеря записи толщины — это дефект #253, найденный человеком глазами; если '
+ 'инвариант перестанет её замечать, класс вернётся в продукт незамеченным (#254)',
patches: [{
file: 'scripts/model-invariants.mjs',
find: ' if (now === 0) {',
replace: ' if (false) {',
}],
},
{
id: 'invariant-accepts-dead-space-reference',
guard: 'node --test --test-name-pattern="маркер на удалённое пространство" '
+ 'test/model-invariants.test.mjs',
because: 'маркер, привязанный к удалённому пространству, исчезает с плана молча (#244): '
+ 'проверка ссылок обязана считать это дефектом операции, а не особенностью данных (#254)',
patches: [{
file: 'scripts/model-invariants.mjs',
find: ' if (space && !spaceIds.has(space)) {\n add(\'marker_space\'',
replace: ' if (false) {\n add(\'marker_space\'',
}],
},
{
id: 'wall-face-apply-skips-overlap-guard',
guard: 'node demo/smoke_wall_face_overlap.mjs',