Skip to content

10-11차 배포#416

Merged
HeeMang-Lee merged 228 commits intomainfrom
dev
Aug 18, 2025
Merged

10-11차 배포#416
HeeMang-Lee merged 228 commits intomainfrom
dev

Conversation

@HeeMang-Lee
Copy link
Member

@HeeMang-Lee HeeMang-Lee commented Aug 18, 2025

🔎 작업 내용

  • Resilience4J를 활용한 CB,Retry 추가

Summary by CodeRabbit

  • New Features
    • Brave 검색 결과를 표준화된 JSON(results 배열)으로 제공하여 일관된 표시와 활용이 가능해졌습니다.
    • 검색 결과 해석 및 문서화(RAG) 파이프라인을 강화해 더 안정적이고 관련성 높은 응답을 제공합니다.
  • Improvements
    • AI 대화/스트리밍 요청에 회로 차단기와 재시도 정책을 적용해 안정성과 내고장을 향상했습니다.
  • Chores
    • 의존성 추가 및 설정 반영(Resilience4j), Docker 이미지 빌드 최적화.
  • Documentation
    • 설정 주석 정리.

Ksr-ccb and others added 30 commits May 28, 2025 11:50
Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* chore: 도커 설정파일에 레디스 추가

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* chore: 도커 설정파일에 레디스 추가

* feat: Jwt 토큰 로그인과 Oauth 기본설정

* fix: 오류수정

* fix: 생성자 누락값 수정

* fix: 생성자 누락값 수정

* chore: 코드정리

* feat: Oauth 구조 변경중..

* feat: 카카오톡 로그인 + jwt 생성 테스트

* feat: 레디스 설정추가

* chore: 코드 정리

* refactor: OAuth2LoginSuccessHandler 책임분리

* refactor: 필터에서 이중작업 정리

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* Revert "Create run-test.yaml"

This reverts commit 3ca826f.

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* CI/CD AWS 연동

* CI/CD branches 범위 수정

---------

Co-authored-by: Ksr-ccb <harang4282@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* Revert "Create run-test.yaml"

This reverts commit 3ca826f.

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* CI/CD AWS 연동

* CI/CD branches 범위 수정

* CI/CD AWS 연동

---------

Co-authored-by: Ksr-ccb <harang4282@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* feat(build.gradle): validation 의존성 추가

* feat : CreateQuizDto 생성

* feat : QuizCategoryRepository 추가

* feat(QuizService) : json 파일 데이터 Quiz 엔티티로 변환 후 저장 기능 추가

* feat : QuizCategory 예외 코드 추가

* feat : uploadQuizJson에 예외 코드 사용' 추가

* feat(QuizController) : quiz 업로드 api 추가

* feat(QuizController) : QuizService의 uploadQuizJson 연동

* Ignore application-local.properties

* feat : 카테고리 타입 생성 api 추가

* refactor(QuizCategoryService) : 메서드 isPresent로 변경

* refactor : 코드래빗 피드백 기반 누락 및 오타 수정

* docker-compose.yml 케시 삭제
* chore: AuthUser, Role 클래스 global.dto 패키지로 이동

* chore: OAuth 패키지 이름 변경

* chore: 주석 및 띄어쓰기 수정

* feat: OAuth2 응답객체 생성 및 수정

* refactor: OAuth2 서비스 로직 리팩토링

* chore: 임시 랜딩페이지 추가

* chore: Role 클래스를 user.entity 패키지로 이동

* refactor: 소셜정보 가져올 때, 예외처리 추가
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* Revert "Create run-test.yaml"

This reverts commit 3ca826f.

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* CI/CD AWS 연동

* CI/CD branches 범위 수정

* CI/CD AWS 연동

* CI/CD AWS 연동

* CI/CD AWS 연동

* 수정

* commit

* 환경변수로 수정

* commit

* deploy.yml 수정

* commit

* deploy 수정

---------

Co-authored-by: Ksr-ccb <harang4282@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* feat: Ai, 서비스 구현 및 Config 추가.

서비스와 빈 생성을 위한 해당 Config 추가.

* feat:AiService

* refactor: Ai, 서비스 및 컨트롤러 코드 수정.

작성했던 API 명세서에 맞추어 기능 및 동작 수정.

* temp : commit for merge

* feat: AI, 테스트코드 구현1.

* refactor: aiService subscriptionId 반영

---------

Co-authored-by: Kimyoonbeom <kimybeom@naver.com>
Co-authored-by: ChoiHyuk <wannabeing@naver.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* chore: 패키지 구조 정리

* feat: 요일->int, int->요일 바꾸기

* feat: 요일->int, int->요일 바꾸기

* chore: docker-compose.yml gitignore 추가

* temp: temp commit for pull

* temp: temp commit for pull

* feat: 구독 엔티티 구조 변경 및 구독 정보 조회

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* Revert "Create run-test.yaml"

This reverts commit 3ca826f.

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* CI/CD AWS 연동

* CI/CD branches 범위 수정

* CI/CD AWS 연동

* CI/CD AWS 연동

* CI/CD AWS 연동

* 수정

* commit

* 환경변수로 수정

* commit

* deploy.yml 수정

* commit

* deploy 수정

* commit

* properties 중요정보 환경변수 처리

---------

Co-authored-by: Ksr-ccb <harang4282@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* Revert "Create run-test.yaml"

This reverts commit 3ca826f.

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* CI/CD AWS 연동

* CI/CD branches 범위 수정

* CI/CD AWS 연동

* CI/CD AWS 연동

* CI/CD AWS 연동

* 수정

* commit

* 환경변수로 수정

* commit

* deploy.yml 수정

* commit

* deploy 수정

* commit

* properties 중요정보 환경변수 처리

* deploy 파일 환경 변수 export

