Merge remote-tracking branch 'origin/dev' into sub_laptop_3

This commit is contained in:
2026-10-22 14:35:04 +09:00
14 changed files with 496 additions and 543 deletions
+2 -2
View File
@@ -136,7 +136,7 @@ async function toggles(projectId, shift) {
const out = { same: await toggles("p266a", 0), mismatch: await toggles("p266b", 0.002) };
/* 서버 폴백(선형 저장분 없음) — 카드 선택이 요청에 실림 · 열쇠 = 측점 자리 */
/* 선형 저장분 없음 — 옛 서버 폴백 걷음(511-B B-4) · 부름 0 */
{
const projectId = "p266c";
m.writeState("std-cross", job.standard, projectId);
@@ -149,7 +149,7 @@ const out = { same: await toggles("p266a", 0), mismatch: await toggles("p266b",
ditch_choice: false,
});
await m.refreshSavedCross({ projectId, routeId: R, detail, edits: EDITS }, [], () => undefined);
out.server = { at, choices: previews.at(-1)?.design_choices ?? null };
out.server = { at, calls: previews.length };
}
process.stdout.write(JSON.stringify(out));
@@ -5,7 +5,7 @@
복합경사 · 측구 · 지반 단추마다 그 측점 설계선 · 면적이 바뀜.
- 묶음 측점 = 상세 측점이면 돌려줌 · 1 mm 넘게 다르면 null(묶음 엔진) — 그래도 카드 자료는 고침.
- 사면 이동 한 걸음도 같음 · 걸음마다 받는 쪽(카드 · 종단 · 유토 다시 그림) 한 번(441 · 요구 268-2 · 4).
- 서버 폴백(선형 저장분 없음)에도 카드 선택이 실림(열쇠 = 측점 자리) · 서버는 저장분 위에 얹음.
- 선형 저장분 없음 = 서버 폴백 없음(511-B B-4 · `/cross-design/preview` 걷음).
짝: `helper_266_card_toggle.mjs` · 진입점 `helper_266_card_toggle_entry.ts` ·
지형 · 노선 틀 = `test_346_2_pipeline_cross_page.py`.
"""
@@ -29,7 +29,6 @@ for path in (ROOT, HERE):
from test_346_2_pipeline_cross_page import _fake, _line, _sections # noqa: E402
from B06_Section.B06_Section_Router import _with_design_choices # noqa: E402
from common_util.common_util_surface_sampler import DtmGridSampler # noqa: E402
from config.config_system import STANDARD_ROCK_BOUNDARY_DEFAULT_OFFSET_M # noqa: E402
from config.config_system_design import STANDARD_CROSS_SECTION # noqa: E402
@@ -121,19 +120,6 @@ def test_측점_어긋남_카드_자료는_고침_돌려줄_값만_null(r):
_check_toggles(r["mismatch"], None)
def test_서버_폴백에_카드_선택_실음(r):
key = f"{r['server']['at']:.3f}"
choice = (r["server"]["choices"] or {}).get(key)
assert choice is not None, r["server"]
assert choice["ground_type"] == "soil"
assert choice["two_stage_slope"] is True
assert choice["ditch_choice"] is False
def test_서버_카드_선택이_저장분_위에_얹힘():
stored = [{"chainage_m": 40.0, "design": {"ground_type": "ripping_rock", "berm": {"w": 1}}}]
rows = _with_design_choices(stored, {"40.000": {"ground_type": "soil"}, "60.123": {"x": 1}})
by_key = {round(float(r["chainage_m"]), 3): r["design"] for r in rows} # 서버 읽는 꼴
assert by_key[40.0] == {"ground_type": "soil", "berm": {"w": 1}}
assert by_key[60.123] == {"x": 1}
assert _with_design_choices(stored, None) == stored
def test_선형_저장분_없음_서버_폴백_없음(r):
# 511-B B-4 — 옛 데이터 서버 프리뷰(`/cross-design/preview`) 걷음 · 부름 0
assert r["server"]["calls"] == 0, r["server"]
+5 -5
View File
@@ -201,13 +201,13 @@ def test_기본_설계가_넘긴_손_단면_유형으로_셈(tmp_path, monkeypat
import B06_Section.B06_Section_Router_Design as design_module
seen: list[tuple[str, object]] = []
real = design_module.compute_cross_design
real = design_module.compute_cross_designs # 511-B B-4 — 측점 묶음 Node 한 번
def spy(*args, **kwargs):
seen.append((kwargs["section_mode"], kwargs.get("ditch_side")))
return real(*args, **kwargs)
def spy(jobs, *args, **kwargs):
seen.extend((options["section_mode"], options.get("ditch_side")) for *_, options in jobs)
return real(jobs, *args, **kwargs)
monkeypatch.setattr(design_module, "compute_cross_design", spy)
monkeypatch.setattr(design_module, "compute_cross_designs", spy)
route = tmp_path / "routes" / "r1"
(route / "longitudinal").mkdir(parents=True)
(route / "cross_sections").mkdir()
@@ -46,7 +46,7 @@ def test_b06_context_uses_workflow_route():
def test_cross_refresh_is_single_entry():
"""횡단 재계산은 한 창구뿐 — 두 화면이 같은 인자를 실어 보낸다."""
assert "export async function refreshCrossDesigns" in REFRESH
assert "readStandardCrossSession(projectId)" in REFRESH
assert "effectiveStandardCross(projectId)" in REFRESH # 옛 서버 폴백 걷음(511-B B-4)
assert "readRockBoundarySession(projectId, routeId)" in REFRESH
# 부르는 곳 = 계산 묶음 cross 단계 하나(design_shared savedCross · 387-4) — 화면은 묶음에 부탁
shared = _read("A00_Common/design/design_shared.ts")