fix(b05): 옹벽 높이 제안값 2.5 → 2.0 — 관측 원단위 자료가 반중력식 H=2.0 한 벌뿐(A4)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
This commit is contained in:
2026-09-14 13:48:24 +09:00
co-authored by Claude Opus 5
parent 5f3c55f32b
commit c59dbba482
4 changed files with 51 additions and 3 deletions
+2 -1
View File
@@ -726,7 +726,8 @@
"label": "높이",
"input": "number",
"unit": "m",
"default": 2.5,
"default": 2.0,
"default_basis": "제안값 2.0 — 관측 원단위 자료가 반중력식 H=2.0 한 벌뿐이라 그 값(2026-09-14 A4 · 옛 2.5 는 자료 없음)",
"required": false,
"phase": "b05",
"empty_means": "비워도 놓임 — 줄만 서고 미확정이라 금액에 안 들어감(높이를 적으면 섬 · 2026-09-14 브레인 판정 ①)"
@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
"""옹벽 높이 제안값 2.0 — A4 (2026-09-14 브레인 차례 ③).
등록부 옹벽 높이 기본(=폼의 회색 제안값)이 2.5 였는데 관측 원단위 자료는 반중력식 H=2.0 한 벌뿐 →
[제안값 넣기]를 누르면 표가 안 서는 값이 들어가 「원단위 미확보」 사유만 뜸. 자료가 있는 2.0 으로 내림.
⚠ 기본값은 여전히 **제안**일 뿐 — 칸에 채우지 않음(폼 판정 ①②).
"""
from __future__ import annotations
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from B05_Profile.B05_Profile_Structures_Schema import structure_type_map # noqa: E402
from B08_Quantity.B08_Quantity_Engine_UnitQuantity import expand # noqa: E402
from B08_Quantity.B08_Quantity_Engine_ObservedUnit import load_observed_table # noqa: E402
def _height_default() -> float:
options = {option.key: option for option in structure_type_map()["retaining_wall"].options}
return options["height_m"].default
def test_옹벽_높이_제안값은_자료가_있는_2_0() -> None:
assert _height_default() == 2.0
def test_제안값을_넣으면_표가_선다() -> None:
structure = {
"structure_id": "rw",
"type_id": "retaining_wall",
"start_m": 0.0,
"end_m": 10.0,
"options": {"form": "반중력식", "height_m": _height_default(), "length_m": 10.0},
}
result = expand(structure, {"retaining_wall": "옹벽"}, load_observed_table())
assert result.components, result.notes
@@ -255,7 +255,12 @@ def test_slope_group_computes_range_from_length():
# 생기며 required는 풀렸다). 후길이 = 길이 − 전길이는 화면 계산값이라 옵션이
# 아니다. 순서는 높이 → 길이 → 전길이.
options = {option.key: option for option in item.options}
expected = {"height_m": 2.5, "length_m": 10, "before_m": 5}
# ⚠ 옹벽만 높이 2.0 — 관측 원단위 자료가 반중력식 H=2.0 한 벌뿐(2026-09-14 A4 브레인 판정).
expected = {
"height_m": 2.0 if type_id == "retaining_wall" else 2.5,
"length_m": 10,
"before_m": 5,
}
for key, default in expected.items():
assert key in options, f"{type_id}.{key} 옵션 없음"
assert options[key].phase == "b05", f"{type_id}.{key}는 b05 phase"
@@ -65,7 +65,8 @@ def test_structure_types_endpoint_returns_registry(client):
# (기본값 원칙 ② — 구 저장분 저장 거부 재발 방지). 상세 정책은 registry_policy 테스트.
wall = next(item for item in body["types"] if item["type_id"] == "retaining_wall")
height = next(option for option in wall["options"] if option["key"] == "height_m")
assert height["required"] is False and height["default"] == 2.5
# 2026-09-14 A4 — 옹벽 제안값은 자료가 있는 2.0(반중력식 H=2.0 한 벌뿐).
assert height["required"] is False and height["default"] == 2.0
def test_read_structures_empty_project(client):