---------

Co-authored-by: Ksr-ccb <harang4282@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* chore: 필요없는 어노테이션 삭제

* chore: 공통응답 DTO 수정

- `@RequiredArgsConstructor`는 빌더를 사용한다면 추후 삭제해야 함

* feat: 구독/구독로그 예외처리 추가 및 수정

* feat: 구독기간 enum 클래스 추가

* chore: 구독로그 엔티티에 누락된 컬럼 추가 및 생성자 수정

* refactor: 구독생성자 수정 및 업데이트메서드 추가

* feat: 구독(Subscription) 생성/수정 로직 추가

- SubscriptionLog도 함께 생성되게 추가

* chore: QuizCategory 엔티티에 Getter 추가

* chore: 공통응답 DTO 빌더 삭제

* refactor: 구독로그 테이블명 변경 → 구독내역(SubscriptionHistory)

* refactor: 구독테이블에 N+1(QuizCategory) 문제 수정

문제카테고리(QuizCategory)의 경우, 구독내역이 생성될 때마다 쿼리가 중복되어 발생할 수있다고 판단되어 미리 FetchJoin 설정

* feat: 구독 취소 로직 추가

* refactor: QuizCategory 는 생성하는 것이 아닌 조회하는 방식으로 로직 수정

* chore: 예외처리 간단 수정

* refactor: 이메일 동시성문제를 유니크제약조건과 try-catch로 방지

* chore: 엔티티 수정시간과 시간이 다를 수 있기 때문에 엔티티자체의 수정시간을 사용하도록 변경

* chore: QuizCategoryRepository 알맞는 메서드명으로 변경

* chore: 날짜계산을 Days가 아닌 Month로 변경

`plusMonths()` 함수 사용
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* chore: 패키지 구조 정리

* feat: 요일->int, int->요일 바꾸기

* feat: 요일->int, int->요일 바꾸기

* chore: docker-compose.yml gitignore 추가

* temp: temp commit for pull

* temp: temp commit for pull

* feat: 구독 엔티티 구조 변경 및 구독 정보 조회

* fix: 충돌수정 및 변수형 일치문제 해결

* feat: 구독취소, 회원탈퇴

* chore: 각 api별 권한 추가 (계속 추가되어야함)

* chore: Quiz_category Enum 삭제

* feat: 로그인 회원 마이페이지 확인 (구독로그 포함)

* feat: 구독 비활성화, (임시) 업데이트

* test: 구독 조회 비활성화(로그생성은 아직x) 테스트코드, 로그인 마이페이지 기본기능 테스트 기능

* test: 테스트코드수정

* chore: Quiz_category Enum 삭제 후처리

* chore: Dto 이름 수정 및 파일정리

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* feat : 이메일 발송을 위한 SMTP 관련 의존성 추가

* feat : 유연성 및 확장성을 위해 MailConfig 추가

* feat : MimeMessage 기반 Html형식 메일 전송 메서드 추가

* feat(UserService) : 인증 코드 생성

* feat : VerificationCode 서비스, 예외 추가

* feat : 인증코드 검증 성공 시, 인증코드 삭제 기능 추가

* feat : 인증 코드 발급 Controller 클래스 추가

* feat : 인증 코드 발송 기능 추가

* refactor : verify 메서드 반환타입 void로 변경

* feat : 인증 코드 관련 api jwt 검증 제외 설정

* fix : 변경된 에러 코드로 인한 실행 오류 수정

* feat : 피드백 기반 수정

* feat : 인증코드 검증 시도 횟수 추가

* refactor : MailConfig 위치 변경
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* Revert "Create run-test.yaml"

This reverts commit 3ca826f.

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* CI/CD AWS 연동

* CI/CD branches 범위 수정

* CI/CD AWS 연동

* CI/CD AWS 연동

* CI/CD AWS 연동

* 수정

* commit

* 환경변수로 수정

* commit

* deploy.yml 수정

* commit

* deploy 수정

* commit

* properties 중요정보 환경변수 처리

* deploy 파일 환경 변수 export

* 도커 추가하여 배포

* commit

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* commit

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

---------

Co-authored-by: Ksr-ccb <harang4282@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* Revert "Create run-test.yaml"

This reverts commit 3ca826f.

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* CI/CD AWS 연동

* CI/CD branches 범위 수정

* CI/CD AWS 연동

* CI/CD AWS 연동

* CI/CD AWS 연동

* 수정

* commit

* 환경변수로 수정

* commit

* deploy.yml 수정

* commit

* deploy 수정

* commit

* properties 중요정보 환경변수 처리

* deploy 파일 환경 변수 export

* 도커 추가하여 배포

* commit

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* commit

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

---------

Co-authored-by: Ksr-ccb <harang4282@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* Revert "Create run-test.yaml"

This reverts commit 3ca826f.

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* ADD workflow

* CI/CD AWS 연동

* CI/CD branches 범위 수정

* CI/CD AWS 연동

* CI/CD AWS 연동

* CI/CD AWS 연동

* 수정

* commit

* 환경변수로 수정

* commit

* deploy.yml 수정

* commit

* deploy 수정

* commit

* properties 중요정보 환경변수 처리

* deploy 파일 환경 변수 export

* 도커 추가하여 배포

* commit

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* commit

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

* 도커 추가하여 배포

---------

Co-authored-by: Ksr-ccb <harang4282@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* temp : commit for merge

* feat: chroma 연동, RAG 구조 구현

그에 따른 AiService 파일 수정.

* refactor: chroma 연동, RAG 구조 구현 수정.
* build: mysql-connector 버전 업데이트

보안 이슈로 버전 업데이트

* refactor: OAuth2 예외 처리 수정 및 생성

UserException에서 분리했음

