feat(765-2): 지형마다 설계 한 벌 묶음 모듈 — 떠 두기 · 꺼내 끼우기(새 노선 id · 자식 다시 잇기 · 코리도 이름) · 지문 · 맞바꿈(실패 = 통째 되돌림)

- common_util_design_sets: 활성 벌 = 제자리 · 쉬는 벌 = design_sets/<las|sheet>/(db.json · files/ · initial_snapshot/ · meta.json)
- 벌 몫 = B05 노선 정본 · 코리도 · B06~B09 · 배수 노선 몫 · 초기값 · 공유 캐시(비용면 · 예정노선 · 하강장 · 도엽 좌표 · 강우)는 안 옮김 · 안 지움
- 옮김 = 같은 볼륨 이름 바꿈 · 단계 2 이후 행 · projects.status 함께
- 묶음 없음 · 지문 어긋남 = 그 자리에서 자동 설계 체인 한 번(inner = 마커 · 미리 셈은 부르는 쪽)
- 시험 test_765_design_sets 6 (왕복 값 같음 · 새 id · 묵은 벌 · 실패 되돌림)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-03 15:42:28 +09:00
co-authored by Claude Opus 5.5
parent dc16c500d0
commit a64d0fc57e
4 changed files with 882 additions and 4 deletions
+7 -4
View File
@@ -155,10 +155,12 @@ async def _prepare_drainage_pipes_and_reprofile(
async def run_auto_design_chain(
project_id: UUID, surface_model_id: int | None = None
project_id: UUID, surface_model_id: int | None = None, *, inner: bool = False
) -> dict[str, Any] | None:
"""B05 기본 경로 계산·확정 → B06 기본 횡단 설계 확정을 기본값으로 이어 실행한다.
`inner` = 두 벌 짓기 · 지형 칩 안에서 부름(765) — 진입 막음 마커 · 추천 미리 셈은 부르는 쪽.
WF1 자동 확정 직후 같은 백그라운드 태스크에서 호출된다. 어떤 단계가 실패해도
예외를 밖으로 던지지 않는다 — 로그와 각 단계의 workflow 상태 기록으로 남긴다.
@@ -359,12 +361,13 @@ async def run_auto_design_chain(
mark_design_failed(project_root, f"초기 설계 처리 중 오류: {exc}")
finally:
# 성공·실패·중단 어느 쪽이든 문은 연다 — 마커가 남으면 영영 못 들어간다.
if project_root is not None:
if project_root is not None and not inner:
clear_designing(project_root)
# 성공 · 실패 · 건너뜀 어느 쪽이든 추천 미리 셈 예약(763-3) — 추천은 지형 · 예정노선만 씀
from B05_Profile.B05_Profile_Router_RouteInitial import schedule_precompute
if not inner:
from B05_Profile.B05_Profile_Router_RouteInitial import schedule_precompute
schedule_precompute(project_id)
schedule_precompute(project_id)
async def _ensure_initial_polyline(