Skip to content

Fix: 통계·에러 응답·분석 지표·RabbitMQ 설정 수정 (#107, #108, #109, #110) - #111

Merged
LATE-BL00MER merged 2 commits into
developfrom
fix/107-110-backend-fixes
Aug 25, 2026
Merged

Fix: 통계·에러 응답·분석 지표·RabbitMQ 설정 수정 (#107, #108, #109, #110)#111
LATE-BL00MER merged 2 commits into
developfrom
fix/107-110-backend-fixes

Conversation

@LATE-BL00MER

@LATE-BL00MER LATE-BL00MER commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

📋 작업 내용

  • 기간별 통계 조회에서 위험도 또는 카테고리가 null인 분석 결과를 집계 대상에서 제외했습니다.
  • 공통 에러 응답에 ErrorCode 식별자를 추가했습니다.
  • 분석 응답에 노출되는 내부 영문 문구를 제거하고 한글화했습니다.
  • Docker Compose 환경에서 RabbitMQ 내부 연결 주소가 rabbitmq:5672를 사용하도록 수정했습니다.
  • 관련 테스트와 백엔드 문서를 수정했습니다.

🧪 테스트 결과

  • 전체 BE 테스트 170개 통과
  • 실패 및 스킵 테스트 없음
  • Docker Compose 설정에서 BE와 AI 모두 RabbitMQ 내부 주소가 정상 적용되는 것을 확인했습니다.

🔗 관련 이슈

Closes #107
Closes #108
Closes #109
Closes #110

✅ 체크리스트

  • 관련 이슈를 연결했습니다.
  • 구현 범위와 변경 이유를 설명했습니다.
  • 로컬 테스트를 통과했습니다.
  • API 변경 사항을 문서에 반영했습니다.
  • DB 변경 사항과 마이그레이션을 포함했습니다. (DB 변경 없음)
  • 민감 정보가 코드·로그·테스트 데이터에 포함되지 않았습니다.
  • 프론트엔드에 영향을 주는 응답 스키마 또는 Enum 변경을 공유했습니다.
  • 병합 전 작업 브랜치를 삭제하지 않았습니다.

Summary by CodeRabbit

  • New Features

    • API error responses now include stable error codes for easier identification.
    • Analysis results provide clearer Korean descriptions and separate failed tracks from indicators.
    • Statistics exclude pending, failed, or incomplete analyses.
    • RabbitMQ configuration now supports both host-based and Docker-based connections with defaults.
  • Bug Fixes

    • Improved handling of invalid request inputs and security-related error responses.
  • Documentation

    • Updated RabbitMQ setup guidance and API response documentation.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 54 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f452b5b-dff4-4a31-bd8c-50d461fae64c

📥 Commits

Reviewing files that changed from the base of the PR and between 6ebbf84 and 0d6871f.

📒 Files selected for processing (7)
  • docs/safefam-backend.md
  • src/main/java/com/gold/safefam/global/exception/GlobalExceptionHandler.java
  • src/main/java/com/gold/safefam/global/security/RateLimitFilter.java
  • src/test/java/com/gold/safefam/domain/auth/controller/AuthControllerTest.java
  • src/test/java/com/gold/safefam/domain/auth/controller/AuthFlowTest.java
  • src/test/java/com/gold/safefam/global/exception/GlobalExceptionHandlerTest.java
  • src/test/java/com/gold/safefam/global/security/RateLimitFilterTest.java

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ed8df330-73d2-4783-aa27-f13d81f4b3b7

📥 Commits

Reviewing files that changed from the base of the PR and between 892d52e and 6ebbf84.

📒 Files selected for processing (20)
  • .env.example
  • README.md
  • docker-compose.yml
  • docs/safefam-backend.md
  • src/main/java/com/gold/safefam/domain/analysis/mapper/AnalysisResponseMapper.java
  • src/main/java/com/gold/safefam/domain/analysis/repository/AnalysisRepository.java
  • src/main/java/com/gold/safefam/domain/analysis/service/AnalysisResultApplyService.java
  • src/main/java/com/gold/safefam/global/exception/GlobalExceptionHandler.java
  • src/main/java/com/gold/safefam/global/response/ApiResponse.java
  • src/main/java/com/gold/safefam/global/security/JwtAccessDeniedHandler.java
  • src/main/java/com/gold/safefam/global/security/JwtAuthenticationEntryPoint.java
  • src/main/java/com/gold/safefam/global/security/RateLimitFilter.java
  • src/test/java/com/gold/safefam/domain/analysis/mapper/AnalysisResponseMapperTest.java
  • src/test/java/com/gold/safefam/domain/analysis/service/AnalysisResultApplyMappingTest.java
  • src/test/java/com/gold/safefam/domain/auth/controller/AuthControllerTest.java
  • src/test/java/com/gold/safefam/domain/auth/controller/AuthFlowTest.java
  • src/test/java/com/gold/safefam/domain/statistics/controller/StatisticsOverviewFlowTest.java
  • src/test/java/com/gold/safefam/global/exception/GlobalExceptionHandlerTest.java
  • src/test/java/com/gold/safefam/global/security/RateLimitFilterTest.java
  • src/test/java/com/gold/safefam/global/security/SecurityErrorHandlerTest.java

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes configure Docker-specific RabbitMQ connections, add stable error codes to API responses, normalize analysis result text, and exclude incomplete analysis records from statistics aggregations.

Changes

RabbitMQ connectivity

Layer / File(s) Summary
Compose RabbitMQ defaults
.env.example, README.md, docker-compose.yml
Compose services now use rabbitmq:5672 by default. Host and Docker-specific RabbitMQ URLs and credentials are documented.

API error response codes

Layer / File(s) Summary
API response contract
src/main/java/com/gold/safefam/global/response/ApiResponse.java, docs/safefam-backend.md
ApiResponse now includes a nullable code field. Success and failure response documentation reflects the updated contract.
Error code propagation and validation
src/main/java/com/gold/safefam/global/exception/GlobalExceptionHandler.java, src/main/java/com/gold/safefam/global/security/*, src/test/java/com/gold/safefam/global/*, src/test/java/com/gold/safefam/domain/auth/controller/*
Invalid-input, authentication, authorization, business, and rate-limit responses now include stable error codes. Tests verify the response fields and values.

Analysis response normalization

Layer / File(s) Summary
Analysis mapping normalization
src/main/java/com/gold/safefam/domain/analysis/mapper/AnalysisResponseMapper.java, src/main/java/com/gold/safefam/domain/analysis/service/AnalysisResultApplyService.java, src/test/java/com/gold/safefam/domain/analysis/*
Internal prefixes are removed, failed-track indicators are separated from general indicators, and known English messages are translated into Korean. Mapper and service tests cover the updated output.

Statistics null-result filtering

Layer / File(s) Summary
Statistics aggregation filters
src/main/java/com/gold/safefam/domain/analysis/repository/AnalysisRepository.java, src/test/java/com/gold/safefam/domain/statistics/controller/StatisticsOverviewFlowTest.java
Risk-level and category aggregations now exclude null values. Integration tests cover pending, failed, and uncategorized analyses across supported periods.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 6ebbf

The PR updates statistics filtering, error identifiers, analysis messages, and RabbitMQ Compose connectivity, with the supplied checks passing; no actionable merge-blocking risk remains beyond normal review.

Suggested reviewers: pearseona

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.71% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 41 functions across 16 files. (4 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the four primary changes: statistics, error responses, analysis indicators, and RabbitMQ configuration. It is concise and specific.
Linked Issues check ✅ Passed The changes satisfy the linked objectives. [#107] adds null filters to statistics queries and integration coverage. [#108] adds nullable error codes across business, validation, authentication, and au…
Out of Scope Changes check ✅ Passed All production, documentation, configuration, and test changes directly support issues [#107], [#108], [#109], and [#110]. No unrelated code changes are identified.
Full details: Linked Issues check

Explanation

The changes satisfy the linked objectives. [#107] adds null filters to statistics queries and integration coverage. [#108] adds nullable error codes across business, validation, authentication, and authorization responses, with documentation and tests. [#109] removes internal prefixes, localizes indicator text, preserves failed tracks, and updates mapper and service tests. [#110] configures Docker-specific RabbitMQ connectivity, documents the variables, and preserves host settings.

Full details: Docstring Coverage

Explanation

Docstring coverage is 31.71% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 41 functions across 16 files. (4 skipped: 4 unsupported.)

✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/107-110-backend-fixes
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/107-110-backend-fixes

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.

@LATE-BL00MER LATE-BL00MER self-assigned this Aug 25, 2026
@LATE-BL00MER
LATE-BL00MER merged commit 0315111 into develop Aug 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment