mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-03 13:18:58 +00:00
fix: preserve passage validation during wall migration
Issue: #282 User-Visible: yes
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
серверная транзакция Optimize также гарантирует это обновление при прямом
|
||||
вызове. Принятая пользователем цепочка остаётся допустимой при преобразовании
|
||||
в комнату или независимые стены, а отклонённая транзакция не записывает
|
||||
частичный результат и не показывает ложное сообщение об успехе.
|
||||
частичный результат и не показывает ложное сообщение об успехе. Невалидный
|
||||
открытый проход по-прежнему получает своё точное сообщение об ошибке, а не
|
||||
общий блокер миграции стен.
|
||||
Неоднозначная старая геометрия остаётся без изменений с подсказкой по
|
||||
восстановлению. Кнопки редактора плана и поведение стен нулевой толщины не
|
||||
менялись
|
||||
|
||||
Reference in New Issue
Block a user