[feat] solution: 지역 이야기 생성 · 발행본 섹션 손질 · 마이그레이션 주석 축약
- 지역 이야기(가요·인물·연표·엽서·퀴즈) 생성 경로: story_service · grounding/story · section_prompts. 지금까지 만들 자리가 없어 시안에만 손으로 넣은 3만 자였다 - 발행본 섹션: ItinerarySection · Carousel 레일 자동재생(use-rail-autoplay) · Festival · LocalGuide · Weather · Gallery · Header/Footer - 목업 payload 를 payloads-mockup/ 으로 분리 — 발행 대상과 섞이지 않게 - DB 새 구조 후속: site_payload · local_content_crud 조인 정리 · 테스트 - 마이그레이션 주석 축약: 9개 파일 합계 주석 비율 48% → 25%. 실측과 밟은 함정만 남기고 논증은 커밋 메시지로 옮겼다 검증: site·frontend 빌드 통과 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3910feddfb
commit
328d9e18ee
58 files changed
+5625
-412
No files matched your search
@@ -44,7 +44,7 @@ async def _insert_fact(db_engine, place_id, key, value, status, unit_id=None):
|
||||
async with db_engine.begin() as conn:
|
||||
await conn.execute(
|
||||
text(
|
||||
"INSERT INTO facts (fact_id, place_id, unit_id, key, value, source_type, status, collected_at) "
|
||||
"INSERT INTO place_facts (fact_id, place_id, unit_id, key, value, source_type, status, collected_at) "
|
||||
"VALUES (:fid, :pid, :uid, :key, :val, :src, :status, now())"
|
||||
),
|
||||
{
|
||||
@@ -74,7 +74,7 @@ async def test_candidates_coexist_with_published_value(db_engine, owner_id):
|
||||
|
||||
async with db_engine.begin() as conn:
|
||||
rows = (await conn.execute(
|
||||
text("SELECT status FROM facts WHERE place_id = :pid AND key = 'check_in_time'"),
|
||||
text("SELECT status FROM place_facts WHERE place_id = :pid AND key = 'check_in_time'"),
|
||||
{"pid": uuid.UUID(place_id)},
|
||||
)).all()
|
||||
assert len(rows) == 3, "노출값 1건 + 후보 2건이 공존해야 한다"
|
||||
@@ -89,7 +89,7 @@ async def test_rejected_fact_frees_the_key(db_engine, owner_id):
|
||||
|
||||
async with db_engine.begin() as conn:
|
||||
rows = (await conn.execute(
|
||||
text("SELECT value, status FROM facts WHERE place_id = :pid ORDER BY status"),
|
||||
text("SELECT value, status FROM place_facts WHERE place_id = :pid ORDER BY status"),
|
||||
{"pid": uuid.UUID(place_id)},
|
||||
)).all()
|
||||
assert len(rows) == 2, "REJECTED 이력과 새 값이 함께 남아야 한다"
|
||||
@@ -111,7 +111,7 @@ async def test_same_key_allowed_across_units(db_engine, owner_id):
|
||||
async with db_engine.begin() as conn:
|
||||
for uid, name in ((unit_a, "A동"), (unit_b, "B동")):
|
||||
await conn.execute(
|
||||
text("INSERT INTO units (unit_id, place_id, name) VALUES (:uid, :pid, :name)"),
|
||||
text("INSERT INTO place_units (unit_id, place_id, name) VALUES (:uid, :pid, :name)"),
|
||||
{"uid": uid, "pid": uuid.UUID(place_id), "name": name},
|
||||
)
|
||||
|
||||
@@ -129,7 +129,7 @@ async def test_unit_fact_and_place_fact_are_separate(db_engine, owner_id):
|
||||
unit_id = uuid.uuid4()
|
||||
async with db_engine.begin() as conn:
|
||||
await conn.execute(
|
||||
text("INSERT INTO units (unit_id, place_id, name) VALUES (:uid, :pid, :name)"),
|
||||
text("INSERT INTO place_units (unit_id, place_id, name) VALUES (:uid, :pid, :name)"),
|
||||
{"uid": unit_id, "pid": uuid.UUID(place_id), "name": "A동"},
|
||||
)
|
||||
await _insert_fact(db_engine, place_id, "has_kitchen", "false", FactStatus.VERIFIED)
|
||||
|
||||
Reference in new issue
Block a user