Repository navigation
feat: 어법 사전 체크와 검증된 문장 분석 서비스 - #164
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
영어 문장과 핵심 어법 설명을 먼저 사전 체크하고, 통과한 입력에만 구조화된 분석을 생성합니다. 불일치/판단 불확실은 입력 보완 결과로 반환합니다. AI 제목·태그 및 구간/계층은 도메인 계약으로 검증하고, 원문·revision·검토 상태는 서버가 직접 부여합니다.
Closes #151
선행: #162 (#149). 이 PR은
feature/149-grammar-domain기준이며 UI 편집 PR #163과 독립적으로 검토할 수 있습니다. #162 병합 후 main 기준으로 변경해 주세요. 사용자 직접 병합을 유지합니다.analyzeGrammar는 입력 → 사전 체크 → 분석의 순서와 사전 체크 미통과 시 반환만 담당합니다.parseGrammarSource,precheckGrammarSource,generateGrammarAnalysis가 각 단계의 schema 검증을 완료한 값을 반환하고, AI 호출마다 공통 요청 한도 검사를 수행합니다. 단계 내부의 검증 변경은 해당 함수에 한정하고, 업무 순서는 명시적인 await 호출로 유지합니다. 예외는 기존 server action에서 한 번 로깅하고 UI용 오류로 변환합니다.검증: 기능 Jest 29개, 전체 Jest 123 suites / 459 tests, TypeScript, 변경 범위 ESLint, Next.js production build 통과. 사전 체크 대기 중 분석 호출 방지, 미통과/잘못된 응답 시 중단, 단계별 권한·한도 검사, AI의 서버 소유 필드 지정 거절, 비동기 실패 전파를 검증했습니다. 실제 유료 AI 호출은 실행하지 않았습니다. 이 PR에는 화면·노트 저장 연결이 없고 #153에서 검증된 화면과 연결합니다.
리팩터링의 책임 경계·유지 근거와 미구현 후속 이슈는
docs/design/echo/grammar-practice-20261005/progress.md에 기록했습니다.