mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-05 14:19:04 +00:00
fix: junction limits are honest at the boundaries (#331)
Six normative cuts, both mirrors symmetric (spec revision 3): - §2.1 node keys quantise to 1e-7 with the repository's canonicalisation formula (sign·floor(|v|·1e7+0.5)/1e7, -0 normalised) — toFixed(6) keys split one node into two on floating debris and produced two false П4 refusals on a legitimate resize (reproduced: -1e-8 vs 0). Node pairs within 2e-7 of each other (raw coordinates) are ONE node, and the node-to-wall incidence uses the same quantum. - §2.2 a ~0° wedge IS a violation: two rays leaving a node the same way are a duplicated or overlaid wall (a butt joint yields 180°, never 0°) — the worst degenerate case was invisible while 0.5° was refused. - §2.3/§2.4 the wall run is an iterative edge walk over the collinear component: no recursion (10 000 atoms answered, not RangeError), no silently dropped fork (the old .find lost every branch but the first), O(E) by construction, and collinearity is measured against the BASE segment's axis so an arc of 0.9°-per-atom pieces cannot pose as one wall. - §2.5 an exception while judging the CANDIDATE refuses the write with the junction.limit_check_failed toast (fail-closed, as the #278 guard); the baseline branch stays fail-open by design and the smoke proves the asymmetry by breaking only the second call of the deterministic pair. - §2.6 the python mirror narrows its except on the candidate side only: a genuine migration bug (TypeError) surfaces as an honest WS error, while a previous-side bug keeps the wide "no baseline" fallback — the two AC6 cases pin the asymmetry so swapped sides turn a unit red. Parity fixtures gain the new boundary classes (debris node, duplicate wall, collinear fork); four new mutants pin the filter, the key precision, the dropped branch and the fail-open hole. Issue: #331 User-Visible: yes
This commit is contained in:
@@ -589,6 +589,7 @@
|
||||
"junction.limit_length": "The wall segment is too short: {actual} cm, minimum {limit} cm.",
|
||||
"junction.limit_distance": "Walls and nodes are too close: {actual} cm, minimum {limit} cm.",
|
||||
"junction.limit_clearance": "No room interior is left: {actual} cm², minimum {limit} cm².",
|
||||
"junction.limit_check_failed": "The junction check could not run — the change was not saved",
|
||||
"toast.wall_model_migration_blocked": "The wall model could not be updated: {reason}. The plan was not changed. Run “Optimize plans”; if the error repeats, fix the conflicting wall geometry.",
|
||||
"toast.wall_model_client_outdated": "Update the card and reload the page before editing the plan.",
|
||||
"wall_model.reason.invalid-room": "invalid room contour",
|
||||
|
||||
@@ -589,6 +589,7 @@
|
||||
"junction.limit_length": "Слишком короткий участок стены: {actual} см, минимум {limit} см.",
|
||||
"junction.limit_distance": "Стены и узлы слишком близко: {actual} см, минимум {limit} см.",
|
||||
"junction.limit_clearance": "Внутри комнаты не остаётся места: {actual} см², минимум {limit} см².",
|
||||
"junction.limit_check_failed": "Проверку стыков выполнить не удалось — изменение не сохранено",
|
||||
"toast.wall_model_migration_blocked": "Не удалось обновить модель стен: {reason}. План не изменён. Запустите «Оптимизировать планы»; если ошибка повторится, исправьте конфликтующую геометрию стен.",
|
||||
"toast.wall_model_client_outdated": "Обновите карточку и перезагрузите страницу перед редактированием плана.",
|
||||
"wall_model.reason.invalid-room": "некорректный контур комнаты",
|
||||
|
||||
Reference in New Issue
Block a user