o2o-site-AEO/solution/backend/tests
hbyang b1a34ba58d [feat] solution/backend,frontend: 에이전트 도구·런타임·빌더 채팅창 — 2단계
런타임이 채널을 모르므로 채널·챗봇 심사 없이 에이전트 전체를 빌더 화면에서
검증할 수 있다. 웹훅 핸들러 안에 짜면 빌더에서 같은 걸 못 쓰고, 심사가 끝나야
무엇 하나 확인되지 않는다 — 카톡은 나중에 붙는 두 번째 입구다.

- services/agent/tools.py: 도구 넷 + 등급 셋(READ·REVERSIBLE·SEMI).
  ★ 도구는 반드시 services/* 를 통과한다 — crud 를 직접 부르면 스키마 검증·
  출처 필수·정정본 보호가 아무 증상 없이 사라진다. 테스트가 소스로 검사한다
- services/agent/runtime.py: 발화 → 도구 선택(LLM 1콜) → 실행 → 응답
- services/prompts/agent.py: LLM 네 겹 규약대로 프롬프트만 여기
- router/v1/agent/chat.py + features/agent/AgentChatDock.tsx(/sites 우하단)

모델에게 맡기지 않은 셋:
- 등급 — 응답 스키마에 칸 자체가 없다. 모델이 정하면 프롬프트에 끼어든 한 줄이
  확인 절차를 건너뛴다
- 결과 문구 — 도구가 만든다. 모델이 쓰면 하지 않은 일을 했다고 말할 수 있고
  사장님에게는 그 말이 사실로 보인다
- key — set_fact 의 key 는 업종 스키마가 최종 판정이다

확인(SEMI)은 실행하지 않고 되묻는다. 돌아온 confirm 값을 믿지 않고 도구는
레지스트리에서 다시 찾고 인자는 도구가 다시 검증한다 — 확인 절차가 검증을
건너뛰는 구멍이 되면 안 된다.

값을 고치면 재발행 안내를 함께 낸다 — fact 는 바뀌어도 사이트는 안 바뀐다.

test_agent_runtime.py 17 passed(LLM 은 monkeypatch, 실제 모델 호출 없음).
전체 796 passed / 50 failed — 그 50건은 HEAD 에서도 동일한 기존 이슈.
npm run lint 통과

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 16:18:00 +09:00
..
test_agent_runtime.py [feat] solution/backend,frontend: 에이전트 도구·런타임·빌더 채팅창 — 2단계 2026-09-21 16:18:00 +09:00
test_alert_service.py [fix] solution: 온보딩 생성·크롤링 진단·장애 알림 묶음 2026-09-16 16:25:02 +09:00
test_auth.py [fix] solution: 온보딩 생성·크롤링 진단·장애 알림 묶음 2026-09-16 16:25:02 +09:00
test_azure_static.py 구조: 사장님(solution)과 내부 운영(admin)을 두 앱으로 가른다 2026-08-31 15:12:09 +09:00
test_blog_owner.py [feat] solution: 미니 블로그·이용후기·예약요청 추가, /s/stay 목업·발행 사이트 UI 다수 수정 2026-09-18 09:03:18 +09:00
test_blog_post.py [feat] solution: 미니 블로그·이용후기·예약요청 추가, /s/stay 목업·발행 사이트 UI 다수 수정 2026-09-18 09:03:18 +09:00
test_booking_request.py [feat] solution: 미니 블로그·이용후기·예약요청 추가, /s/stay 목업·발행 사이트 UI 다수 수정 2026-09-18 09:03:18 +09:00
test_build_publish.py [fix] solution: 온보딩 생성·크롤링 진단·장애 알림 묶음 2026-09-16 16:25:02 +09:00
test_category_schema.py 업종 4번째를 관광체험 → 피부과·성형외과 로 바꾸고, 로그인 관문을 에디터 진입으로 되돌린다 2026-09-02 15:42:34 +09:00
test_collect_api.py [refactor] solution/backend,frontend,postgres-init: 회사(테넌트) 제거 — 사장님 계정이 곧 스코프 2026-09-08 13:01:14 +09:00
test_collect_pipeline.py [feat] solution,postgres-init,docs: 생성 진행 상태 · 새로 만들기 존중 · 발행본 색인·파비콘 2026-09-15 17:29:27 +09:00
test_collector.py [feat] solution,postgres-init,docs: 생성 진행 상태 · 새로 만들기 존중 · 발행본 색인·파비콘 2026-09-15 17:29:27 +09:00
test_config.py [feat] solution/backend,frontend: id/pw 가입 · 구글 로그인 — 계정을 만들 길이 없던 걸 연다 2026-09-02 09:33:59 +09:00
test_copy_api.py [feat] solution,postgres-init,docs: 생성 진행 상태 · 새로 만들기 존중 · 발행본 색인·파비콘 2026-09-15 17:29:27 +09:00
test_cost.py 구조: 사장님(solution)과 내부 운영(admin)을 두 앱으로 가른다 2026-08-31 15:12:09 +09:00
test_extract_grounding.py 구조: 사장님(solution)과 내부 운영(admin)을 두 앱으로 가른다 2026-08-31 15:12:09 +09:00
test_fact_api.py [feat] solution,postgres-init,docs: 생성 진행 상태 · 새로 만들기 존중 · 발행본 색인·파비콘 2026-09-15 17:29:27 +09:00
test_fact_schema.py [feat] solution: 지역 이야기 생성 · 발행본 섹션 손질 · 마이그레이션 주석 축약 2026-09-10 14:36:00 +09:00
test_faq_api.py [fix] solution/backend,docs: LLM 이 쓴 문장은 승인 없이 나간다 — 소개문이 생성되고도 영영 빈칸이던 것 2026-09-10 17:03:44 +09:00
test_faq_fill.py [feat] solution,postgres-init: FAQ 를 20개까지 채운다 — 펜션 공통 질문 30개 + 문의 안내 2026-09-14 17:05:43 +09:00
test_gemini_text.py feat(backend): Gemini 기반 소개문 요약 함수 추가 2026-09-14 17:01:00 +09:00
test_gemini.py 구조: 사장님(solution)과 내부 운영(admin)을 두 앱으로 가른다 2026-08-31 15:12:09 +09:00
test_google_identity.py [feat] solution/backend,frontend: id/pw 가입 · 구글 로그인 — 계정을 만들 길이 없던 걸 연다 2026-09-02 09:33:59 +09:00
test_healthz.py [fix] solution: 온보딩 생성·크롤링 진단·장애 알림 묶음 2026-09-16 16:25:02 +09:00
test_indexnow.py 구조: 사장님(solution)과 내부 운영(admin)을 두 앱으로 가른다 2026-08-31 15:12:09 +09:00
test_itinerary_grounding.py [feat] solution/backend: 업소를 여행 일정의 출발·복귀 정거장으로 넣는다 2026-09-11 16:56:05 +09:00
test_itinerary_llm_service.py [feat] solution,postgres-init,docs: 생성 진행 상태 · 새로 만들기 존중 · 발행본 색인·파비콘 2026-09-15 17:29:27 +09:00
test_itinerary_payload.py [feat] solution/backend: 일정을 스냅샷에서 읽는다 — 즉석 계산을 잠시 쉬게 한다 2026-09-11 11:49:51 +09:00
test_itinerary_prompt.py [feat] solution/backend: 일정 컨셉당 2개씩, 총 10개로 확대 — 컨셉 축은 그대로 5개 2026-09-11 13:31:05 +09:00
test_itinerary_trigger.py [feat] solution/backend: 일정 생성을 잡에 붙인다 — 에디터 요청을 붙잡지 않는다 2026-09-11 11:51:39 +09:00
test_job_queue.py [fix] solution: 온보딩 생성·크롤링 진단·장애 알림 묶음 2026-09-16 16:25:02 +09:00
test_kakao_link.py [feat] solution/backend,frontend: 카카오톡 채널 신원 연결 — 에이전트 1단계 2026-09-21 16:01:58 +09:00
test_kakao.py [feat] solution/backend: 상호명 공개 검색 + 업종 자동 판별 — 랜딩이 로그인 앞에서 부른다 2026-09-03 09:41:34 +09:00
test_local_guide_itinerary.py [feat] solution: 캔버스도 서버가 만든 일정을 본다 — 발행본과 같은 목록 2026-09-11 11:58:09 +09:00
test_my_sites.py [feat] solution/backend,frontend: 내 사이트 목록을 카드로 — 썸네일·주소·시각 · 발행마다 그림 갱신 2026-09-08 13:01:47 +09:00
test_naver_place_lookup.py 구조: 사장님(solution)과 내부 운영(admin)을 두 앱으로 가른다 2026-08-31 15:12:09 +09:00
test_naver.py 구조: 사장님(solution)과 내부 운영(admin)을 두 앱으로 가른다 2026-08-31 15:12:09 +09:00
test_perplexity.py 구조: 사장님(solution)과 내부 운영(admin)을 두 앱으로 가른다 2026-08-31 15:12:09 +09:00
test_place_itinerary_crud.py [feat] solution/backend: 일정 읽기·덮어쓰기 — 업장×기간 한 행 2026-09-11 11:21:46 +09:00
test_place_search.py [feat] solution,postgres-init,docs: 생성 진행 상태 · 새로 만들기 존중 · 발행본 색인·파비콘 2026-09-15 17:29:27 +09:00
test_place.py [refactor] solution/backend,frontend,postgres-init: 회사(테넌트) 제거 — 사장님 계정이 곧 스코프 2026-09-08 13:01:14 +09:00
test_publish_gate.py [fix] solution/backend,shared,site: 에디터에 쓴 소개문이 발행에서 사라지던 구멍 — 계약에 body 추가 2026-09-02 12:00:16 +09:00
test_render_process.py feat(solution): 발행 워커·버전 관리와 예약·미리보기 정리 2026-09-15 16:12:16 +09:00
test_render_report.py 구조: 사장님(solution)과 내부 운영(admin)을 두 앱으로 가른다 2026-08-31 15:12:09 +09:00
test_review.py [feat] solution: 미니 블로그·이용후기·예약요청 추가, /s/stay 목업·발행 사이트 UI 다수 수정 2026-09-18 09:03:18 +09:00
test_rollback.py feat(solution): 발행 워커·버전 관리와 예약·미리보기 정리 2026-09-15 16:12:16 +09:00
test_schema_ddl.py [feat] solution: 지역 이야기 생성 · 발행본 섹션 손질 · 마이그레이션 주석 축약 2026-09-10 14:36:00 +09:00
test_search_console_alerts.py [fix] solution/backend: Teams 카드 필수 필드 보완 2026-09-15 15:55:59 +09:00
test_search_console_client.py [feat] solution/backend: 서치콘솔 자동 제출·색인 상태 추적 추가 2026-09-15 14:50:30 +09:00
test_search_console_service.py [fix] solution: 온보딩 생성·크롤링 진단·장애 알림 묶음 2026-09-16 16:25:02 +09:00
test_seo_audit.py [refactor] solution/backend,frontend,postgres-init: 회사(테넌트) 제거 — 사장님 계정이 곧 스코프 2026-09-08 13:01:14 +09:00
test_seo_keywords.py [feat] solution/backend,site: 발행 사이트 제목·keywords 메타에 SiteOntology 키워드 — 이 가게 자료로 거른 것만 2026-09-14 14:38:24 +09:00
test_showcase_api.py [refactor] solution/backend,frontend,postgres-init: 회사(테넌트) 제거 — 사장님 계정이 곧 스코프 2026-09-08 13:01:14 +09:00
test_site_slug.py [refactor] solution/backend,frontend,postgres-init: 회사(테넌트) 제거 — 사장님 계정이 곧 스코프 2026-09-08 13:01:14 +09:00
test_site_template.py [refactor] solution/backend,frontend,postgres-init: 회사(테넌트) 제거 — 사장님 계정이 곧 스코프 2026-09-08 13:01:14 +09:00
test_site_theme.py [feat] solution,postgres-init,docs: SNS 게재 — 사장님이 누르면 쓰고, 승인받아, 사장님 계정으로 올린다 2026-09-14 15:46:44 +09:00
test_site_thumbnail.py [feat] solution,postgres-init,docs: 생성 진행 상태 · 새로 만들기 존중 · 발행본 색인·파비콘 2026-09-15 17:29:27 +09:00
test_snapshot.py [fix] solution/backend: 스냅샷 지역정보에 itineraries 키가 추가된 것을 테스트에 반영 2026-09-11 13:03:41 +09:00
test_social.py [feat] 연동테스트 2026-09-18 13:38:44 +09:00
test_story_generation.py [feat] solution: 지역 읽기 섹션 · 엽서 공유를 풀고 · 기존 사이트는 자산 주소만 갈아 끼운다 2026-09-15 09:31:19 +09:00
test_tour_api_adapter.py [feat] solution: 지역 이야기 생성 · 발행본 섹션 손질 · 마이그레이션 주석 축약 2026-09-10 14:36:00 +09:00
test_verify_candidates.py [refactor] solution/backend,frontend,postgres-init: 회사(테넌트) 제거 — 사장님 계정이 곧 스코프 2026-09-08 13:01:14 +09:00
test_vision_api.py [feat] solution: 지역 이야기 생성 · 발행본 섹션 손질 · 마이그레이션 주석 축약 2026-09-10 14:36:00 +09:00
test_weather_api.py [feat] solution: 지역 이야기 생성 · 발행본 섹션 손질 · 마이그레이션 주석 축약 2026-09-10 14:36:00 +09:00
test_weather_notes.py [feat] solution: 미니 블로그·이용후기·예약요청 추가, /s/stay 목업·발행 사이트 UI 다수 수정 2026-09-18 09:03:18 +09:00