feat(713-1): 로직 정본 개정 확인 서버 — /save · 흐름 저장 · 지우기 · 더하기가 로직 정본 줄을 바꾸면 개정확인 없이는 409(개정 · 까닭) · 같은 줄 다시 보냄 · 요소 · 자체는 대상 밖 · 줄 바탕 지문 row_print(계산 칸) · GET /logic 지문 · 새 파일 Store_Revise
낡은 시험 고침: test_m01_api · test_m01_cache · test_m01_logic_flow_save · test_208_1_logic_alias · test_m01_logic_flow_project 가 임시 사본의 정본 로직 줄을 고쳐 저장 — 이제 개정 확인이 필요하므로 몸에 개정확인 true(뜻 그대로) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ from M01_MasterData import M01_MasterData_Store as store
|
||||
from M01_MasterData import M01_MasterData_Store_Combo as combo_store
|
||||
from M01_MasterData import M01_MasterData_Store_Flow as flow
|
||||
from M01_MasterData import M01_MasterData_Store_Make as make
|
||||
from M01_MasterData import M01_MasterData_Store_Revise as revise
|
||||
|
||||
import master_basis as mbs # noqa: E402 (`store` 가 scripts 를 길에 둠)
|
||||
|
||||
@@ -49,6 +50,7 @@ class FileChanges(BaseModel):
|
||||
|
||||
class SaveBody(BaseModel):
|
||||
files: list[FileChanges]
|
||||
개정확인: bool = False # 로직 정본 줄 고침 = 「원문 개정 반영」 확인(713-1) · 없으면 409
|
||||
|
||||
|
||||
class NewLogic(BaseModel):
|
||||
@@ -196,7 +198,9 @@ def get_logics(
|
||||
|
||||
@router.get("/logic")
|
||||
def get_logic(key: str) -> dict:
|
||||
return _call(store.logic, key)
|
||||
"""`지문` = 줄 바탕 지문(계산 칸 · `Store_Revise.row_print`) — M02 덮개 「M01 개정」 비교 값."""
|
||||
out = _call(store.logic, key)
|
||||
return {**out, "지문": revise.row_print(out["logic"])}
|
||||
|
||||
|
||||
@router.get("/logic/source")
|
||||
@@ -275,7 +279,7 @@ def post_text(body: CalcBody) -> dict:
|
||||
@router.post("/save")
|
||||
def post_save(body: SaveBody) -> dict:
|
||||
"""「흐름」 줄은 검사 · 서버 다시 셈 · 새 줄(키 없음)은 자체 GX — {files, added, warnings}."""
|
||||
return _call(flow.save, [f.model_dump() for f in body.files])
|
||||
return _call(flow.save, [f.model_dump() for f in body.files], body.개정확인)
|
||||
|
||||
|
||||
@router.get("/logic/flow")
|
||||
|
||||
Reference in New Issue
Block a user