feat(733-2): 사람 길 만들 때 같은 내용 409 물음 · 복사 딸림 재사용

- 새 M02_Library_Ask — 같은 층 같은 내용(733-1 지문) = 409 {같은것: [{키, 이름, 층, 주인}], 까닭} · 몸 새로 = 그래도 새로 · 씀 = 그 키(새 문서 0 · 같은 내용 아닌 키 = 다시 409)
- 길 = 새로 만들기(빈 문서 · 같은 층 복사 = 안 물음) · [단가산출로 저장] from-line · B09 내 자료집(같은이름 409 와 한 몸 · 하위 호표 지문 = 굳힌 문서) · 공유 요청 승인(일위대가 · 씀 = 사본 키) · 실무 호표 [구조물 조합으로](구조물 조합 지문 = 줄 수량 넣음)
- 복사 딸림 carry — 받는 층에 같은 원본 + 같은 내용 사본이 있으면 그 키 재사용(refs.copied_from) · B09 하위 호표 재사용 목록 = 실무자료 한정 → 모든 사본 원본
- 낡은 시험 고침: test_703 자료집 같은 이름 물음 — 새 이름이라도 같은 내용이면 409(정함 3장 3) → new=True 로 새로 · 씀 확인 더함
- 새 시험 test_733_2_library_ask(새로 · from-line · 승인 · carry) · test_705_2 구조물 조합으로 409

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-02 13:54:28 +09:00
co-authored by Claude Opus 5.5
parent 8588743906
commit 40980910fa
12 changed files with 379 additions and 33 deletions
@@ -359,6 +359,22 @@ def test_구조물_조합으로_남의_층_403(client):
assert client.post("/api/m02/layers/company/hopyo-item", json=body).status_code == 403
def test_구조물_조합으로_같은_내용_409_씀_새로(client):
"""733-2 — 이 층 같은 내용 항목 = 409 `{같은것}` → `씀` = 새 항목 0 · `새로` = 새 항목 1."""
key = _upload(client, "대흥")
url, body = "/api/m02/layers/personal/hopyo-item", {"층": "personal", "키": key, "번": 17}
first = client.post(url, json=body).json()
count = len(list((layers_dir() / "labor").glob("*.json")))
res = client.post(url, json=body)
assert res.status_code == 409 and res.json()["detail"]["같은것"][0]["키"] == first["열"]
used = client.post(url, json={**body, "씀": first["열"]}).json()
assert used["열"] == first["열"] and used["씀"] is True
assert len(list((layers_dir() / "labor").glob("*.json"))) == count
made = client.post(url, json={**body, "새로": True}).json()
assert made["열"] != first["열"]
assert len(list((layers_dir() / "labor").glob("*.json"))) == count + 1
def test_규격_열_이름():
from M02_MasterTemplete import M02_Hopyo_Item as item