Skip to content

Conversation

@doup2001
Copy link
Member

@doup2001 doup2001 commented Dec 7, 2025

๐Ÿ“Œ ์ž‘์—…ํ•œ ๋‚ด์šฉ

๐Ÿ” ์ฐธ๊ณ  ์‚ฌํ•ญ

๐Ÿ–ผ๏ธ ์Šคํฌ๋ฆฐ์ƒท

๐Ÿ”— ๊ด€๋ จ ์ด์Šˆ

โœ… ์ฒดํฌ๋ฆฌ์ŠคํŠธ

  • ๋กœ์ปฌ์—์„œ ๋นŒ๋“œ ๋ฐ ํ…Œ์ŠคํŠธ ์™„๋ฃŒ
  • ์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์™„๋ฃŒ
  • ๋ฌธ์„œํ™” ํ•„์š” ์—ฌ๋ถ€ ํ™•์ธ

Summary by CodeRabbit

๋ฆด๋ฆฌ์Šค ๋…ธํŠธ

  • ๊ธฐ๋Šฅ ์ œ๊ฑฐ

    • ์ง„๋‹จ ๋ฐ ์„ค๋ช… ๊ธฐ๋Šฅ ๋ชจ๋“ˆ ์‚ญ์ œ
  • ๊ฐœ์„ ์‚ฌํ•ญ

    • ์ฃผํƒ ๋‹จ์ง€ ์ƒ์„ธ ์ •๋ณด์— ์œ ๋‹› ๊ฐœ์ˆ˜ ๋ฐ ์œ ํ˜• ์ถ”๊ฐ€
    • ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ ๋ฐ ๋กœ๊น… ๊ฐ•ํ™”
    • pinPointId ์ž…๋ ฅ๊ฐ’ ํ•„์ˆ˜ ๊ฒ€์ฆ ์ถ”๊ฐ€
    • ๊ฑฐ๋ฆฌ ์‘๋‹ต์— ์†Œ์š” ์‹œ๊ฐ„ ์ •๋ณด ๋…ธ์ถœ

โœ๏ธ Tip: You can customize this high-level summary in your review settings.

@github-actions
Copy link

github-actions bot commented Dec 7, 2025

Test Results

22 testsโ€‚ ยฑ0โ€‚โ€ƒโ€ƒ22 โœ… ยฑ0โ€‚โ€ƒโ€ƒ0s โฑ๏ธ ยฑ0s
โ€‡3 suites ยฑ0โ€‚โ€ƒโ€ƒโ€‡0 ๐Ÿ’ค ยฑ0โ€‚
โ€‡3 filesโ€„โ€‚ ยฑ0โ€‚โ€ƒโ€ƒโ€‡0 โŒ ยฑ0โ€‚

Results for commit ccfb3da.โ€ƒยฑ Comparison against base commit 406c577.

โ™ป๏ธ This comment has been updated with latest results.

@coderabbitai
Copy link

coderabbitai bot commented Dec 7, 2025

Walkthrough

์ง„๋‹จ/์„ค๋ช… ๊ธฐ๋Šฅ ๋ชจ๋“ˆ ์ „์ฒด๋ฅผ ์ œ๊ฑฐํ•˜๊ณ , ๊ณต์ง€์‚ฌํ•ญ ๋ชจ๋“ˆ์— ์ž…๋ ฅ ๊ฒ€์ฆ ๋ฐ ๊ฐœ์„ ๋œ ๋กœ๊น…์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. pinPointId ํ•„์ˆ˜ ์ž…๋ ฅ ๊ฒ€์ฆ ๋ฐ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ์‹คํŒจ ์ฒ˜๋ฆฌ ๋กœ์ง์„ ๊ฐ•ํ™”ํ•˜๋ฉฐ, ์ฃผํƒ ๋‹จ์ง€ ์ƒ์„ธ ์ •๋ณด ์‘๋‹ต์— ๋‹จ์œ„ ์œ ํ˜• ๋ฐ ๊ฐœ์ˆ˜ ์ •๋ณด๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

Changes

