[chore] solution,admin,ontology: 코드 주석을 한 줄로 — 히스토리 주석 삭제

여러 줄 주석이 설명보다 경위(예전·실측·지적)를 적고 있어 읽는 사람이 결론을 찾기 어려웠다.

- ts·tsx·js·mjs·css·py 478개: 여러 줄 주석은 첫 문장 한 줄로, 과거형·날짜 문장은 삭제
- 주석 위치는 TypeScript 파서·파이썬 tokenize/ast 로 찾는다 — 문자열 안의 # · /* 는 건드리지 않는다
- eslint·ts·noqa·type: ignore 같은 지시 주석은 그대로 둔다

파이썬 275개 정리 전후 AST 동일, TS 298개 주석 뺀 토큰 동일(빈 JSX 주석 10곳만 차이).
site·frontend·admin tsc, site vitest 105 passed

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
minaChoiandClaude Opus 5.5 committed 2026-09-28 16:05:19 +09:00
1 parent c6908629f3
commit 11d30bb3d1
479 files changed
+3337 -13091

No files matched your search

+14 -32
View File
@@ -1,9 +1,4 @@
"""places 도메인 e2e — 등록 / 동일 업소 검증 / 사장님 스코프 / 채널 URL 확정 게이트.
★ 이 도메인의 핵심 규칙 두 개를 고정한다:
1. 검증(verify) 전에는 채널 URL 을 확정할 수 없다 → 크롤링이 안 열린다
2. 남의 사업장은 '없음'으로 보인다
"""
"""places 도메인 e2e — 등록 / 동일 업소 검증 / 사장님 스코프 / 채널 URL 확정 게이트."""
import uuid
from common.enums import ErrorType, LinkChannel, PlaceCategory, SourceType
@@ -16,8 +11,7 @@ async def _create_place(client, headers, name="테스트펜션", category=PlaceC
async def test_create_place_starts_unverified(auth_headers, client):
"""검증: 상호명만으로 사업장을 등록한다.
기대결과: 생성되고 status=DRAFT, verified_at 없음 — 아직 수집이 열리지 않은 상태."""
"""검증: 상호명만으로 사업장을 등록한다."""
h = await auth_headers("u1")
body = await _create_place(client, h)
@@ -28,16 +22,14 @@ async def test_create_place_starts_unverified(auth_headers, client):
async def test_create_place_rejects_blank_name(auth_headers, client):
"""검증: 빈 상호명으로 등록.
기대결과: INVALID_REQUEST_DATA(101)."""
"""검증: 빈 상호명으로 등록."""
h = await auth_headers("u1")
r = await client.post("/v1/place", headers=h, json={"name": " ", "category": 1})
assert r.json()["result"]["code"] == ErrorType.INVALID_REQUEST_DATA.value
async def test_verify_place_opens_collection(auth_headers, client):
"""검증: 카카오 로컬 결과로 동일 업소를 확정한다.
기대결과: external_place_id·주소·행정구역코드가 박히고 verified_at 이 찍힌다."""
"""검증: 카카오 로컬 결과로 동일 업소를 확정한다."""
h = await auth_headers("u1")
pid = (await _create_place(client, h))["place"]["place_id"]
@@ -61,8 +53,7 @@ async def test_verify_place_opens_collection(auth_headers, client):
async def test_duplicate_kakao_place_is_allowed(auth_headers, client):
"""검증: 같은 사장님이 같은 카카오 장소를 두 사업장에 붙인다.
기대결과: 둘 다 등록된다 — 한 사용자가 같은 실제 업장으로 여러 프로젝트를 만들 수 있다."""
"""검증: 같은 사장님이 같은 카카오 장소를 두 사업장에 붙인다."""
h = await auth_headers("u1")
first = (await _create_place(client, h, "A펜션"))["place"]["place_id"]
second = (await _create_place(client, h, "A펜션(중복)"))["place"]["place_id"]
@@ -73,8 +64,7 @@ async def test_duplicate_kakao_place_is_allowed(auth_headers, client):
async def test_naver_verify_without_external_id(auth_headers, client):
"""검증: 네이버로 검증한다 — 고유 장소 id 가 없고 도로명주소만 있다.
기대결과: 확정된다 — 네이버는 카카오 같은 고유 id 를 주지 않으므로 주소가 식별 근거다."""
"""검증: 네이버로 검증한다 — 고유 장소 id 가 없고 도로명주소만 있다."""
h = await auth_headers("u1")
body = await _create_place(client, h, "핑크비치펜션")
pid = body["place"]["place_id"]
@@ -92,8 +82,7 @@ async def test_naver_verify_without_external_id(auth_headers, client):
async def test_naver_duplicate_name_and_address_is_allowed(auth_headers, client):
"""검증: 고유 id 없이 같은 상호명·같은 도로명주소로 두 번 등록한다.
기대결과: 둘 다 등록된다."""
"""검증: 고유 id 없이 같은 상호명·같은 도로명주소로 두 번 등록한다."""
h = await auth_headers("u1")
addr = "강원특별자치도 양양군 현북면 하조대3길 11"
first = (await _create_place(client, h, "핑크비치펜션"))["place"]["place_id"]
@@ -117,8 +106,7 @@ async def test_delete_place_removes_it_from_list(auth_headers, client):
async def test_same_address_different_business_is_allowed(auth_headers, client):
"""검증: 같은 건물(같은 도로명주소)에 상호명이 다른 두 가게를 등록한다.
기대결과: 둘 다 통과 — ★ 한 건물에 카페와 식당이 같이 있다. 주소만으로 막으면 안 된다."""
"""검증: 같은 건물(같은 도로명주소)에 상호명이 다른 두 가게를 등록한다."""
h = await auth_headers("u1")
addr = "서울특별시 강남구 테헤란로 1"
a = (await _create_place(client, h, "1층카페"))["place"]["place_id"]
@@ -129,8 +117,7 @@ async def test_same_address_different_business_is_allowed(auth_headers, client):
async def test_verify_without_any_identifier_is_rejected(auth_headers, client):
"""검증: 고유 id 도 주소도 없이 확정을 시도한다.
기대결과: PLACE_VERIFY_NO_CANDIDATE — 식별 근거가 없으면 '그 가게'라고 말할 수 없다."""
"""검증: 고유 id 도 주소도 없이 확정을 시도한다."""
h = await auth_headers("u1")
pid = (await _create_place(client, h))["place"]["place_id"]
@@ -139,8 +126,7 @@ async def test_verify_without_any_identifier_is_rejected(auth_headers, client):
async def test_place_is_scoped_to_owner(auth_headers, client):
"""검증: 다른 사장님 계정으로 남의 사업장을 조회한다.
기대결과: PLACE_NOT_FOUND — 존재 자체가 보이지 않는다(IDOR 차단)."""
"""검증: 다른 사장님 계정으로 남의 사업장을 조회한다."""
h1 = await auth_headers("owner1")
pid = (await _create_place(client, h1))["place"]["place_id"]
@@ -150,8 +136,7 @@ async def test_place_is_scoped_to_owner(auth_headers, client):
async def test_link_cannot_be_confirmed_before_place_verified(auth_headers, client):
"""검증: 동일 업소 검증 전에 채널 URL 을 확정하려 한다.
기대결과: PLACE_NOT_VERIFIED — ★ 검증 없이는 크롤링이 열리지 않는다."""
"""검증: 동일 업소 검증 전에 채널 URL 을 확정하려 한다."""
h = await auth_headers("u1")
pid = (await _create_place(client, h))["place"]["place_id"]
@@ -167,8 +152,7 @@ async def test_link_cannot_be_confirmed_before_place_verified(auth_headers, clie
async def test_confirmed_link_becomes_crawl_target(auth_headers, client):
"""검증: 검증 통과 후 채널 URL 을 확정한다.
기대결과: confirmed_at 이 찍히고 confirmed_only 목록에 나타난다(= 크롤링 대상)."""
"""검증: 검증 통과 후 채널 URL 을 확정한다."""
h = await auth_headers("u1")
pid = (await _create_place(client, h))["place"]["place_id"]
await client.post(f"/v1/place/{pid}/verify", headers=h, json={"external_place_id": "222"})
@@ -193,8 +177,7 @@ async def test_confirmed_link_becomes_crawl_target(auth_headers, client):
async def test_confirm_link_twice_is_rejected(auth_headers, client):
"""검증: 이미 확정된 링크를 다시 확정한다.
기대결과: LINK_NOT_FOUND — 조건부 UPDATE 가 0행이라 동시 처리에도 안전하다."""
"""검증: 이미 확정된 링크를 다시 확정한다."""
h = await auth_headers("u1")
pid = (await _create_place(client, h))["place"]["place_id"]
await client.post(f"/v1/place/{pid}/verify", headers=h, json={"external_place_id": "333"})
@@ -207,8 +190,7 @@ async def test_confirm_link_twice_is_rejected(auth_headers, client):
async def test_unknown_place_returns_not_found(auth_headers, client):
"""검증: 없는 place_id 조회.
기대결과: PLACE_NOT_FOUND."""
"""검증: 없는 place_id 조회."""
h = await auth_headers("u1")
r = await client.get(f"/v1/place/{uuid.uuid4()}", headers=h)
assert r.json()["result"]["code"] == ErrorType.PLACE_NOT_FOUND.value