계약 문서 드리프트 정리 — messaging·internal API·ai_server 가이드 - #200
Merged
Conversation
- messaging.md §1·§4: definitions.json 에 이미 정의된 feedback/voice/tts 콜백 큐·DLQ 를 정식 표에 편입하고 '추가 예정'·'(예정)' 표기 제거 - §5.7: GeneratedQuestion 의 jobCategory·targetEvidence·expectedSignal 반영 - §5.9: FollowupCallbackPayload 에 없는 voiceAnalysis 블록 제거 - §5.9c/5.9d 신설: analyze.voice / callback.voice 스키마 문서화 (VoiceCallbackPayload 기준) - §5.11: 프론트가 소비 중인 highlights[] 추가 - §10 + api-conventions.md §2.6·§10: internal API 누락 2건 (embeddings/search, ai-logs) 추가
- 존재하지 않는 chain/parsers/·rag/pgvector_client.py·storage/keys.py·analyzer/feedback_generator.py 제거 - 실제 파일명으로 교체: rag/splitter.py→chunker.py, analyzer/repo_analyzer.py→repository_analyzer.py, model/messages.py→model/messages/ 패키지, messaging/consumers/ 구조 반영 - 미기재 모듈 core/·observability/ 추가, voice '(Phase 2)'·runner '(도입 예정)' 라벨을 실구현 상태로 갱신 - §3 lifespan 예시를 MessagingRuntime 실제 패턴으로 교체
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
왜
docs/messaging.md는 AI↔Core 계약의 SSOT 인데, 구현이 앞서가면서 문서가 뒤처졌다. 프론트가 실제로 소비 중인 필드(highlights[])가 문서에 없고, 반대로 문서에는 코드에 존재하지 않는 필드(voiceAnalysis)가 남아 있었다. 이 상태로는 문서를 보고 연동하면 틀린다.원칙: ai/ 의 Pydantic 모델이 정본 — 문서를 코드에 맞췄다. 코드·설정·스키마 변경은 0줄.
무엇
docs/messaging.md
infra/rabbitmq/definitions.json에 이미 정의·가동 중인 큐들을 정식 표에 편입 —ai.generate.feedback/core.callback.feedback("추가 예정" 표기였음),ai.analyze.voice/core.callback.voice/core.callback.tts(표에 누락) + 대응 DLQ 5개.*(예정)*표기 제거.GeneratedQuestion에jobCategory·targetEvidence·expectedSignal반영 (model/messages/questions.py기준).expectedSignal은 라이브 비노출(정답 유출 방지) 주석 포함.FollowupCallbackPayload에 존재하지 않는voiceAnalysis블록 삭제.analyze.voice→callback.voice)이 문서 어디에도 없어서AnalyzeVoiceRequest/VoiceCallbackPayload실스키마로 문서화. 피드백의voiceAnalysisSummary롤업 관계도 명시.FeedbackReport.tsx)가 소비 중인highlights[]추가.POST /api/internal/embeddings/search·POST /api/internal/ai-logs추가.docs/api-conventions.md
core/client.py와 Core 컨트롤러(InternalEmbeddingSearchController,InternalAiLogController) 기준. 검색 실패 시 빈 결과 폴백(non-fatal), ai-logs 는 202 fire-and-forget 임을 명시.ai/src/ai_server/CLAUDE.md
chain/parsers/·rag/pgvector_client.py·storage/keys.py·analyzer/feedback_generator.py참조 제거, 실제 파일명으로 정정 (chunker.py,repository_analyzer.py,model/messages/패키지,messaging/consumers/구조).core/·observability/추가.voice/"(Phase 2)"·runner"(도입 예정)" 라벨을 실구현 상태로 갱신하고 §3 lifespan 예시를MessagingRuntime실제 패턴으로 교체.검증
git diff --stat3개 파일 (md), 코드·설정·스키마 0줄.model/messages/{questions,followup,feedback,voice}.py,core/client.py,definitions.json, Core 내부 컨트롤러 2개.남은 드리프트 (이번 범위 밖)
ai/CLAUDE.md(상위) §2 트리에도rag/ (계획)·voice/ (Phase 2)라벨이 남아 있음.generate.feedback예시가voiceAnalysisSummary·domainQuestionCounts등 신필드 미반영.