* chore: OAuth2 카카오 응답객체 예외처리 수정

* fix: OAuth2 Github 로그인 시, 이메일 누락 방지 로직 추가

accessToken 활용하여 이메일 가져오기

* feat: OAuth2 네이버 로그인 기능 추가

공통 유틸메서드를 제공하기 위해 추상클래스 생성

* chore: OAuth2 추상클래스 적용

* chore: OAuth2 데이터(attributes) 파싱 예외처리 코드 추가

* chore: OAuth2Service를 OAuth2 패키지로 이동 및 패키지명 수정

사용하지 않는 Controller, Service, Repository 삭제

* chore: 간단 로직 수정
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* feat: 문제 추천1 차

* feat: 각 문제별 정답률 계산, 유저 개인의 정답률 계산

* feat: 문제를 내어주는 두가지 방법 *

- getTodayQuiz -> getTodayQuizNew (O)
- getTodayQuizNew -> getTodayQuiz (X)

둘중에 하나씩만 쓰거나  getTodayQuiz -> getTodayQuizNew 해야함

리턴값은 지금 api 형식으로 만든다고 QuizDto 인데,
Quiz로 바꿔서 줄 수 있음

* feat: 문제를 내어주는 두가지 방법 *

- getTodayQuiz -> getTodayQuizNew (O)
- getTodayQuizNew -> getTodayQuiz (X)

둘중에 하나씩만 쓰거나  getTodayQuiz -> getTodayQuizNew 해야함

리턴값은 지금 api 형식으로 만든다고 QuizDto 인데,
Quiz로 바꿔서 줄 수 있음

* test: 문제를 내어주는 두가지 방법 테스트코드

* fix: 포특밧 되돌려줌

* refactor: 정답률 포멧 스케일 통일화

