fix: preserve passage validation during wall migration

Issue: #282
User-Visible: yes
This commit is contained in:
Matysh
2026-08-26 02:21:15 +03:00
parent 07402d64cc
commit 0f54daf37b
3 changed files with 11 additions and 1 deletions
@@ -1647,6 +1647,12 @@ async def ws_plan_optimize(hass: HomeAssistant, connection, msg: dict[str, Any])
# validated verbatim: the backend must never invent lineage for a
# graph already authored by a current client.
candidate_config = CONFIG_SCHEMA(msg["config"])
# Keep the established public validation contract ahead of the
# structural migration barrier. A malformed passage can also make
# wall-host materialisation impossible, but callers must still get
# the actionable `invalid_passage_fields` code rather than the
# generic wall-model blocker.
validate_opening_passages(candidate_config, config_data.get("config"))
if submitted_model < WALL_SEGMENT_MODEL_VERSION:
candidate_config, _ = commit_wall_segment_model(candidate_config)
validated_config = CONFIG_SCHEMA(candidate_config)
+2
View File
@@ -22,6 +22,8 @@
enforces this upgrade when invoked directly. An authored wall chain remains
valid when it becomes a room or independent walls, while a rejected
transaction stores no partial result and no longer reports false success.
An invalid open passage also retains its specific actionable error instead
of being masked by the generic wall-model migration blocker.
Ambiguous legacy geometry is
left unchanged with a recovery prompt. No Plan editor controls or
zero-thickness-wall behaviour changed
+3 -1
View File
@@ -26,7 +26,9 @@
серверная транзакция Optimize также гарантирует это обновление при прямом
вызове. Принятая пользователем цепочка остаётся допустимой при преобразовании
в комнату или независимые стены, а отклонённая транзакция не записывает
частичный результат и не показывает ложное сообщение об успехе.
частичный результат и не показывает ложное сообщение об успехе. Невалидный
открытый проход по-прежнему получает своё точное сообщение об ошибке, а не
общий блокер миграции стен.
Неоднозначная старая геометрия остаётся без изменений с подсказкой по
восстановлению. Кнопки редактора плана и поведение стен нулевой толщины не
менялись