From e5a52f68abb0bf88a65aaeab26b7f8950fc884cc Mon Sep 17 00:00:00 2001 From: Variet Agent Date: Mon, 23 Mar 2026 00:07:27 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EC=84=B8=EC=85=98=20=EC=A2=85=EB=A3=8C?= =?UTF-8?q?=20=E2=80=94=20known-issues=202=EA=B1=B4=20(=EB=B9=88=20content?= =?UTF-8?q?,=20slug=20=EB=94=B0=EC=98=B4=ED=91=9C)=20+=20devlog=20003?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .agent/references/known-issues.md | 12 ++++++++++++ docs/devlog/2026-03-22.md | 1 + 2 files changed, 13 insertions(+) diff --git a/.agent/references/known-issues.md b/.agent/references/known-issues.md index a95a53c..c46a52b 100644 --- a/.agent/references/known-issues.md +++ b/.agent/references/known-issues.md @@ -171,3 +171,15 @@ - **원인**: Wiki.js `singleByPath` 쿼리는 미존재 페이지에 대해 null 대신 **GraphQL error**를 반환. 기존 `list_pages()` → 루프 패턴은 이 문제 없었음 - **해결**: `find_page()`에서 `RuntimeError` catch → `"does not exist"` 포함 시 `None` 반환. `wiki_debate.py`도 `_query()`에서 동일 처리 - **주의**: Wiki.js GraphQL API는 not-found를 에러로 처리하는 경우가 있음. 새 쿼리 추가 시 반드시 미존재 케이스 테스트 + +### [2026-03-22] wiki — 빈 content 페이지 생성 거부 +- **증상**: `debate_handler.start()` 초기화 시 `input-*`, `response-*` 페이지 생성 실패 — "Page content cannot be empty" +- **원인**: Wiki.js `pages.create` mutation이 content가 빈 문자열(`""`)이면 거부. 핸들러가 response/input 초기화 시 `""` 전달 +- **해결**: 모든 빈 content를 placeholder 텍스트(`*(대기 중)*`)로 변경 +- **주의**: Wiki.js에 페이지 생성/수정 시 **절대로 빈 content를 전달하지 말 것**. 항상 최소 placeholder 필요 + +### [2026-03-22] debate — Gemini slug에 따옴표 포함 +- **증상**: 토론 Wiki 페이지 경로에 `"` 포함 → 브라우저에서 접근 불가, `singleByPath`로 조회 불가 +- **원인**: Gemini에게 제목 요약 요청 시 `"신용리스크를 측정하는..."` 처럼 따옴표 포함 응답 → `WikiClient.slugify()`가 따옴표 미제거 +- **해결**: (1) 프롬프트를 영문 2-3단어 키워드로 변경, (2) `.strip('"\'')` + `re.sub(r'[^\w\s-]', '')` 로 특수문자 제거, (3) slug 30자 제한 +- **주의**: AI 응답을 slug/경로/파일명에 사용 시 **반드시 특수문자 sanitize** 필수. 따옴표, 괄호, 마크다운 기호 등 모두 제거 diff --git a/docs/devlog/2026-03-22.md b/docs/devlog/2026-03-22.md index 1f90379..d162767 100644 --- a/docs/devlog/2026-03-22.md +++ b/docs/devlog/2026-03-22.md @@ -2,3 +2,4 @@ |----|------|------|------|------| | 001 | 09:05 | debate-agent .env 생성 (gemini/opus Wiki.js API 키) | - | ✅ | | 002 | 19:15 | debate-agent 대기 상태 처리 — idle-mode 규칙 + slug 탐색 + 금지 사항 강화 (7파일) | `30a9f6b` | ✅ | +| 003 | 23:15 | debate-handler Wiki.js 빈 content 페이지 생성 실패 수정 + slug 따옴표/특수문자 strip | `c9c8c6b` `a116681` | ✅ |