์ฝ”ํ˜ธํŠธ / ํŒŒ์ผ(s) ๋ณ€๊ฒฝ ์š”์•ฝ
์—๋Ÿฌ ์ฝ”๋“œ ์ถ”๊ฐ€ pinPointId ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’ ๋ˆ„๋ฝ ์‹œ 400_001 ์—๋Ÿฌ ์ฝ”๋“œ ์ถ”๊ฐ€
src/main/java/com/pinHouse/server/core/exception/code/NoticeErrorCode.java
์ง„๋‹จ/์„ค๋ช… ๋ชจ๋“ˆ ์ œ๊ฑฐ ์ง„๋‹จ ์งˆ๋ฌธ, ์„ค๋ช… ์กฐํšŒ ๊ธฐ๋Šฅ ์ „์ฒด ์‚ญ์ œ (DTO, Service, Repository, Entity, Controller, Swagger ์ŠคํŽ™)
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/dto/DiagnosisQuestionResponse.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/dto/ExplanationResponse.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/service/ExplanationService.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/usecase/ExplanationUseCase.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/entity/DiagnosisQuestion.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/entity/DiagnosisType.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/entity/Explanation.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/repository/DiagnosisQuestionJpaRepository.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/repository/ExplanationJpaRepository.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/presentation/ExplanationApi.java,
src/main/java/com/pinHouse/server/platform/diagnostic/explanation/presentation/swagger/ExplanationApiSpec.java
๊ณต์ง€์‚ฌํ•ญ ๋ชจ๋“ˆ ์ž…๋ ฅ ๊ฒ€์ฆ ๊ฐ•ํ™” pinPointId ํ•„์ˆ˜ ์ž…๋ ฅ ๊ฒ€์ฆ ์ถ”๊ฐ€ ๋ฐ API ์š”์ฒญ ๊ฒ€์ฆ ์ ์šฉ
src/main/java/com/pinHouse/server/platform/housing/notice/application/dto/NoticeDetailFilterRequest.java,
src/main/java/com/pinHouse/server/platform/housing/notice/presentation/NoticeApi.java
๊ณต์ง€์‚ฌํ•ญ ์„œ๋น„์Šค ๋กœ๊น… ๊ฐœ์„  ๊ฑฐ๋ฆฌ ์‚ฌ์ „ ๊ณ„์‚ฐ ์‹œ ์„ฑ๊ณต/์‹คํŒจ ์นด์šดํŒ… ๋ฐ ์ƒ์„ธ ๋กœ๊น… ์ถ”๊ฐ€, ์˜ˆ์™ธ ๋ฐœ์ƒ ์‹œ totalTimeMap์— 0 ์ €์žฅ
src/main/java/com/pinHouse/server/platform/housing/notice/application/service/NoticeService.java
์ฃผํƒ ๋‹จ์ง€ ์‘๋‹ต ๋ชจ๋ธ ํ™•์žฅ unitCount, unitTypes ํ•„๋“œ ์ถ”๊ฐ€ ๋ฐ ๋ชจ๋“  ํ•„๋“œ์— Swagger Schema ์ฃผ์„ ์ ์šฉ
src/main/java/com/pinHouse/server/platform/housing/complex/application/dto/response/ComplexDetailResponse.java
๊ฑฐ๋ฆฌ ์‘๋‹ต ๋ชจ๋ธ ์—…๋ฐ์ดํŠธ totalTimeMinutes๋ฅผ ์‘๋‹ต์— ํฌํ•จํ•˜๋„๋ก @JsonIgnore ์ œ๊ฑฐ, ํ•„๋“œ ์„ค๋ช… ์ถ”๊ฐ€
src/main/java/com/pinHouse/server/platform/housing/complex/application/dto/response/DistanceResponse.java

Estimated code review effort

๐ŸŽฏ 3 (Moderate) | โฑ๏ธ ~20 minutes

  • ์ฃผ์˜ ํ•„์š” ์˜์—ญ:
    • ์ง„๋‹จ/์„ค๋ช… ๋ชจ๋“ˆ ์‚ญ์ œ๋กœ ์ธํ•œ ์˜์กด์„ฑ ์ œ๊ฑฐ ํ™•์ธ ํ•„์š” (11๊ฐœ ํŒŒ์ผ ์‚ญ์ œ)
    • NoticeDetailFilterRequest์˜ @NotBlank ๊ฒ€์ฆ ์ถ”๊ฐ€์— ๋”ฐ๋ฅธ ๊ธฐ์กด ์š”์ฒญ ๋ฐ์ดํ„ฐ ํ˜ธํ™˜์„ฑ ํ™•์ธ
    • ComplexDetailResponse์˜ unitCount, unitTypes ํ•„๋“œ ์ถ”๊ฐ€ ์‹œ ๊ธฐ์กด ๊ฐ์ฒด ์ƒ์„ฑ ๋กœ์ง์—์„œ null ๊ฐ’ ์ฒ˜๋ฆฌ ํ™•์ธ
    • NoticeService์˜ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ๋กœ์ง ๋ณ€๊ฒฝ์œผ๋กœ ์ธํ•œ ์˜ˆ์™ธ ์ฒ˜๋ฆฌ ํ๋ฆ„ ๊ฒ€์ฆ

