Skip to content

Revert "chore : AI 피드백 길이 검증 부분 주석 처리 (#359)"#360

Merged
crocusia merged 1 commit intodevfrom
revert-359-chore/355
Aug 8, 2025
Merged

Revert "chore : AI 피드백 길이 검증 부분 주석 처리 (#359)"#360
crocusia merged 1 commit intodevfrom
revert-359-chore/355

Conversation

@crocusia
Copy link
Copy Markdown
Member

@crocusia crocusia commented Aug 8, 2025

테스트 코드 주석 처리 해제

Summary by CodeRabbit

  • 버그 수정

    • AI 피드백이 비어있거나 null일 경우 예외가 발생하도록 검증이 활성화되었습니다.
  • 테스트

    • 여러 테스트 파일이 활성화되어 기존 테스트 코드가 다시 실행 가능해졌습니다. (AiServiceTest, FallbackAiChatClientIntegrationTest, QuizAdminServiceTest, UserQuizAnswerServiceTest)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

AI 피드백 스트림 프로세서에서 피드백이 null 또는 빈 문자열일 경우 예외를 발생시키는 유효성 검사가 다시 활성화되었습니다. 또한, 여러 테스트 파일이 전체적으로 주석 해제되어 테스트 코드가 다시 활성화되었습니다. 코드 로직이나 테스트 구현에는 변경이 없으며, 주로 주석 처리된 코드의 복구가 이루어졌습니다.

Changes

Cohort / File(s) Change Summary
AI 피드백 유효성 검사 활성화
cs25-service/src/main/java/com/example/cs25service/domain/ai/service/AiFeedbackStreamProcessor.java
AI 피드백이 null 또는 빈 문자열일 때 AiException을 발생시키는 코드가 주석 해제되어 유효성 검사가 활성화됨.
AI 서비스 및 피드백 통합 테스트 활성화
cs25-service/src/test/java/com/example/cs25service/ai/AiServiceTest.java,
cs25-service/src/test/java/com/example/cs25service/ai/FallbackAiChatClientIntegrationTest.java
전체 테스트 파일이 주석 해제되어 테스트 코드가 다시 활성화됨. 테스트 로직에는 변경 없음.
관리자 및 사용자 퀴즈 답변 서비스 테스트 활성화
cs25-service/src/test/java/com/example/cs25service/domain/admin/service/QuizAdminServiceTest.java,
cs25-service/src/test/java/com/example/cs25service/domain/userQuizAnswer/service/UserQuizAnswerServiceTest.java
전체 테스트 파일이 주석 해제되어 테스트 코드가 다시 활성화됨. 테스트 로직에는 변경 없음.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant AiFeedbackStreamProcessor
    participant AI
    Client->>AiFeedbackStreamProcessor: stream()
    AiFeedbackStreamProcessor->>AI: Generate feedback
    AI-->>AiFeedbackStreamProcessor: feedback
    AiFeedbackStreamProcessor->>AiFeedbackStreamProcessor: Check if feedback is null or empty
    alt feedback is null or empty
        AiFeedbackStreamProcessor-->>Client: throw AiException(INTERNAL_SERVER_ERROR)
    else feedback is valid
        AiFeedbackStreamProcessor-->>Client: return feedback
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • NBC-finalProject/CS25-BE#171: AiFeedbackStreamProcessor.stream에서 AI 피드백을 하드코딩된 응답으로 대체하며 실제 AI 호출을 제거하는 등, 동일 메서드 내 피드백 처리 로직을 변경한 PR로 직접적으로 관련됨.
  • NBC-finalProject/CS25-BE#155: AiFeedbackStreamProcessor 클래스와 stream 메서드의 도입 및 AI 피드백 스트리밍과 유저 점수 업데이트 로직을 구현한 PR로, 이번 변경과 직접적으로 관련됨.
  • NBC-finalProject/CS25-BE#190: AiFeedbackStreamProcessor.stream()에서 SSE를 통한 토큰 단위 스트리밍으로 구조를 리팩토링하는 PR로, 동일 메서드 내 구현을 다르게 변경하여 코드 레벨에서 관련성이 높음.

Suggested reviewers

  • Kimyoonbeom
  • HeeMang-Lee

Poem

🐇
주석 속 잠자던 코드들이
다시 깨어난 오늘 아침,
AI 피드백 검증도 또렷이
빈값이면 예외를 던지네!
테스트 토끼도 깡총깡총,
모두 함께 달려가는
코드밭의 봄날이 왔어요.
🌱

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b26cd78 and 1c23a2a.

📒 Files selected for processing (5)
  • cs25-service/src/main/java/com/example/cs25service/domain/ai/service/AiFeedbackStreamProcessor.java (2 hunks)
  • cs25-service/src/test/java/com/example/cs25service/ai/AiServiceTest.java (1 hunks)
  • cs25-service/src/test/java/com/example/cs25service/ai/FallbackAiChatClientIntegrationTest.java (1 hunks)
  • cs25-service/src/test/java/com/example/cs25service/domain/admin/service/QuizAdminServiceTest.java (1 hunks)
  • cs25-service/src/test/java/com/example/cs25service/domain/userQuizAnswer/service/UserQuizAnswerServiceTest.java (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-359-chore/355

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
  • 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 src/utils.ts and explain its main purpose.
    • @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 comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

@crocusia crocusia merged commit 980f08c into dev Aug 8, 2025
1 of 2 checks passed
@crocusia crocusia deleted the revert-359-chore/355 branch August 8, 2025 09:52
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.

1 participant