From 7d7fd64d6bf44e14edb4d664960c4226a336fbc4 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 4 Aug 2026 18:34:09 +0900 Subject: [PATCH] =?UTF-8?q?feat(B03):=20WF1=20=EC=9E=90=EB=8F=99=20?= =?UTF-8?q?=ED=99=95=EC=A0=95=EC=9D=84=20=EC=97=AD=ED=95=A0=20=EB=AC=B4?= =?UTF-8?q?=EA=B4=80=EC=9C=BC=EB=A1=9C=20=ED=99=95=EB=8C=80=20=E2=80=94=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=EB=8F=84=20B06=EA=B9=8C=EC=A7=80=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=20=EC=B2=B4=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SYSTEM_ADMIN 예외를 제거한다(2026-08-04 사용자 확정 — 관리자도 같은 사용자). 업로드 후 모두 기본값으로 지표면 자동 확정 -> B05 기본 경로 -> B06 기본 횡단 설계까지 체인을 탄다. 관리자가 B04에서 다른 모델로 재확정하는 경로는 그대로이며, 체인은 경로가 이미 있으면 스스로 건너뛴다. Co-Authored-By: Claude Opus 5 (1M context) --- B03_FileInput/B03_FileInput_Service_WF1.py | 52 +++++++++++++--------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/B03_FileInput/B03_FileInput_Service_WF1.py b/B03_FileInput/B03_FileInput_Service_WF1.py index ee82e056..976daf86 100644 --- a/B03_FileInput/B03_FileInput_Service_WF1.py +++ b/B03_FileInput/B03_FileInput_Service_WF1.py @@ -51,7 +51,12 @@ async def trigger_wf1_analysis_and_email( input_file_id: int, user_role: str, ) -> None: - """WF1 분석·DB 저장 후 역할에 따라 자동 확정하고 이메일을 발송한다.""" + """WF1 분석·DB 저장 후 자동 확정하고 이메일을 발송한다. + + 자동 확정은 역할 무관이다(2026-08-04 사용자 확정 — 관리자도 같은 사용자). + `user_role`은 호출부 시그니처 유지용으로만 남겨 둔다. + """ + _ = user_role pool = get_db_pool() project_info: dict[str, Any] | None = None try: @@ -110,28 +115,31 @@ async def trigger_wf1_analysis_and_email( analysis_result=analysis_result, source_filters=source_filters, ) - if user_role != "SYSTEM_ADMIN": - from B04_wf1_Surface.B04_wf1_Surface_Service import ( - confirm_surface_selection, - find_surface_model_for_selection, - ) + # 역할 무관 자동 확정(2026-08-04 사용자 확정) — 시스템 관리자도 같은 + # 사용자다. 모두 기본값으로 자동 확정하고 B05·B06 자동 계산 체인까지 탄다. + # 관리자는 B04에서 다른 모델을 골라 재확정할 수 있다(체인은 경로가 이미 + # 있으면 스스로 건너뛴다). + from B04_wf1_Surface.B04_wf1_Surface_Service import ( + confirm_surface_selection, + find_surface_model_for_selection, + ) - selection = surface_confirmation_defaults() - try: - model_id = await find_surface_model_for_selection( - connection, project_id, selection - ) - except LookupError as exc: - auto_confirmation_error = str(exc) - logger.error( - "WF1 자동 확정 보류: project_id=%s reason=%s", - project_id, - auto_confirmation_error, - ) - else: - await confirm_surface_selection(connection, project_id, model_id, selection) - auto_confirmed = True - confirmed_model_id = model_id + selection = surface_confirmation_defaults() + try: + model_id = await find_surface_model_for_selection( + connection, project_id, selection + ) + except LookupError as exc: + auto_confirmation_error = str(exc) + logger.error( + "WF1 자동 확정 보류: project_id=%s reason=%s", + project_id, + auto_confirmation_error, + ) + else: + await confirm_surface_selection(connection, project_id, model_id, selection) + auto_confirmed = True + confirmed_model_id = model_id await connection.commit() except Exception: await connection.rollback()