refactor(report): build_overrides + patch_report 통합 / list wholesale merge

- _build_overrides 가 result 받아 deep_merge 까지 처리, _patch_report 제거
- _deep_merge: list by-index → wholesale 치환 (EN 슬롯 누락/라벨 섞임 차단)
- build_facebook_audit: template-copy 대신 LLM logo/logo_description 만 두 페이지에 공통 적용
- _page_patch: language/label 명시 박음 (KR/EN 교차 오염 방지)
- FacebookPage/InstagramAccount/YouTubeAudit: 불필요한 Optional 제거, has_whatsapp/top_content_type 만 Optional 유지
- build_instagram_audit/build_facebook_audit: dict 반환 (overrides[k] = patch 단순 박기)
This commit is contained in:
minaChoi committed 2026-06-02 17:04:33 +09:00
1 parent 9a9ce1319f
commit 5504f79a9d
10 files changed
+144 -173

No files matched your search

+2 -2
View File
@@ -59,7 +59,7 @@ async def start_analysis(body: AnalysisCreate, background_tasks: BackgroundTasks
if mainpage:
await insert_raw_info(mainpage["source_id"], analysis_run_id, data_tag=SourceType.MAINPAGE)
# branding (HTML/CSS + Vision 로고 매칭) — mainpage 와 같은 homepage URL 을 source 로 사용.
branding_id = await insert_source(hospital_id, SourceType.BRANDING, mainpage["url"])
branding_id = await insert_source(hospital_id, SourceType.BRANDING, mainpage["url"], language="KR")
await insert_raw_info(branding_id, analysis_run_id, data_tag=SourceType.BRANDING)
# 클라가 안 보낸 채널은 mock_urls 에서 homepage 매칭으로 보충 (main + extra 동일 규칙).
@@ -75,7 +75,7 @@ async def start_analysis(body: AnalysisCreate, background_tasks: BackgroundTasks
]
for source_type, url in main_channels:
if url:
source_id = await insert_source(hospital_id, source_type, url)
source_id = await insert_source(hospital_id, source_type, url, language="KR")
await insert_raw_info(source_id, analysis_run_id, data_tag=source_type)
# 부가 채널 — instagram_en/facebook_en 은 동일 source_type 에 language='EN' 으로 구분, 나머지는 자체 source_type.