* fix: 오류검증

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* chore : initialize project structure (#2)

* chore: initialize project structure

* chore: initialize project structure

* chore: initialize project structure

* fix: 엔티티 오류수정 및 설정파일 오류 수정

* 📝 Add docstrings to `dev` (#3)

Docstrings generation was requested by @Ksr-ccb.

* #2 (comment)

The following files were modified:

* `src/main/java/com/example/cs25/domain/ai/exception/AiException.java`
* `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java`
* `src/main/java/com/example/cs25/domain/mail/exception/MailException.java`
* `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java`
* `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java`
* `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java`
* `src/main/java/com/example/cs25/domain/users/entity/User.java`
* `src/main/java/com/example/cs25/domain/users/exception/UserException.java`
* `src/main/java/com/example/cs25/domain/users/vo/Subscription.java`
* `src/main/java/com/example/cs25/global/exception/BaseException.java`
* `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Create run-test.yaml

* Create PULL_REQUEST_TEMPLATE.md

* refactor: ERD 수정으로 인한 Entity 수정 (#4)

* refactor: ERD 수정으로 인한 Entity 수정.

* refactor: ERD 수정으로 인한 Entity 수정2.

* chore: 도커 볼륨 구조 변경

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com>
Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com>
Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com>
* feat : 깃허브 url Parser 추가

* feat : 크롤링 기능 추가

* feat : 프로젝트 내에 저장 기능 추가

* feat : 크롤링한 파일을 프로젝트 폴더 내에 저장하는 기능 추가

* chore : chroma 설정 주석 해제

* feat : 컨트롤러 추가

* feat : VectorStore에 저장 메서드 추가

* refactor : List<Document> 전역변수에서 지역변수로 변경

* feat : CrawlerController 예외 추가
test:
- 정상 체점 후 데이터 저장
- 구독 정보 없는 경우 예외 처리
- 퀴즈 정보 없는 경우 예외 처리
HeeMang-Lee and others added 25 commits August 12, 2025 14:34
* refactor: 코드에서 listTools()를 초기화 및 타임아웃 시간 연장

* refactor:기존 MCP서비스 사용 및 앱 부팅시초기화 true설정 자동도구등록 설정
* refactor: 코드에서 listTools()를 초기화 및 타임아웃 시간 연장

* refactor:기존 MCP서비스 사용 및 앱 부팅시초기화 true설정 자동도구등록 설정

* chore: 버젼 명시 해제
* refactor: 코드에서 listTools()를 초기화 및 타임아웃 시간 연장

* refactor:기존 MCP서비스 사용 및 앱 부팅시초기화 true설정 자동도구등록 설정

* chore: 버젼 명시 해제

* chore : 도커파일 테스트 시 빌드되는 거 수정
* chore:고정 변경사항 추적

* refactor : 10차 배포로 회귀
* chore:고정 변경사항 추적

* refactor : 10차 배포로 회귀

* chore/385 10차 배포 서비스로 회귀
* chore: MCP 설정 변경

* chore: MCP Brave Search 서버 경로 변경
* chore: MCP 서버 전역설치 및 심볼릭 링크 생성, 빌드타임 확인 명령어 추가

* chore: 서비스 모듈 빌드 확인 명령어 추가
* refactor: 래퍼스크립트를 만들어 커맨드명 유지하도록 도커파일 수정

* refactor:
MCP 서버 fix stdio args
…ve-search 제공 (#407)

* refactor: 래퍼스크립트를 만들어 커맨드명 유지하도록 도커파일 수정

* refactor:
MCP 서버 fix stdio args

* chore:deprecated 패키지 제거, 공식 Brave MCP 서버 설치, 래퍼 스크립트로 server-brave-search 제공
* refactor: 래퍼스크립트를 만들어 커맨드명 유지하도록 도커파일 수정

* refactor:
MCP 서버 fix stdio args

* chore:deprecated 패키지 제거, 공식 Brave MCP 서버 설치, 래퍼 스크립트로 server-brave-search 제공

* chore:앱 부팅시 초기화 설정 ON
* refactor: Json파싱 표준화로 MCP servie 리팩토링

* refactor: 재귀 파싱 스택 오버플로 방지 , description에 HTML 태그 제거, 정규화된 배열로 반환

* refactor:본문 없는 경우 조건완화, results배열 JSON처리, 미초기화 감지 문자열 판별 추가
* feat:레질리언스4j 빌드그래들 설정

* feat:레질리언스 appliciation properties 설정

* feat:fallback구조 CB,Retry 데코레이터 패턴 적용

* chore:스트림 오류 매핑 적용 이후로 이동

* chore:4xx 오류 집계 제외
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 18, 2025

Walkthrough

Resilience4j를 도입하고 AiResilience 컴포넌트를 추가했다. OpenAI/Claude 클라이언트 호출을 동기/스트림 모두 회로차단기와 재시도로 감쌌다. Brave MCP 검색은 초기화 재시도와 결과 정규화 파이프라인을 추가했다. Gradle 의존성과 application.properties에 회복력 설정을 반영하고 Dockerfile의 MCP 설치/래퍼 생성을 단순화했다.

Changes

Cohort / File(s) Summary of changes
Docker 이미지 빌드 정리
cs25-service/Dockerfile
RUN 단계 간소화, set -eux 추가, wrapper를 printf로 생성하고 PATH 의존 실행, --help로 산출 검증, npm/apt 캐시 정리 강화.
Resilience4j 의존성 추가
cs25-service/build.gradle
resilience4j-spring-boot3, circuitbreaker, retry, reactor(v2.3.0) 추가.
AI 호출 회복력 래핑: OpenAI/Claude
.../domain/ai/client/OpenAiChatClient.java, .../domain/ai/client/ClaudeChatClient.java
생성자에 AiResilience 주입 추가. 동기 호출은 executeSync("openai"/"claude"), 스트리밍은 executeStream으로 래핑. 스트림 에러 onErrorResume → onErrorMap으로 변경.
Resilience 유틸 컴포넌트 추가
.../domain/ai/resilience/AiResilience.java
CircuitBreakerRegistry/RetryRegistry 주입. executeSync/executeStream 제공. Retry→CircuitBreaker 순서로 적용(reactor는 Operator 사용).
Brave MCP 검색 정규화/초기화 보강
.../domain/ai/service/BraveSearchMcpService.java
다양한 형태의 응답을 {results:[...]}로 정규화(배열/중첩 JSON/레거시 텍스트). JSON 탐지/파싱/트렁케이션 헬퍼 추가. MCP 클라이언트 초기화 감지 및 1회 재시도. 로깅 확장.
Brave RAG 변환 로직 강화
.../domain/ai/service/BraveSearchRagService.java
ObjectMapper 도입. 결과에서 url/title/description 추출 실패 시 텍스트 내 JSON/레거시 블록 파싱으로 보강. 단일 Document 생성 파이프라인으로 통일. 파싱 실패는 무시하고 진행.
애플리케이션 설정 업데이트
cs25-service/src/main/resources/application.properties
MCP 초기화 플래그 제거. CircuitBreaker/Retry 기본 및 openai/claude 인스턴스 설정 추가. 주석/포맷 수정.

Sequence Diagram(s)

sequenceDiagram
  participant C as Controller/Service
  participant OC as OpenAiChatClient
  participant AR as AiResilience
  participant OA as OpenAI SDK

  C->>OC: chat(prompt) / stream(prompt)
  OC->>AR: executeSync/executeStream("openai", supplier)
  AR->>OA: 호출 (Retry→CircuitBreaker)
  OA-->>AR: 응답 또는 오류
  AR-->>OC: 결과 Flux/값
  OC-->>C: 콘텐츠 또는 AiException(onErrorMap)
Loading
sequenceDiagram
  participant S as BraveSearchMcpService
  participant M as MCP Client
  participant N as Normalizer

  S->>M: resolveBraveClient()
  alt not initialized
    M--x S: McpError (uninitialized)
    S->>M: initialize() 재시도(1회)
  end
  S->>M: search(query)
  M-->>S: raw content (varied shapes)
  S->>N: normalize(raw)
  N-->>S: { "results": [...] }
  S-->>Caller: 정규화된 JSON
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • crocusia
  • Kimyoonbeom
  • Ksr-ccb

Poem

토끼는 귀를 세우고 빌드를 톡톡톡—
회로는 닫혔다 열리고, 재시도는 콩콩콩!
용감한 검색은 결과를 예쁘게 정렬하고,
구름과 열쇠(Open/Claude)는 안전망 속 반짝—
당근 같은 로그, 부드러운 스트림 흘러간다. 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@HeeMang-Lee HeeMang-Lee merged commit 15b4a37 into main Aug 18, 2025
1 of 2 checks passed
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (15)
cs25-service/build.gradle (1)

36-40: Resilience4j 의존성 추가는 적절합니다만, 약간의 중복 가능성 점검 권장

resilience4j-spring-boot3 스타터가 다수 모듈을 전이로 끌어오므로 circuitbreaker/retry 직접 선언은 중복일 수 있습니다. 기능상 문제는 없지만 의존성 표면을 최소화하려면 아래처럼 스타터 + 리액터만 유지하는 구성을 고려해보세요.

예시(선택):

     // resilience4j
     implementation 'io.github.resilience4j:resilience4j-spring-boot3:2.3.0'
-    implementation 'io.github.resilience4j:resilience4j-circuitbreaker:2.3.0'
-    implementation 'io.github.resilience4j:resilience4j-retry:2.3.0'
     implementation 'io.github.resilience4j:resilience4j-reactor:2.3.0'

또한 Spring Boot 3.5.0과 Resilience4j 2.3.0의 조합은 일반적으로 호환되지만, 런타임 충돌 여부를 한 번 통합 테스트로 확인하는 것을 권장합니다.

cs25-service/src/main/resources/application.properties (3)

76-88: CircuitBreaker 기본값 미세 조정 제안(특히 Half-Open 샘플 수와 Open 대기시간)

현재 설정은 전형적이지만, 다음 사항을 검토하면 불필요한 플랩을 줄일 수 있습니다.

  • permittedNumberOfCallsInHalfOpenState=1 → 3 내외 권장: 일시적 회복/노이즈에 더 견고.
  • waitDurationInOpenState=30m → 1~5m 검토: 장시간 차단은 사용자 경험에 영향 가능.
  • 인스턴스별 튜닝: openai/claude의 특성(모델 레이트리밋, API SLA)에 맞춰 별도 임계치 적용 고려.

원하시면 openai/claude 인스턴스에만 상이한 기본값을 두는 예시 패치를 제안드리겠습니다.


88-91: 429(TooManyRequests)를 CB 집계에서 제외하는 것을 고려

4xx는 무시 목록에 있으나 429는 빠져 있습니다. 레이트리밋 상황은 장애가 아니라 용량 이슈이므로 서킷브레이커 failure 집계에서 제외하는 편이 흔합니다(재시도는 별도 정책으로 처리).

예시(선택):

 resilience4j.circuitbreaker.configs.default.ignoreExceptions[0]=org.springframework.web.reactive.function.client.WebClientResponseException.BadRequest
 resilience4j.circuitbreaker.configs.default.ignoreExceptions[1]=org.springframework.web.reactive.function.client.WebClientResponseException.Unauthorized
 resilience4j.circuitbreaker.configs.default.ignoreExceptions[2]=org.springframework.web.reactive.function.client.WebClientResponseException.Forbidden
 resilience4j.circuitbreaker.configs.default.ignoreExceptions[3]=org.springframework.web.reactive.function.client.WebClientResponseException.NotFound
+resilience4j.circuitbreaker.configs.default.ignoreExceptions[4]=org.springframework.web.reactive.function.client.WebClientResponseException.TooManyRequests

주의: Retry 쪽에서는 429를 “무시”하지 않고(즉, 재시도 대상 유지) 백오프/재시도 정책으로 다루는 것이 일반적입니다.


93-102: Retry 정책 미세 조정: 시도 횟수, 지터 추가

  • maxAttempts=2는 다소 보수적입니다. 네트워크/일시 오류 대응을 위해 3~4 시도를 고려해보세요.
  • 대규모 동시 재시도를 완화하려면 지터(randomized wait)를 켜는 것이 유용합니다.

간단 조정 예시(선택):

-resilience4j.retry.configs.default.maxAttempts=2
-resilience4j.retry.configs.default.waitDuration=200ms
+resilience4j.retry.configs.default.maxAttempts=3
+resilience4j.retry.configs.default.waitDuration=300ms
 resilience4j.retry.configs.default.enableExponentialBackoff=true
 resilience4j.retry.configs.default.exponentialBackoffMultiplier=2

지터는 프로퍼티만으로 제한적일 수 있어, 필요 시 코드 기반 IntervalFunction(지수+지터)로 인스턴스별 세밀 제어를 도와드릴 수 있습니다.

cs25-service/Dockerfile (1)

25-45: Brave MCP 서버 설치/래퍼 생성: 버전 고정 및 잔여 패키지 정리 제안

현재 최신 태그 설치(@brave/brave-search-mcp-server)는 재현성과 공급망 리스크 관점에서 변동성이 있습니다. 명시 버전 고정과 빌드 후 불필요 패키지 추가 정리를 추천합니다.

예시:

-    npm install -g @brave/brave-search-mcp-server; \
+    npm install -g @brave/brave-search-mcp-server@<고정_버전>; \
@@
-    apt-get purge -y gnupg; \
+    apt-get purge -y gnupg curl bash; \
     apt-get autoremove -y --purge; \
     rm -rf /var/lib/apt/lists/*

필요 시 server-brave-search --version 체크도 sanity check에 포함할 수 있습니다.

cs25-service/src/main/java/com/example/cs25service/domain/ai/service/BraveSearchRagService.java (2)

17-18: ObjectMapper 직접 생성 대신 빈 주입 권장

Spring Boot의 전역 ObjectMapper 커스터마이징(모듈 등록, 직렬화 옵션 등)을 활용하려면 직접 생성 대신 주입받는 편이 좋습니다. 현재 @RequiredArgsConstructor이므로 final 필드를 생성자 주입으로 바꾸면 됩니다.

-    private final ObjectMapper objectMapper = new ObjectMapper();
+    private final ObjectMapper objectMapper;

(필요 시 import 변경 없음. 스프링 컨텍스트에 기본 ObjectMapper 빈이 존재합니다.)


33-39: JSON 파싱 실패 시 디버그 로그 남기기 제안

예외를 완전히 무시하면 원인 파악이 어려울 수 있습니다. 디버그 레벨로 짧게 남기는 정도를 권합니다.

-                        } catch (Exception ignored) { /* fall back below */ }
+                        } catch (Exception ex) {
+                            // fall back below
+                            if (org.slf4j.LoggerFactory.getLogger(BraveSearchRagService.class).isDebugEnabled()) {
+                                org.slf4j.LoggerFactory.getLogger(BraveSearchRagService.class)
+                                    .debug("inner JSON parse failed: {}", ex.toString());
+                            }
+                        }
cs25-service/src/main/java/com/example/cs25service/domain/ai/service/BraveSearchMcpService.java (4)

30-37: 유사 JSON 감지 로직 중복 최소화(선택)

looksLikeJson 유틸이 Rag 서비스에도 유사하게 존재합니다. 공용 유틸 클래스로 추출해 중복을 제거하면 유지보수가 수월합니다.

원하시면 두 서비스가 공유하는 AiJsonUtils(가칭) 클래스로 리팩터를 제안드릴 수 있습니다.


67-78: 원시 응답 로그 레벨을 debug로 낮추는 것을 권장

검색 결과 원문은 길고 빈번할 수 있어 info 로그는 과도할 수 있습니다. 운영 환경에서는 debug가 적절합니다.

-        log.info("[Brave MCP Response Raw content]: {}", raw);
+        log.debug("[Brave MCP Response Raw content]: {}", raw);
@@
-        log.info("Brave 검색 결과 정규화 완료: {}건", normalized.size());
+        log.debug("Brave 검색 결과 정규화 완료: {}건", normalized.size());

80-116: 비초기화 MCP 클라이언트 자동 initialize 재시도: 예외 로깅 개선 제안

현재 initError.getMessage()만 출력해 스택트레이스가 손실됩니다. 장애 분석을 위해 예외 객체 자체를 로깅하는 편이 좋습니다.

-                    } catch (Exception initError) {
-                        log.error("MCP 클라이언트 초기화 실패: {}", initError.getMessage());
-                    }
+                    } catch (Exception initError) {
+                        log.error("MCP 클라이언트 초기화 실패", initError);
+                    }

또한 IllegalStateException 메시지에 사용한 MCP 클라이언트 수/식별자 등을 포함하면 원인 추적에 도움이 됩니다.


168-210: JSON 블록 파싱: 재귀 제한과 로깅이 적절합니다

MAX_JSON_RECURSION_DEPTH=3와 truncation 기반 경고 로그는 방어적으로 잘 설정되어 있습니다. 추후 운영 데이터에 따라 depth를 프로퍼티화하는 것도 고려해볼 수 있습니다.

cs25-service/src/main/java/com/example/cs25service/domain/ai/client/OpenAiChatClient.java (2)

26-34: 동기 호출을 회복성 래퍼로 감싼 구조는 적절합니다. 다만 클로드와의 출력 정규화 일관성 확인 권장

OpenAI 쪽은 .trim()으로 후처리를 하고 있는데, ClaudeChatClient.call()에는 동일 처리가 없습니다. 두 클라이언트 간 출력 포맷의 일관성을 위해 Claude 측에도 동일 정규화를 적용하는 것이 좋습니다.


43-49: onErrorMap 예외 원인 유지 및 회로 차단 예외 매핑 검토

설정 검증 결과:
cs25-service/src/main/resources/application.properties에 이미
resilience4j.circuitbreaker.instances.openai.baseConfig=default
resilience4j.retry.instances.openai.baseConfig=default
설정이 존재합니다.

개선 제안 (선택적 리팩터):
• 파일: cs25-service/src/main/java/com/example/cs25service/domain/ai/client/OpenAiChatClient.java (43–49행)
현재
java …).onErrorMap(e -> new AiException(AiExceptionCode.INTERNAL_SERVER_ERROR));
를 아래와 같이 변경하면, 이미 AiException인 경우는 유지하고 그 외 예외만 원인(cause)을 포함해 래핑합니다.
diff - ).onErrorMap(e -> new AiException(AiExceptionCode.INTERNAL_SERVER_ERROR)); + ).onErrorMap(e -> (e instanceof AiException) + ? e + : new AiException(AiExceptionCode.INTERNAL_SERVER_ERROR, e));

• Resilience4j 회로 차단 예외(예: CallNotPermittedException)를 별도 코드(AiExceptionCode.SERVICE_UNAVAILABLE 등)로 매핑할지 정책 검토 바랍니다.
• 해당 생성자가 없을 경우 기존 구현을 유지하거나, 적절한 로깅을 추가하는 방안도 고려해주세요.

cs25-service/src/main/java/com/example/cs25service/domain/ai/client/ClaudeChatClient.java (2)

25-31: 동기 경로 출력 정규화 일관성 부족 — OpenAI와 동일하게 trim 적용 권장

OpenAI 클라이언트는 .trim()으로 공백을 제거하지만, 여기에는 없습니다. 동일한 사용자 경험을 위해 아래처럼 정규화를 맞추는 것을 제안합니다.

     public String call(String systemPrompt, String userPrompt) {
         return resilience.executeSync("claude", () ->
             anthropicChatClient.prompt()
                 .system(systemPrompt)
                 .user(userPrompt)
                 .call()
-                .content()
+                .content()
+                .trim()
         );
     }

41-47: 스트리밍 에러 매핑 개선 제안

아래처럼 onErrorMap에서 이미 던져진 AiException은 그대로 전달하고, 그 외 에러에 한해 원인(cause)을 포함해 감싸도록 변경을 권장합니다.

  • 대상 파일:
    – cs25-service/src/main/java/com/example/cs25service/domain/ai/client/ClaudeChatClient.java (41–47행)
-        ).onErrorMap(e -> new AiException(AiExceptionCode.INTERNAL_SERVER_ERROR));
+        ).onErrorMap(e -> (e instanceof AiException)
+            ? e
+            : new AiException(AiExceptionCode.INTERNAL_SERVER_ERROR, e))
  • 설정 이름 검증:
    resilience4j.circuitbreaker.instances.claude.baseConfig=default
    resilience4j.retry.instances.claude.baseConfig=default
    cs25-service/src/main/resources/application.properties 87, 98행에 정의되어 있어 정상 확인되었습니다.

  • 추가 검토 사항:
    – OpenAI 클라이언트와 동일한 예외 무시/매핑 로직을 적용할지
    – 회로 차단(circuit breaker) 단계에서의 예외 처리 정책(무시 예외, 별도 매핑 등)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2cc6c83 and 62dde4e.

📒 Files selected for processing (8)
  • cs25-service/Dockerfile (1 hunks)
  • cs25-service/build.gradle (1 hunks)
  • cs25-service/src/main/java/com/example/cs25service/domain/ai/client/ClaudeChatClient.java (3 hunks)
  • cs25-service/src/main/java/com/example/cs25service/domain/ai/client/OpenAiChatClient.java (3 hunks)
  • cs25-service/src/main/java/com/example/cs25service/domain/ai/resilience/AiResilience.java (1 hunks)
  • cs25-service/src/main/java/com/example/cs25service/domain/ai/service/BraveSearchMcpService.java (3 hunks)
  • cs25-service/src/main/java/com/example/cs25service/domain/ai/service/BraveSearchRagService.java (2 hunks)
  • cs25-service/src/main/resources/application.properties (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
cs25-service/src/main/java/com/example/cs25service/domain/ai/resilience/AiResilience.java (2)
cs25-service/src/main/java/com/example/cs25service/domain/ai/client/OpenAiChatClient.java (1)
  • Component (11-51)
cs25-service/src/main/java/com/example/cs25service/domain/ai/client/ClaudeChatClient.java (1)
  • Component (11-49)
🔇 Additional comments (7)
cs25-service/src/main/resources/application.properties (2)

63-64: 인스턴스 이름 일치 확인 완료
호출부에서 사용된 "openai"/"claude"application.propertiesresilience4j.circuitbreaker.instancesresilience4j.retry.instances 정의(openai, claude)가 정확히 일치함을 확인했습니다. 추가 조치는 필요 없습니다.


70-75: Brave MCP 설정 및 래퍼 스크립트 정상 확인됨

  • application.properties(71–74): Brave Search 관련 프로퍼티 확인됨
  • cs25-service/Dockerfile(37–40): server-brave-search 래퍼 설치 및 --help 검증 완료

배포 환경에서 BRAVE_API_KEY 환경변수가 올바르게 설정되어 있는지만 최종 확인 부탁드립니다.

cs25-service/Dockerfile (1)

39-41: 런타임 사전 검증(sanity check) 추가, 좋습니다

래퍼를 즉시 호출해 빌드를 실패시키는 검증은 런타임 이슈를 조기에 차단하는 데 효과적입니다.

cs25-service/src/main/java/com/example/cs25service/domain/ai/service/BraveSearchMcpService.java (2)

236-272: 레거시 블록 파서: 다중 블록 처리 로직 깔끔합니다

중간 flush 조건과 마지막 레코드 커밋 처리 모두 적절합니다. 특수 케이스(Title만 있거나 URL만 있는 경우)는 상위 addObjectToResults 필터링과 상호 보완되어 일관성이 있습니다.


76-78: BraveSearchMcpService.search 호출부 영향도 검증 완료

AiFeedbackStreamProcessor 내에서 search() 결과는 오직 BraveSearchRagService.toDocuments()로 바로 넘겨지며, 해당 메서드가 root.path("results")를 통해 새로 추가된 results 배열을 정상 처리합니다.
따라서 호출부 파싱 로직에 별도 수정이 필요하지 않습니다.

cs25-service/src/main/java/com/example/cs25service/domain/ai/client/OpenAiChatClient.java (1)

17-22: 생성자에 AiResilience 주입 추가: 잘 반영됨

의존성 주입 확장과 필드 추가가 일관성 있게 적용되었습니다.

cs25-service/src/main/java/com/example/cs25service/domain/ai/client/ClaudeChatClient.java (1)

17-21: 생성자에 AiResilience 주입 추가: 잘 반영됨

변경이 OpenAI 쪽과 대칭적으로 적용되어 이해와 유지보수에 용이합니다.

Comment on lines +24 to +32
public <T> T executeSync(String name, Supplier<T> supplier) {
CircuitBreaker cb = cbRegistry.circuitBreaker(name);
Retry retry = retryRegistry.retry(name);

Supplier<T> withRetry = Retry.decorateSupplier(retry, supplier);
Supplier<T> withCb = CircuitBreaker.decorateSupplier(cb, withRetry);

return withCb.get();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Sync 조합 순서가 반대입니다 — CircuitBreaker를 안쪽, Retry를 바깥으로 감싸야 각 재시도 시도마다 CB가 평가됩니다

현재 구현은 Retry → CircuitBreaker로 데코레이션되어 CB가 재시도 단건만 기록합니다. 일반적으로는 CB가 각 시도별로 실패/성공을 관찰하도록 CB를 안쪽에 두고 Retry가 바깥에서 재호출하도록 조합합니다. 이렇게 해야 실패율/슬라이딩 윈도우 메트릭이 의도대로 집계되고, 열림/닫힘 판단이 정확해집니다.

-    /**
-     * 동기 호출: Retry → CircuitBreaker 순서
-     */
+    /**
+     * 동기 호출: CircuitBreaker → Retry 순서
+     * (각 재시도 시도마다 CB가 권한 확인 및 성공/실패를 기록하도록 CB를 내부에 둡니다)
+     */
     public <T> T executeSync(String name, Supplier<T> supplier) {
         CircuitBreaker cb = cbRegistry.circuitBreaker(name);
         Retry retry = retryRegistry.retry(name);
 
-        Supplier<T> withRetry = Retry.decorateSupplier(retry, supplier);
-        Supplier<T> withCb = CircuitBreaker.decorateSupplier(cb, withRetry);
-
-        return withCb.get();
+        Supplier<T> withCb = CircuitBreaker.decorateSupplier(cb, supplier);
+        Supplier<T> withRetry = Retry.decorateSupplier(retry, withCb);
+        return withRetry.get();
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public <T> T executeSync(String name, Supplier<T> supplier) {
CircuitBreaker cb = cbRegistry.circuitBreaker(name);
Retry retry = retryRegistry.retry(name);
Supplier<T> withRetry = Retry.decorateSupplier(retry, supplier);
Supplier<T> withCb = CircuitBreaker.decorateSupplier(cb, withRetry);
return withCb.get();
}
/**
* 동기 호출: CircuitBreakerRetry 순서
* ( 재시도 시도마다 CB가 권한 확인 성공/실패를 기록하도록 CB를 내부에 둡니다)
*/
public <T> T executeSync(String name, Supplier<T> supplier) {
CircuitBreaker cb = cbRegistry.circuitBreaker(name);
Retry retry = retryRegistry.retry(name);
Supplier<T> withCb = CircuitBreaker.decorateSupplier(cb, supplier);
Supplier<T> withRetry = Retry.decorateSupplier(retry, withCb);
return withRetry.get();
}
🤖 Prompt for AI Agents
In
cs25-service/src/main/java/com/example/cs25service/domain/ai/resilience/AiResilience.java
around lines 24 to 32, the Supplier decoration order is reversed — currently
Retry wraps CircuitBreaker, so the CB only sees the overall retry result; swap
the order so CircuitBreaker wraps the raw supplier and Retry wraps that
CB-decorated supplier (i.e., apply CircuitBreaker.decorateSupplier(cb, supplier)
first, then Retry.decorateSupplier(retry, <cb-wrapped-supplier>)) so the
CircuitBreaker observes each individual attempt; update variable names
accordingly and keep return as withRetry.get().

Comment on lines +37 to +44
public <T> Flux<T> executeStream(String name, Supplier<Flux<T>> supplier) {
CircuitBreaker cb = cbRegistry.circuitBreaker(name);
Retry retry = retryRegistry.retry(name);

return supplier.get()
.transformDeferred(RetryOperator.of(retry))
.transformDeferred(CircuitBreakerOperator.of(cb));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Reactor 스트림 조합 순서도 반대입니다 — CircuitBreakerOperator 먼저, RetryOperator를 마지막에 적용하세요

지금은 RetryOperator → CircuitBreakerOperator 순서라 CB가 재시도 묶음 전체만 관찰합니다. CB가 각 시도를 관찰하도록 아래처럼 순서를 바꿔 주세요.

     public <T> Flux<T> executeStream(String name, Supplier<Flux<T>> supplier) {
         CircuitBreaker cb = cbRegistry.circuitBreaker(name);
         Retry retry = retryRegistry.retry(name);
 
         return supplier.get()
-            .transformDeferred(RetryOperator.of(retry))
-            .transformDeferred(CircuitBreakerOperator.of(cb));
+            .transformDeferred(CircuitBreakerOperator.of(cb))  // CB를 내부에
+            .transformDeferred(RetryOperator.of(retry));       // Retry를 외부에
     }
🤖 Prompt for AI Agents
In
cs25-service/src/main/java/com/example/cs25service/domain/ai/resilience/AiResilience.java
around lines 37 to 44, the Reactor operator order is reversed: currently
RetryOperator is applied before CircuitBreakerOperator so the CircuitBreaker
observes the whole retry sequence; change the operator application order so the
CircuitBreakerOperator is applied first and the RetryOperator after it (i.e.,
transformDeferred(CircuitBreakerOperator.of(cb)) then
transformDeferred(RetryOperator.of(retry))) so the circuit breaker observes each
individual retry attempt.

Comment on lines +60 to +67
// 5) Document id는 URL > title 우선
String id = !isBlank(url) ? url : title;
String body = !isBlank(description) ? description
: (!isBlank(title) ? title : (url != null ? url : ""));

documents.add(new Document(
id,
body,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Document ID가 null/빈 문자열이 될 수 있는 잠재 버그

현재 로직에서는 url/title이 모두 비어 있고 description만 있을 때 id가 null이 될 수 있습니다. Spring AI Document의 id는 null이 아닌 값을 기대합니다.

다음과 같이 body를 먼저 계산한 뒤, id를 body까지 fallback 하여 null/blank를 방지하세요.

-                // 5) Document id는 URL > title 우선
-                String id = !isBlank(url) ? url : title;
-                String body = !isBlank(description) ? description
-                    : (!isBlank(title) ? title : (url != null ? url : ""));
+                // 5) 본문과 ID 계산: body는 description > title > url, ID는 url > title > body
+                String body = !isBlank(description) ? description
+                    : (!isBlank(title) ? title : (!isBlank(url) ? url : ""));
+                String id = !isBlank(url) ? url
+                    : (!isBlank(title) ? title : body);

이전 단계(Line 56-58)에서 최소 하나는 비어있지 않으므로 body는 항상 비어있지 않게 됩니다.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// 5) Document id는 URL > title 우선
String id = !isBlank(url) ? url : title;
String body = !isBlank(description) ? description
: (!isBlank(title) ? title : (url != null ? url : ""));
documents.add(new Document(
id,
body,
// 5) 본문과 ID 계산: body는 description > title > url, ID는 url > title > body
String body = !isBlank(description) ? description
: (!isBlank(title) ? title : (!isBlank(url) ? url : ""));
String id = !isBlank(url) ? url
: (!isBlank(title) ? title : body);
documents.add(new Document(
id,
body,
🤖 Prompt for AI Agents
In
cs25-service/src/main/java/com/example/cs25service/domain/ai/service/BraveSearchRagService.java
around lines 60 to 67, the current id calculation can be null/blank when both
url and title are empty while description exists; compute body first (using
description > title > url as already intended), then set id to url if present,
else title, and finally fall back to body to guarantee a non-null/non-blank id;
ensure you trim/check isBlank and pass that id into the Document constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants