[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

+9 -27
View File
@@ -1,12 +1,4 @@
"""내 사이트 목록 — 로그인한 사장님이 자기 사이트 전부를 보는 화면의 뒷단.
이 경로가 절대 하면 안 되는 것:
- 사이트가 아직 없는 사업장을 빼는 것 — 위저드를 걸어오다 만 가게가 목록에서 사라지면
사장님은 그걸 다시 찾을 길이 없다(에디터 주소를 아무도 기억하지 않는다).
- 사장님 스코프를 놓치는 것 — 남의 가게가 내 목록에 섞이면 그건 목록이 아니라 사고다.
- 단건(GET /v1/place/{id}/site)과 다른 재빌드 판정을 내는 것 — 목록과 에디터가 서로 다른
답을 하면 사장님은 어느 쪽을 믿을지 알 수 없다.
"""
"""내 사이트 목록 — 로그인한 사장님이 자기 사이트 전부를 보는 화면의 뒷단."""
import uuid
from sqlalchemy import text
@@ -24,8 +16,7 @@ async def _list(client, headers, **params):
async def test_place_without_site_is_still_listed(auth_headers, client):
"""검증: 사이트 행이 없는 사업장(위저드만 걸어온 것)도 목록에 나온다.
기대결과: 줄은 있고 site_id 는 없다 — 화면이 '만드는 중'으로 그릴 근거다."""
"""검증: 사이트 행이 없는 사업장(위저드만 걸어온 것)도 목록에 나온다."""
h = await auth_headers("my1")
await _place(client, h, "아직펜션")
@@ -39,8 +30,7 @@ async def test_place_without_site_is_still_listed(auth_headers, client):
async def test_site_row_is_joined_into_the_line(auth_headers, client):
"""검증: 사업장과 사이트가 한 줄로 합쳐져 온다(줄마다 사이트를 다시 묻지 않는다).
기대결과: 템플릿·주소가 목록에 그대로 보인다."""
"""검증: 사업장과 사이트가 한 줄로 합쳐져 온다(줄마다 사이트를 다시 묻지 않는다)."""
h = await auth_headers("my2")
pid = await _place(client, h, "합쳐진펜션")
await client.post(f"/v1/place/{pid}/site/template", headers=h, json={"template_id": "paper"})
@@ -54,11 +44,7 @@ async def test_site_row_is_joined_into_the_line(auth_headers, client):
async def test_row_carries_what_the_card_draws(auth_headers, client, db_engine):
"""검증: 목록 줄이 카드가 그릴 값을 다 들고 온다 — 주소·생성일·썸네일.
★ 왜 이걸 본다: 같은 상호로 만든 사업장이 여러 줄일 때(실측: 한 계정에 '버터브루' 4줄)
이름과 상태 배지만으로는 어느 게 어느 건지 가릴 수 없다. 가르는 값은 주소와 시각이고,
**한 번이라도 발행한 줄은 그림**이다."""
"""검증: 목록 줄이 카드가 그릴 값을 다 들고 온다 — 주소·생성일·썸네일."""
h = await auth_headers("my2b")
pid = await _place(client, h, "카드펜션")
async with db_engine.begin() as conn:
@@ -80,8 +66,7 @@ async def test_row_carries_what_the_card_draws(auth_headers, client, db_engine):
async def test_row_without_a_site_has_no_thumbnail(auth_headers, client):
"""검증: 아직 발행 안 한 줄은 그림이 없다(키 자체가 없다).
기대결과: 화면이 '그림 없음' 자리를 그릴 근거가 된다 — 빈 문자열로 오면 깨진 이미지가 뜬다."""
"""검증: 아직 발행 안 한 줄은 그림이 없다(키 자체가 없다)."""
h = await auth_headers("my2c")
await _place(client, h, "그림없는펜션")
@@ -90,8 +75,7 @@ async def test_row_without_a_site_has_no_thumbnail(auth_headers, client):
async def test_other_owners_sites_are_not_listed(auth_headers, client):
"""검증: 사장님 스코프. 남의 사업장은 보이지 않는다.
기대결과: 각자 자기 것만 1건."""
"""검증: 사장님 스코프."""
mine = await auth_headers("my3")
theirs = await auth_headers("my3b")
await _place(client, mine, "내펜션")
@@ -102,11 +86,10 @@ async def test_other_owners_sites_are_not_listed(auth_headers, client):
async def test_needs_rebuild_matches_the_single_site_answer(auth_headers, client, db_engine):
"""검증: 재빌드 판정이 단건 조회와 같은 답을 낸다.
기대결과: 노출값이 바뀐 사업장은 목록에서도 needs_rebuild=true."""
"""검증: 재빌드 판정이 단건 조회와 같은 답을 낸다."""
h = await auth_headers("my4")
pid = await _place(client, h, "고친펜션")
# 템플릿 저장이 사이트 행을 만든다. 그 뒤 노출값이 바뀐 것으로 표시한다.
# 템플릿 저장이 사이트 행을 만든다.
await client.post(f"/v1/place/{pid}/site/template", headers=h, json={"template_id": "paper"})
async with db_engine.begin() as conn:
await conn.execute(
@@ -121,6 +104,5 @@ async def test_needs_rebuild_matches_the_single_site_answer(auth_headers, client
async def test_list_requires_login(client):
"""검증: 내 것을 보는 화면이므로 토큰 없이는 열리지 않는다.
기대결과: 401."""
"""검증: 내 것을 보는 화면이므로 토큰 없이는 열리지 않는다."""
assert (await client.get("/v1/site/list")).status_code == 401