Skip to content

[Fix] SemoFeedService 탈퇴 유저 체크 누락 수정#211

Merged
howooyeon merged 2 commits into
developfrom
fix/#204-semofeed-user-reader
Jun 14, 2026
Merged

[Fix] SemoFeedService 탈퇴 유저 체크 누락 수정#211
howooyeon merged 2 commits into
developfrom
fix/#204-semofeed-user-reader

Conversation

@howooyeon

Copy link
Copy Markdown
Contributor

🧾 요약

  • SemoFeedService.create()에서 UserRepository.findById 대신 UserReader.findActiveUserById를 사용하여 탈퇴 유저의 세모피드 생성을 차단

🔗 이슈

✨ 변경 내용

  • SemoFeedService의 의존성을 UserRepositoryUserReader로 교체
  • create() 메서드에서 userReader.findActiveUserById(userId)로 활성 유저만 조회하도록 변경

✅ 확인

  • 빌드 OK
  • 테스트 OK (활성 유저 세모피드 생성 정상 동작 확인)

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 72fbc387-6b8b-4449-8df6-90b20e7046b6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#204-semofeed-user-reader

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.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

본 PR은 세모피드 생성 시 탈퇴한 유저에 대한 검증이 누락되었던 문제를 해결합니다. 기존의 직접적인 레포지토리 접근 방식에서 UserReader를 통한 활성 유저 조회 방식으로 변경하여 데이터 정합성을 강화했습니다.

Highlights

  • 의존성 변경: SemoFeedService에서 UserRepository 대신 UserReader를 사용하도록 의존성을 변경했습니다.
  • 탈퇴 유저 검증 로직 추가: create 메서드에서 findActiveUserById를 호출하여 탈퇴한 유저의 세모피드 생성을 차단하도록 로직을 수정했습니다.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors SemoFeedService to use UserReader instead of UserRepository for retrieving active users. However, the corresponding test class SemoFeedServiceTest was not updated to mock UserReader, which will lead to a NullPointerException during test execution.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

private final SemoFeedRepository semoFeedRepository;
private final SemoFeedEmojiRepository semoFeedEmojiRepository;
private final UserRepository userRepository;
private final UserReader userReader;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

[P1] 테스트 코드 반영 누락\n\nSemoFeedService의 의존성이 UserRepository에서 UserReader로 변경되었으나, SemoFeedServiceTest 클래스에서는 여전히 UserRepository를 모킹(@Mock)하고 있어 테스트 실행 시 NullPointerException이 발생합니다.\n\nSemoFeedServiceTest 파일에서 다음과 같이 수정을 진행해주셔야 테스트가 정상적으로 통과합니다.\n\njava\n// SemoFeedServiceTest.java\n@Mock\nprivate UserReader userReader; // UserRepository 대신 UserReader 모킹\n\n@Test\nvoid createReturnsDefaultEmojiFields() {\n User user = user(1L, \"author\", \"https://example.com/profile.png\");\n\n // userRepository.findById 대신 userReader.findActiveUserById 모킹\n when(userReader.findActiveUserById(1L)).thenReturn(user);\n ...\n}\n

@howooyeon howooyeon merged commit 58072f9 into develop Jun 14, 2026
1 check passed
@howooyeon howooyeon deleted the fix/#204-semofeed-user-reader branch June 14, 2026 15:42
@howooyeon howooyeon self-assigned this Jun 15, 2026
@howooyeon howooyeon added the bug Something isn't working label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] SemoFeedService 탈퇴 유저 체크 누락

1 participant