fix: preserve wall identity through structural edits

Issue: #282
User-Visible: yes
This commit is contained in:
Matysh
2026-08-26 02:20:57 +03:00
parent 2f155a83b9
commit e1059e2e29
21 changed files with 756 additions and 94 deletions
+1 -8
View File
@@ -363,14 +363,7 @@ test('issue 248 Optimize stays a no-op across the lattice storage round-trip', (
assert.deepEqual(storageRoundtripFixture.input, inputBefore, 'preview must keep fixture input');
assert.equal(first.changed, true);
assert.ok(first.report.latticeCoordinatesCanonicalized > 0);
assert.equal(first.config.model_version, PLAN_MODEL_VERSION);
assert.ok(first.config.spaces.every((space) => Array.isArray(space.wall_segments)));
assert.deepEqual(
first.config.spaces.map((space) => space.rooms.map((room) => room.poly)),
storageRoundtripFixture.expected.config.spaces.map((space) => (
space.rooms.map((room) => room.poly)
)),
);
assert.deepEqual(first.config, storageRoundtripFixture.expected.config);
assert.deepEqual(first.layout, storageRoundtripFixture.expected.layout);
assert.deepEqual(canonicalizeConfigGeometry(first.config), first.config);
assert.deepEqual(canonicalizeLayoutGeometry(first.layout), first.layout);