fix: reconcile hidden walls during Optimize

Issue: #296
User-Visible: yes
This commit is contained in:
Sergey Matyunin
2026-08-24 19:10:27 +00:00
committed by claude[bot]
parent 033ad11bf7
commit 89ac96a8af
33 changed files with 1288 additions and 468 deletions
+7 -5
View File
@@ -121,12 +121,12 @@ test('Optimize uses the exact max envelope for nested coincident thicknesses', (
}
});
test('Optimize leaves partial and ambiguous coincident partitions untouched', () => {
test('Optimize reconciles fully hidden subspans but leaves ambiguous partitions untouched', () => {
const partial = coincidentPartitionConfig({ partial: true });
const partialResult = optimizePlans(partial, {});
assert.equal(partialResult.report.partitionsReconciled, 0);
assert.equal(partialResult.config.spaces[0].partitions.length, 1);
assert.ok(partialResult.config.spaces[0].openings[0].host);
assert.equal(partialResult.report.partitionsReconciled, 1);
assert.equal(partialResult.config.spaces[0].partitions, undefined);
assert.equal(partialResult.config.spaces[0].openings[0].host, undefined);
const ambiguous = coincidentPartitionConfig();
ambiguous.spaces[0].partitions.push({
@@ -818,5 +818,7 @@ test('issue 229 a node on the side of a room survives the sweep', () => {
};
const result = optimizePlans(config, {});
assert.equal(result.report.partitionsMerged, 0, 'the room side holds the node');
assert.equal(result.config.spaces[0].partitions.length, 2);
assert.equal(result.report.partitionsReconciled, 2,
'the two node-bounded records are then independently absorbed by #296');
assert.equal(result.config.spaces[0].partitions, undefined);
});