Poem

์ง„๋‹จ์˜ ๋‚˜๋ญ‡๊ฐ€์ง€ ์น˜์šฐ์น˜๊ณ ,
๊ณต์ง€์˜ ์ƒˆ ๊ฒ€์ฆ๋ฌธ์ด ํ”ผ์–ด์˜ค๋ฅด๋„ค ๐Ÿฐ
unitCount์™€ unitTypes๋กœ ๋‹จ์ง€๊ฐ€ ๋” ํ’์š”๋กœ์›Œ,
๋กœ๊ทธ๋Š” ๋” ์ƒ์„ธํžˆ, ๊ฑฐ๋ฆฌ๋Š” ๋” ๋ช…ํ™•ํžˆ โœจ
๋ชจ๋“ˆ ๋Œ€์ฒญ์†Œ, ๊น”๋”ํ•œ ์ •์›์ด ๋˜์—ˆ๋„ค!

Pre-merge checks and finishing touches

โŒ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check โš ๏ธ Warning PR ์ œ๋ชฉ์€ ๊ฑฐ๋ฆฌ ์ถœ๋ ฅ ๋ฌธ์ œ ์ˆ˜์ •์ด๋ผ๋Š” ์ฃผ์š” ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋ช…ํ™•ํžˆ ๋‚˜ํƒ€๋‚ด๊ณ  ์žˆ์œผ๋‚˜, ์‹ค์ œ ๋ณ€๊ฒฝ ๋‚ด์šฉ์„ ๋ถ„์„ํ•˜๋ฉด Explanation ๊ด€๋ จ ๋ชจ๋“ˆ ์ „์ฒด ์‚ญ์ œ, ComplexDetailResponse ์ถ”๊ฐ€ ํ•„๋“œ ์ถ”๊ฐ€ ๋“ฑ ๊ด‘๋ฒ”์œ„ํ•œ ๋ณ€๊ฒฝ์ด ํฌํ•จ๋˜์–ด ์žˆ์–ด ์ œ๋ชฉ๊ณผ ๋ณ€๊ฒฝ ๋‚ด์šฉ์˜ ๊ดด๋ฆฌ๊ฐ€ ํฌ๋‹ค. ์ œ๋ชฉ์„ ๋ณ€๊ฒฝ ๋‚ด์šฉ์„ ๋” ์ •ํ™•ํžˆ ๋ฐ˜์˜ํ•˜๋„๋ก ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜, ๊ฑฐ๋ฆฌ ์ถœ๋ ฅ ๋ฌธ์ œ ์ˆ˜์ •๊ณผ ๋ฌด๊ด€ํ•œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ๋“ค์„ ๋ณ„๋„ PR๋กœ ๋ถ„๋ฆฌํ•˜๊ธฐ๋ฅผ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.
Description check โš ๏ธ Warning PR ์„ค๋ช…์ด ํ…œํ”Œ๋ฆฟ ๊ตฌ์กฐ๋Š” ์œ ์ง€ํ•˜๊ณ  ์žˆ์œผ๋‚˜, ๋ชจ๋“  ์„น์…˜์ด ๋น„์–ด ์žˆ๊ฑฐ๋‚˜ ๊ธฐ๋ณธ๊ฐ’๋งŒ ํฌํ•จ๋˜์–ด ์žˆ์–ด ์‹ค์ œ ๋ณ€๊ฒฝ ๋‚ด์šฉ, ์ฐธ๊ณ  ์‚ฌํ•ญ, ๊ด€๋ จ ์ด์Šˆ ๋“ฑ์˜ ์ •๋ณด๊ฐ€ ์™„์ „ํžˆ ๋ˆ„๋ฝ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ณ€๊ฒฝ ๋‚ด์šฉ(์ž‘์—…ํ•œ ๋‚ด์šฉ), ์ฐธ๊ณ  ์‚ฌํ•ญ, ๊ด€๋ จ ์ด์Šˆ, ์Šคํฌ๋ฆฐ์ƒท ๋“ฑ์„ ๊ตฌ์ฒด์ ์œผ๋กœ ์ž‘์„ฑํ•˜๊ณ  ์ฒดํฌ๋ฆฌ์ŠคํŠธ ํ•ญ๋ชฉ๋“ค์„ ํ™•์ธํ•˜์—ฌ ์—…๋ฐ์ดํŠธํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.
โœ… Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage โœ… Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
โœจ 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 feat/๊ฑฐ๋ฆฌ

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.

Actionable comments posted: 4

๐Ÿ“œ Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 406c577 and ccfb3da.

