[#15] AI가 deterministic evidence 기반 prediction과 action을 제안한다#16
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces AI-based merge risk prediction capabilities to the Watcher service, including modules for evidence building, prompt construction, target selection, response validation, and execution coordination, along with comprehensive tests. The reviewer feedback focuses on improving robustness and performance: specifically, parallelizing the AI prediction requests using Promise.all to reduce execution time, and relaxing the schema validation to gracefully handle null or missing fields (such as recommendedActions, falsePositiveNotes, and files) in the LLM responses.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
🔗 연관된 이슈
🎯 의도
deterministic possibility 결과를 기반으로 AI prediction을 생성하기 위한 provider 독립 core 구성
📝 작업 내용
📌 요약
🔍 상세
src/ai/types.ts에AiPrediction,AiPredictionEvidencePayload,AiPredictionClient,AiPredictionResult등 AI prediction 관련 타입 추가buildAiPredictionEvidencePayload로BranchRiskAnalysisInput과 deterministicBranchRisk를 AI prediction evidence로 결합selectAiPredictionTargets로 deterministic score 기준 prediction 대상 branch 선택DEFAULT_AI_PREDICTION_MINIMUM_SCORE로 기본 prediction threshold 상수화validateAiPredictionResponse로 AI 응답의confidence,recommendedActions,falsePositiveNotesschema 검증DEFAULT_AI_PREDICTION_SYSTEM_PROMPT와buildAiPredictionPrompt로 provider 독립 prompt 구성predictMergeRisksWithAi로 target selection, prompt 생성, client 호출, response validation 흐름 연결predicted,skipped,failed상태로 분리AiPredictionClientinterface와 fake client 테스트로 core 흐름 검증✅ 검증
npm run buildnpm test📸 영상 / 이미지 (Optional)
없음