feat: AI Runtime 연동 계약과 안전한 검증 기반 구현#42
Merged
Merged
Conversation
15 tasks
chaeliki
approved these changes
Jul 24, 2026
hywznn
marked this pull request as ready for review
July 24, 2026 05:06
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.
왜 필요한가요?
Refs #8
Server가 AI Provider를 직접 호출하지 않고 별도 AI Runtime과 안정적인 계약으로 연결되려면, 실제 HTTP 연동 전에 전송 가능한 데이터와 응답 검증 경계를 먼저 고정해야 합니다.
특히 AI 입력에는 여권번호·외국인등록번호·전화번호·계좌번호·Token·Secret이 들어가면 안 되고, Runtime 응답도
requestId, contract/Knowledge version, worker, Workflow, slot 범위를 다시 검증해야 합니다.무엇이 바뀌나요?
AiRuntimeClientPort와 요청·응답 모델을 추가했습니다.workerRef와 최소 Worker Context만 허용합니다.ValidatingAiRuntimeClient를 추가했습니다.FakeAiRuntimeClient와 contract fixture를 추가했습니다.docs/ai-runtime-contract.md와 README를 갱신했습니다.사용자·개발 영향
fowoco/ai가 소유합니다.이번 PR에서 하지 않는 것
POST /internal/v1/analysesHTTP 호출AI 저장소의 versioned 원본 계약이 확정되면 별도 후속 PR에서
RemoteAiRuntimeClient와 WireMock contract test를 연결합니다.검증
./gradlew test --tests 'com.fowoco.server.aiintegration.*'./gradlew clean test buildgit diff --check모두 통과했습니다.
리뷰 포인트
workStatus,stayExpiryDate,preferredLanguage,workerRef만 AI Worker Context로 허용하는 범위가 적절한지requiredKnowledgeVersion을 응답의workflowCatalogVersion과 일치시키는 규칙이 AI/Knowledge release 계획과 맞는지ValidatingAiRuntimeClientdecorator를 거치도록 구성하는 방식이 적절한지