๐Ÿ“’ Files selected for processing (17)
  • src/main/java/com/pinHouse/server/core/exception/code/NoticeErrorCode.java (1 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/dto/DiagnosisQuestionResponse.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/dto/ExplanationResponse.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/service/ExplanationService.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/usecase/ExplanationUseCase.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/entity/DiagnosisQuestion.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/entity/DiagnosisType.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/entity/Explanation.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/repository/DiagnosisQuestionJpaRepository.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/repository/ExplanationJpaRepository.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/presentation/ExplanationApi.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/presentation/swagger/ExplanationApiSpec.java (0 hunks)
  • src/main/java/com/pinHouse/server/platform/housing/complex/application/dto/response/ComplexDetailResponse.java (5 hunks)
  • src/main/java/com/pinHouse/server/platform/housing/complex/application/dto/response/DistanceResponse.java (1 hunks)
  • src/main/java/com/pinHouse/server/platform/housing/notice/application/dto/NoticeDetailFilterRequest.java (2 hunks)
  • src/main/java/com/pinHouse/server/platform/housing/notice/application/service/NoticeService.java (2 hunks)
  • src/main/java/com/pinHouse/server/platform/housing/notice/presentation/NoticeApi.java (2 hunks)
๐Ÿ’ค Files with no reviewable changes (11)
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/presentation/ExplanationApi.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/dto/ExplanationResponse.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/dto/DiagnosisQuestionResponse.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/repository/ExplanationJpaRepository.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/repository/DiagnosisQuestionJpaRepository.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/entity/Explanation.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/service/ExplanationService.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/presentation/swagger/ExplanationApiSpec.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/entity/DiagnosisQuestion.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/domain/entity/DiagnosisType.java
  • src/main/java/com/pinHouse/server/platform/diagnostic/explanation/application/usecase/ExplanationUseCase.java
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
๐Ÿ”‡ Additional comments (6)
src/main/java/com/pinHouse/server/platform/housing/complex/application/dto/response/DistanceResponse.java (1)

27-31: LGTM! API ๋ฌธ์„œํ™” ๊ฐœ์„ 

routes์™€ stops ํ•„๋“œ์— ๋Œ€ํ•œ Swagger ์„ค๋ช…์ด ์ถ”๊ฐ€๋˜์–ด API ๋ฌธ์„œ๊ฐ€ ๋” ๋ช…ํ™•ํ•ด์กŒ์Šต๋‹ˆ๋‹ค.

src/main/java/com/pinHouse/server/platform/housing/complex/application/dto/response/ComplexDetailResponse.java (4)

8-8: LGTM! API ๋ฌธ์„œํ™” ์ถ”๊ฐ€

๋ชจ๋“  ํ•„๋“œ์— ๋Œ€ํ•œ Swagger ์Šคํ‚ค๋งˆ ์ •์˜๊ฐ€ ์ถ”๊ฐ€๋˜์–ด API ๋ฌธ์„œ๊ฐ€ ํ–ฅ์ƒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Also applies to: 17-48


38-42: LGTM! ์œ ๋‹› ํƒ€์ž… ์ •๋ณด ์ถ”๊ฐ€

unitCount์™€ unitTypes ํ•„๋“œ๊ฐ€ ์ ์ ˆํ•˜๊ฒŒ ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋ชฉ๋ก ์กฐํšŒ์—์„œ๋Š” unitCount๋งŒ ๋…ธ์ถœํ•˜๊ณ , ์ƒ์„ธ ์กฐํšŒ์—์„œ๋Š” ์ „์ฒด unitTypes๋ฅผ ์ œ๊ณตํ•˜๋Š” ์„ค๊ณ„๊ฐ€ ํ•ฉ๋ฆฌ์ ์ž…๋‹ˆ๋‹ค.

Also applies to: 66-69, 93-94


113-113: ๊ธฐ๋ณธ๊ฐ’ 0์€ ์˜๋„๋œ ์„ค๊ณ„์ž…๋‹ˆ๋‹ค.

totalTimeMap.getOrDefault(document.getId(), 0)์—์„œ ๊ธฐ๋ณธ๊ฐ’์ด 0์ธ ๊ฒƒ์€ ์˜๋„์ ์ž…๋‹ˆ๋‹ค. NoticeService.java์˜ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ์‹คํŒจ ์‹œ ์˜ˆ์™ธ ์ฒ˜๋ฆฌ(line 210)์—์„œ ๋ช…์‹œ์ ์œผ๋กœ totalTimeMap.put(complex.getId(), 0)์„ ์‹คํ–‰ํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, formatTime() ๋ฉ”์„œ๋“œ๋„ 0์„ ์œ ํšจํ•œ ๊ฐ’์œผ๋กœ ์ฒ˜๋ฆฌํ•˜์—ฌ "0๋ถ„"์œผ๋กœ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.

๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ์— ์‹คํŒจํ•œ ์ž„๋Œ€์ฃผํƒ์€ "๋ฐ์ดํ„ฐ ์—†์Œ"์ด ์•„๋‹ˆ๋ผ "0๋ถ„ ์†Œ์š”"๋กœ ํ‘œ์‹œํ•˜๋Š” ๊ฒƒ์ด ์„ค๊ณ„ ์˜๋„์ž…๋‹ˆ๋‹ค.


155-159: Cannot verify the inconsistency claim between ComplexDetailResponse.java and DistanceResponse.java.

The review mentions a formatTime method in DistanceResponse.java (line 63-66) that allegedly returns null, and compares it with the implementation in ComplexDetailResponse.java (line 155-159) that returns "0๋ถ„". However, the referenced DistanceResponse.java file could not be located in the repository, making it impossible to verify whether this inconsistency actually exists or if it requires remediation.

Before proceeding with this review feedback, confirm that:

  1. DistanceResponse.java exists in the expected location
  2. The formatTime method in that file has the behavior described (returning null for zero/negative values)
  3. Both implementations are actually used in contexts where their different return values matter
src/main/java/com/pinHouse/server/platform/housing/notice/application/service/NoticeService.java (1)

119-142: ๋กœ๊น… ๊ฐœ์„ ์ด ์šฐ์ˆ˜ํ•ฉ๋‹ˆ๋‹ค!

๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ํ”„๋กœ์„ธ์Šค์— ๋Œ€ํ•œ ๊ฐ€์‹œ์„ฑ์„ ํฌ๊ฒŒ ํ–ฅ์ƒ์‹œํ‚ค๋Š” ๋ณ€๊ฒฝ์‚ฌํ•ญ์ž…๋‹ˆ๋‹ค:

  • ์‹œ์ž‘/์™„๋ฃŒ ๋กœ๊ทธ๋กœ ์ฒ˜๋ฆฌ ๋ฒ”์œ„ ํ™•์ธ ๊ฐ€๋Šฅ
  • ์„ฑ๊ณต/์‹คํŒจ ์นด์šดํ„ฐ๋กœ ๋ฌธ์ œ ๊ทœ๋ชจ ํŒŒ์•… ์šฉ์ด
  • ์‹คํŒจ ์‹œ ์ƒ์„ธ ์—๋Ÿฌ ์ •๋ณด ํฌํ•จ

์ด๋Ÿฌํ•œ ๊ฐœ์„ ์€ ๊ฑฐ๋ฆฌ ์ถœ๋ ฅ ๋ฌธ์ œ ๋””๋ฒ„๊น…์— ๋งค์šฐ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.

// ========================
// 400 Bad Request
// ========================
MISSING_PINPOINT_ID(400_001, HttpStatus.BAD_REQUEST, "pinPointId๋Š” ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ž…๋‹ˆ๋‹ค"),
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue | ๐ŸŸ  Major

๐Ÿงฉ Analysis chain

๐Ÿ Script executed:

rg -n -C3 "pinPointId" --type=java src/main/java/com/pinHouse/server/

Repository: PinHouse/PinHouse_BE

Length of output: 50376


๐Ÿ Script executed:

# Check specific files mentioned in the review
cat -n src/main/java/com/pinHouse/server/core/service/NoticeService.java | sed -n '110,130p'

Repository: PinHouse/PinHouse_BE

Length of output: 161


๐Ÿ Script executed:

# Check the API endpoint definition
cat -n src/main/java/com/pinHouse/server/api/NoticeApi.java | sed -n '100,115p'

Repository: PinHouse/PinHouse_BE

Length of output: 148


๐Ÿ Script executed:

# Check the filter request validation
fd "NoticeDetailFilterRequest" --type f | head -5

Repository: PinHouse/PinHouse_BE

Length of output: 168


Remove @notblank validation from pinPointId or make the request parameter required.

The codebase has conflicting requirements: NoticeDetailFilterRequest marks pinPointId as @NotBlank (required), but the compareUnitTypes endpoint in NoticeApi declares it as @RequestParam(required = false). Service code at NoticeService:118,203,234 and ComplexFilterService:191-194 defensively handles null/blank pinPointId by returning null or skipping distance calculations. The error code MISSING_PINPOINT_ID doesn't align with this optional design. Either enforce the requirement consistently across the API layer with required = true, or remove the @NotBlank validation from NoticeDetailFilterRequest to properly reflect that pinPointId is optional.

๐Ÿค– Prompt for AI Agents
In src/main/java/com/pinHouse/server/core/exception/code/NoticeErrorCode.java
around line 15, and associated DTO/controller spots, the codebase treats
pinPointId as optional but the DTO has @NotBlank; remove @NotBlank from
NoticeDetailFilterRequest.pinPointId so the DTO matches the controller's
@RequestParam(required = false) and service defensive logic, and then remove or
deprecate the MISSING_PINPOINT_ID error code (or ensure it is not referenced) so
error codes reflect that pinPointId is optional.

Comment on lines +15 to +16
@NotBlank(message = "pinPointId๋Š” ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ž…๋‹ˆ๋‹ค")
@Schema(example = "fec9aba3-0fd9-4b75-bebf-9cb7641fd251", required = true)
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue | ๐Ÿ”ด Critical

pinPointId๋ฅผ ํ•„์ˆ˜ ๊ฐ’์œผ๋กœ ๋งŒ๋“œ๋Š” ๊ฒƒ์€ ์„ค๊ณ„ ์˜ค๋ฅ˜์ž…๋‹ˆ๋‹ค.

@NotBlank ์ œ์•ฝ ์กฐ๊ฑด์„ ์ถ”๊ฐ€ํ•˜๋ฉด pinPointId๊ฐ€ ํ•„์ˆ˜ ์ž…๋ ฅ์ด ๋˜์ง€๋งŒ, ์ด๋Š” ๊ธฐ์กด ์„œ๋น„์Šค ๋กœ์ง๊ณผ ์ถฉ๋Œํ•ฉ๋‹ˆ๋‹ค:

  1. ์„œ๋น„์Šค ๋กœ์ง ์ถฉ๋Œ: NoticeService.java 118๋ฒˆ ๋ผ์ธ์—์„œ if (request.pinPointId() != null && !request.pinPointId().isBlank())๋กœ ์ฒดํฌํ•˜๋Š” ๊ฒƒ์€ ์ด ํ•„๋“œ๊ฐ€ ์„ ํƒ์ ์ž„์„ ์ „์ œ๋กœ ํ•ฉ๋‹ˆ๋‹ค.

  2. ๊ธฐ๋Šฅ ์„ค๊ณ„ ์˜๋„: ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ์€ ์‚ฌ์šฉ์ž๊ฐ€ pinPointId๋ฅผ ์ œ๊ณตํ–ˆ์„ ๋•Œ๋งŒ ์ˆ˜ํ–‰๋˜๋Š” ์„ ํƒ์  ๊ธฐ๋Šฅ์ž…๋‹ˆ๋‹ค. ๋ชจ๋“  ์š”์ฒญ์—์„œ ์ด๋ฅผ ํ•„์ˆ˜๋กœ ๋งŒ๋“ค๋ฉด ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ์ด ํ•„์š”์—†๋Š” ๊ฒฝ์šฐ์—๋„ ๋”๋ฏธ ๊ฐ’์„ ๋ณด๋‚ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

  3. Breaking Change: ๊ธฐ์กด ํด๋ผ์ด์–ธํŠธ๊ฐ€ pinPointId ์—†์ด ํ˜ธ์ถœํ•˜๋˜ API๊ฐ€ 400 ์—๋Ÿฌ๋ฅผ ๋ฐ˜ํ™˜ํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

ํ•ด๊ฒฐ ๋ฐฉ์•ˆ:

  • @NotBlank ์ œ์•ฝ ์กฐ๊ฑด์„ ์ œ๊ฑฐํ•˜๊ณ  pinPointId๋ฅผ ์„ ํƒ์  ํ•„๋“œ๋กœ ์œ ์ง€
  • ๋Œ€์‹  pinPointId๊ฐ€ ์ œ๊ณต๋˜์—ˆ์„ ๋•Œ๋งŒ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ์ˆ˜ํ–‰ (ํ˜„์žฌ ์„œ๋น„์Šค ๋กœ์ง๊ณผ ์ผ์น˜)

๋‹ค์Œ diff๋ฅผ ์ ์šฉํ•˜์„ธ์š”:

-        @NotBlank(message = "pinPointId๋Š” ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ž…๋‹ˆ๋‹ค")
-        @Schema(example = "fec9aba3-0fd9-4b75-bebf-9cb7641fd251", required = true)
+        @Schema(example = "fec9aba3-0fd9-4b75-bebf-9cb7641fd251", required = false)
         String pinPointId,
๐Ÿ“ 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
@NotBlank(message = "pinPointId๋Š” ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ž…๋‹ˆ๋‹ค")
@Schema(example = "fec9aba3-0fd9-4b75-bebf-9cb7641fd251", required = true)
@Schema(example = "fec9aba3-0fd9-4b75-bebf-9cb7641fd251", required = false)
String pinPointId,
๐Ÿค– Prompt for AI Agents
In
src/main/java/com/pinHouse/server/platform/housing/notice/application/dto/NoticeDetailFilterRequest.java
around lines 15-16, remove the @NotBlank constraint from pinPointId so the field
remains optional (matching the service logic that checks if pinPointId() != null
&& !isBlank()), leaving only the Schema annotation if desired; ensure no other
validation annotations force non-empty values so distance calculation continues
to run only when pinPointId is provided.

Comment on lines +210 to +212
totalTimeMap.put(complex.getId(), 0);
log.error("๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ์‹คํŒจ (0๋ถ„์œผ๋กœ ์„ค์ •) - complexId={}, pinPointId={}, error={}",
complex.getId(), request.pinPointId(), e.getMessage());
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue | ๐ŸŸก Minor

๋กœ๊ทธ์— ์˜ˆ์™ธ ๊ฐ์ฒด๋ฅผ ํฌํ•จํ•˜์„ธ์š”.

212๋ฒˆ ๋ผ์ธ์˜ ๋กœ๊ทธ ๊ตฌ๋ฌธ์—์„œ ์˜ˆ์™ธ ๊ฐ์ฒด๊ฐ€ ๋ˆ„๋ฝ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. 137๋ฒˆ ๋ผ์ธ๊ณผ ๋‹ฌ๋ฆฌ ๋งˆ์ง€๋ง‰์— , e๊ฐ€ ์—†์–ด ์Šคํƒ ํŠธ๋ ˆ์ด์Šค๊ฐ€ ๋กœ๊ทธ์— ๊ธฐ๋ก๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ diff๋ฅผ ์ ์šฉํ•˜์—ฌ ์ผ๊ด€์„ฑ์„ ์œ ์ง€ํ•˜์„ธ์š”:

-                    log.error("๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ์‹คํŒจ (0๋ถ„์œผ๋กœ ์„ค์ •) - complexId={}, pinPointId={}, error={}",
-                            complex.getId(), request.pinPointId(), e.getMessage());
+                    log.error("๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ์‹คํŒจ (0๋ถ„์œผ๋กœ ์„ค์ •) - complexId={}, pinPointId={}, error={}",
+                            complex.getId(), request.pinPointId(), e.getMessage(), e);
๐Ÿ“ 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
totalTimeMap.put(complex.getId(), 0);
log.error("๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ์‹คํŒจ (0๋ถ„์œผ๋กœ ์„ค์ •) - complexId={}, pinPointId={}, error={}",
complex.getId(), request.pinPointId(), e.getMessage());
totalTimeMap.put(complex.getId(), 0);
log.error("๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ์‹คํŒจ (0๋ถ„์œผ๋กœ ์„ค์ •) - complexId={}, pinPointId={}, error={}",
complex.getId(), request.pinPointId(), e.getMessage(), e);
๐Ÿค– Prompt for AI Agents
In
src/main/java/com/pinHouse/server/platform/housing/notice/application/service/NoticeService.java
around lines 210 to 212, the error log that records distance calculation failure
is missing the exception object, so the stack trace won't be logged; update the
log.error call to pass the exception as the final parameter (append ", e") so
the logger records the full stack trace and message, keeping the existing
message and placeholders unchanged.

import com.pinHouse.server.platform.housing.notice.application.usecase.NoticeUseCase;
import com.pinHouse.server.platform.housing.notice.presentation.swagger.NoticeApiSpec;
import com.pinHouse.server.security.oauth2.domain.PrincipalDetails;
import jakarta.validation.Valid;
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue | ๐ŸŸ  Major

๐Ÿงฉ Analysis chain

๐Ÿ Script executed:

find . -type f -name "NoticeApi.java" | head -20

Repository: PinHouse/PinHouse_BE

Length of output: 151


๐Ÿ Script executed:

find . -type f -name "NoticeDetailFilterRequest.java" | head -20

Repository: PinHouse/PinHouse_BE

Length of output: 170


๐Ÿ Script executed:

find . -type f -name "NoticeService.java" | head -20

Repository: PinHouse/PinHouse_BE

Length of output: 162


๐Ÿ Script executed:

cat -n ./src/main/java/com/pinHouse/server/platform/housing/notice/presentation/NoticeApi.java

Repository: PinHouse/PinHouse_BE

Length of output: 5468


๐Ÿ Script executed:

cat -n ./src/main/java/com/pinHouse/server/platform/housing/notice/application/dto/NoticeDetailFilterRequest.java

Repository: PinHouse/PinHouse_BE

Length of output: 3093


๐Ÿ Script executed:

sed -n '110,130p' ./src/main/java/com/pinHouse/server/platform/housing/notice/application/service/NoticeService.java

Repository: PinHouse/PinHouse_BE

Length of output: 1124


๐Ÿ Script executed:

grep -n "@Valid" ./src/main/java/com/pinHouse/server/platform/housing/notice/presentation/NoticeApi.java

Repository: PinHouse/PinHouse_BE

Length of output: 135


๐Ÿ Script executed:

rg -n "NoticeDetailFilterRequest" ./src/main/java/com/pinHouse/server/platform/housing/notice/presentation/NoticeApi.java

Repository: PinHouse/PinHouse_BE

Length of output: 296


๐Ÿ Script executed:

sed -n '90,102p' ./src/main/java/com/pinHouse/server/platform/housing/notice/presentation/NoticeApi.java

Repository: PinHouse/PinHouse_BE

Length of output: 452


๐Ÿ Script executed:

rg -n "NoticeDetailFilterRequest" ./src/main/java/com/pinHouse/server/platform/housing/notice/

Repository: PinHouse/PinHouse_BE

Length of output: 3286


@Valid ์–ด๋…ธํ…Œ์ด์…˜์˜ ์„ ํƒ์  ์ ์šฉ์œผ๋กœ ์ธํ•œ ๊ฒ€์ฆ ๋ถˆ์ผ์น˜ ๋ฐ Breaking Change

@Valid ์–ด๋…ธํ…Œ์ด์…˜์ด getNotice() ๋ฉ”์„œ๋“œ(69๋ฒˆ ๋ผ์ธ)์—๋งŒ ์ถ”๊ฐ€๋˜์—ˆ์œผ๋‚˜, ๋™์ผํ•œ NoticeDetailFilterRequest๋ฅผ ์‚ฌ์šฉํ•˜๋Š” countFilteredComplexes() ๋ฉ”์„œ๋“œ(94๋ฒˆ ๋ผ์ธ)์—๋Š” ์ถ”๊ฐ€๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

NoticeDetailFilterRequest์˜ @NotBlank ์ œ์•ฝ์ด getNotice()์—์„œ๋งŒ ํ™œ์„ฑํ™”๋˜๋ฉด์„œ:

  • POST /{noticeId}: pinPointId ํ•„์ˆ˜ (๊ฒ€์ฆ๋จ)
  • POST /{noticeId}/filter/count: pinPointId ์„ ํƒ์  (๊ฒ€์ฆ ์•ˆ๋จ)

๋™์ผํ•œ DTO๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋‘ ์—”๋“œํฌ์ธํŠธ์˜ ๊ฒ€์ฆ ๊ทœ์น™์ด ๋ถˆ์ผ์น˜ํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ NoticeService.java ๋ผ์ธ 118์˜ ๋ฐฉ์–ด์  ๋กœ์ง(if (request.pinPointId() != null && !request.pinPointId().isBlank()))์€ pinPointId๊ฐ€ ์„ ํƒ์ ์ž„์„ ์ „์ œ๋กœ ํ•˜๋ฏ€๋กœ, ์ด ๋ณ€๊ฒฝ์ด ์˜๋„๋œ ๊ฒƒ์ธ์ง€(๊ทธ๋ ‡๋‹ค๋ฉด ๋‹ค๋ฅธ ์—”๋“œํฌ์ธํŠธ๋„ ์ผ๊ด€๋˜๊ฒŒ ์ˆ˜์ • ํ•„์š”), ์•„๋‹ˆ๋ฉด oversight์ธ์ง€ ๊ฒ€ํ† ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿค– Prompt for AI Agents
In
src/main/java/com/pinHouse/server/platform/housing/notice/presentation/NoticeApi.java
around line 17 and the methods at lines ~69 and ~94, the @Valid annotation was
applied to getNotice() but not to countFilteredComplexes(), causing inconsistent
validation of NoticeDetailFilterRequest (pinPointId required in one endpoint but
optional in the other); either (A) add @Valid to the countFilteredComplexes()
method parameter so both endpoints enforce the same @NotBlank constraints on
pinPointId, or (B) remove @Valid from getNotice() (and adjust imports) if
pinPointId should be optional everywhere and then remove/adjust the defensive
service check at NoticeService.java:118 accordingly to keep behavior consistent
across endpoints.

@doup2001 doup2001 merged commit 5917549 into develop Dec 7, 2025
3 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.

2 participants