Skip to content

Comments

problem: Middleman 제거 및 데드 코드 정리#157

Merged
ryuwldnjs merged 1 commit intomainfrom
156-refactor-problem-도메인-middleman-제거-및-데드-코드-정리
Feb 16, 2026

Hidden character warning

The head ref may contain hidden characters: "156-refactor-problem-\ub3c4\uba54\uc778-middleman-\uc81c\uac70-\ubc0f-\ub370\ub4dc-\ucf54\ub4dc-\uc815\ub9ac"
Merged

problem: Middleman 제거 및 데드 코드 정리#157
ryuwldnjs merged 1 commit intomainfrom
156-refactor-problem-도메인-middleman-제거-및-데드-코드-정리

Conversation

@ryuwldnjs
Copy link
Member

@ryuwldnjs ryuwldnjs commented Feb 16, 2026

  • ProblemService 삭제 (SolvedAcClient 단순 위임만 수행)
  • RecommendationCreator가 SolvedAcClient 직접 호출
  • ProblemController, ProblemRecommendRequest 삭제 (사용처 없는 프록시 엔드포인트)
  • TeamProblem, TeamProblemRecommendResponse 삭제 (데드 코드)

관련 이슈

변경 내용

변경 유형

  • [FEATURE] 기능 구현
  • [BUG] 버그 수정
  • [REFACTOR] 리팩토링
  • [CHORE] 설정/의존성
  • [DOCS] 문서

테스트

  • 테스트 완료

스크린샷 (UI 변경 시)

참고사항

Summary by CodeRabbit

Release Notes

  • Refactor

    • Removed problem recommendation API endpoints and simplified the underlying recommendation system architecture.
  • Deprecated Features

    • Problem recommendation endpoints have been removed from the API. Please contact support for migration guidance if you were using these endpoints.

- ProblemService 삭제 (SolvedAcClient 단순 위임만 수행)
- RecommendationCreator가 SolvedAcClient 직접 호출
- ProblemController, ProblemRecommendRequest 삭제 (사용처 없는 프록시 엔드포인트)
- TeamProblem, TeamProblemRecommendResponse 삭제 (데드 코드)
@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'path_filters'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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

Walkthrough

problem 도메인의 Middleman 안티패턴을 제거하기 위해 ProblemService와 ProblemController를 삭제하고, 사용되지 않는 엔티티 및 DTO(TeamProblem, ProblemRecommendRequest, TeamProblemRecommendResponse)를 정리했습니다. RecommendationCreator가 이제 SolvedAcClient를 직접 호출합니다.

Changes

Cohort / File(s) Summary
Middleman 서비스 및 컨트롤러 제거
src/main/java/com/ryu/studyhelper/problem/ProblemController.java, src/main/java/com/ryu/studyhelper/problem/service/ProblemService.java
GET/POST /api/problem/recommend 엔드포인트 및 SolvedAcClient로의 단순 위임 메서드들을 제거했습니다.
데드 코드 정리
src/main/java/com/ryu/studyhelper/problem/domain/TeamProblem.java, src/main/java/com/ryu/studyhelper/problem/dto/ProblemRecommendRequest.java, src/main/java/com/ryu/studyhelper/problem/dto/TeamProblemRecommendResponse.java
사용되지 않는 레거시 엔티티 및 DTO를 삭제했습니다.
의존성 업데이트
src/main/java/com/ryu/studyhelper/recommendation/service/RecommendationCreator.java, src/test/java/com/ryu/studyhelper/recommendation/.../RecommendationCreatorTest.java
ProblemService 의존성을 SolvedAcClient로 교체하고, 호출을 recommendUnsolvedProblems(...) 으로 변경했습니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 미들맨 없이 직진하네,
SolvedAc 클라이언트 팔을 펼쳐,
데드 코드는 사라지고,
문제 도메인 깔끔해졌어! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Merge Conflict Detection ⚠️ Warning ⚠️ Unable to check for merge conflicts: Invalid branch name format
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 변경의 핵심(Middleman 제거 및 데드 코드 정리)을 명확하고 간결하게 설명하며, 실제 변경 사항과 완벽하게 일치합니다.
Linked Issues check ✅ Passed 모든 코드 변경이 이슈 #156의 요구사항을 충족합니다: ProblemService 삭제, RecommendationCreator가 SolvedAcClient 직접 호출, 데드 코드(TeamProblem, TeamProblemRecommendResponse) 삭제, 관련 테스트 업데이트 완료.
Out of Scope Changes check ✅ Passed PR의 모든 변경 사항이 이슈 #156의 정의된 범위 내에 있으며, 범위를 벗어난 변경이 없습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 156-refactor-problem-도메인-middleman-제거-및-데드-코드-정리
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch 156-refactor-problem-도메인-middleman-제거-및-데드-코드-정리
  • Create stacked PR with resolved conflicts
  • Post resolved changes as copyable diffs in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/java/com/ryu/studyhelper/recommendation/service/RecommendationCreator.java (1)

80-98: ⚠️ Potential issue | 🟠 Major

ScheduledRecommendationService에서 추천 생성 실패 시 빈 Recommendation 레코드가 DB에 남습니다.

ScheduledRecommendationService.prepareDailyRecommendations() (line 55)에서 recommendationCreator.create()를 호출할 때, 메서드가 try-catch 블록(line 59)으로 감싸져 있어 예외를 catch하고 처리합니다. 이 경우 예외가 전파되지 않으므로 Spring의 @Transactional이 롤백하지 않으며, createRecommendation()에서 이미 저장된(line 59) 빈 Recommendation 레코드가 DB에 남게 됩니다.

  • RecommendationService.createManualRecommendation()은 예외가 전파되어 안전합니다.
  • ScheduledRecommendationService의 catch 블록에서 예외를 re-throw하거나, 특정 상황만 처리하도록 수정이 필요합니다.

@ryuwldnjs ryuwldnjs merged commit 5aedcc1 into main Feb 16, 2026
2 checks passed
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.

[REFACTOR] problem 도메인 Middleman 제거 및 데드 코드 정리

1 participant