Skip to content

[FIX] 히스토리 상세 응답의 미구현 필드 추가 - #169

Merged
rkdehdrbs7885-oss merged 3 commits into
developfrom
fix/#167-history-detail-response
Aug 9, 2026
Merged

[FIX] 히스토리 상세 응답의 미구현 필드 추가#169
rkdehdrbs7885-oss merged 3 commits into
developfrom
fix/#167-history-detail-response

Conversation

@ownue

@ownue ownue commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📍 개요

히스토리 상세 응답의 미구현 필드 추가

⛓️‍💥 관련 이슈


🛠️ 작업 내용

  • 히스토리 상세 응답의 미구현 필드 추가

🔥 리뷰 요청 사항

리뷰어가 중점적으로 확인해주었으면 하는 내용을 작성해주세요.

  • 적절한 로직인지

✅ 체크리스트

  • 코드 컨벤션을 준수했습니다.
  • 불필요한 코드 및 import를 제거했습니다.
  • 예외 처리를 적용했습니다.
  • 테스트를 완료했습니다.
  • 관련 Issue를 연결했습니다.

📎 참고 사항

X

Summary by CodeRabbit

  • 개선 사항
    • 이력 상세 조회에서 전체 마디 수와 분석 구간별 예상 재생 시간을 제공합니다.
    • 관련 백킹트랙 정보가 없거나 불완전한 경우에도 이력 조회가 가능하며, 해당 지표는 null로 표시됩니다.
    • OAuth 리디렉션 및 파일 저장소 설정을 환경에 맞게 관리할 수 있도록 개선했습니다.
  • 버그 수정
    • 분석 지표를 기반으로 재생 시간과 마디 정보를 보다 정확하게 계산합니다.

ownue added 2 commits August 8, 2026 18:53
-history-detail-response

# Conflicts:
#	src/main/java/com/mr/domain/history/dto/res/HistoryDetailResponseDTO.java
#	src/main/java/com/mr/domain/history/service/HistoryService.java
#	src/test/java/com/mr/domain/history/service/HistoryServiceTest.java
@ownue ownue self-assigned this Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

HistoryService가 AnalysisBarCalculatorBarMetrics를 계산합니다. 상세 응답은 totalBars와 분석 구간별 estimatedSeconds를 반영합니다. 계산 정보가 없으면 관련 필드는 null입니다. OAuth 및 AWS S3 설정도 변경했습니다.

Changes

히스토리 상세 마디 지표

Layer / File(s) Summary
응답 지표 계산 계약
src/main/java/com/mr/domain/history/dto/res/HistoryDetailResponseDTO.java
HistoryDetailResponseDTO.fromAnalysisSummary.fromBarMetrics를 받습니다. totalBarsestimatedSeconds를 계산합니다.
서비스 지표 계산 연결
src/main/java/com/mr/domain/history/service/HistoryService.java
HistoryServiceAnalysisBarCalculator를 주입받습니다. 계산 실패 시 null 지표로 상세 응답을 생성합니다.
지표 계산 검증
src/test/java/com/mr/domain/history/service/HistoryServiceTest.java
마디 정보가 있는 경우의 계산 결과와 재생 시간 정보가 없는 경우의 null 결과를 검증합니다.

애플리케이션 설정 변경

Layer / File(s) Summary
OAuth 및 S3 런타임 설정
src/main/resources/application.yml
OAuth 리디렉션을 단일 환경 변수로 변경했습니다. AWS S3 설정은 버킷과 리전만 유지했습니다.

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

Sequence Diagram(s)

sequenceDiagram
  participant HistoryService
  participant AnalysisBarCalculator
  participant HistoryDetailResponseDTO
  HistoryService->>AnalysisBarCalculator: BarMetrics 계산 요청
  AnalysisBarCalculator-->>HistoryService: BarMetrics 반환
  HistoryService->>HistoryDetailResponseDTO: BarMetrics 전달
  HistoryDetailResponseDTO-->>HistoryService: 마디 지표가 포함된 상세 응답 반환
Loading

Possibly related PRs

  • Musereview/BE#52: HistoryDetailResponseDTOHistoryService의 상세 이력 흐름을 도입했습니다.
  • Musereview/BE#161: AnalysisBarCalculator를 사용한 분석 마디 계산과 응답 반영을 다룹니다.
  • Musereview/BE#103: application.yml의 OAuth 프런트엔드 리디렉션 URI 설정을 변경했습니다.

Poem

마디가 모이고
시간으로 변환되어
응답에 내려앉네
정보가 비어 있으면
null이 조용히 지키네 🎵

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning [ #167 ]의 totalBars·estimatedSeconds 계산, 응답 반영, 관련 테스트는 구현되었으나 API 명세 동기화 변경은 확인되지 않습니다. API 명세 파일을 갱신하거나, 명세가 자동 생성되는 경우 해당 생성 결과와 검증 근거를 추가하세요.
Out of Scope Changes check ⚠️ Warning OAuth 리디렉션과 AWS S3 설정 변경은 [#167]의 히스토리 응답 필드 보완 범위와 관련이 없습니다. OAuth 및 S3 설정 변경을 별도 PR로 분리하거나, 이 PR에 포함해야 하는 근거와 영향 범위를 명시하세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 히스토리 상세 응답에 미구현 필드를 추가하는 핵심 변경을 명확하게 요약합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#167-history-detail-response

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.

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

Caution

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

⚠️ Outside diff range comments (1)
src/main/resources/application.yml (1)

74-75: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

제공 방법과 S3Config의 인증 계약을 맞춰주세요.

application.yml에서는 credentials.access-keycredentials.secret-key를 제공하지 않지만, S3Config.javaS3Properties.accessKey() / secretKey()StaticCredentialsProvider.create(...)에 전달합니다. 설정이 비면 S3 빈 생성이 실패해 애플리케이션 기동이 중단될 수 있습니다.

정적 자격 증명을 유지하면 credentials.access-keycredentials.secret-key를 필수 설정/환경 변수로 다시 선언하세요. AWS IAM 역할 또는 기본 자격 증명 체인을 사용하면 S3ConfigDefaultCredentialsProvider 기반으로 변경하고, 선택한 계약을 설정과 함께 검증하세요. 관련 문서: AWS SDK for Java 2.x Credentials Providers, Spring Boot @ConfigurationProperties binding.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/resources/application.yml` around lines 74 - 75, Align the S3
credential configuration with the contract implemented by S3Config: either
restore required credentials.access-key and credentials.secret-key
environment-backed properties for StaticCredentialsProvider, or update S3Config
to use DefaultCredentialsProvider for IAM/default-chain authentication. Ensure
the selected credential strategy is consistently represented in application.yml
and validated during startup.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/main/resources/application.yml`:
- Around line 74-75: Align the S3 credential configuration with the contract
implemented by S3Config: either restore required credentials.access-key and
credentials.secret-key environment-backed properties for
StaticCredentialsProvider, or update S3Config to use DefaultCredentialsProvider
for IAM/default-chain authentication. Ensure the selected credential strategy is
consistently represented in application.yml and validated during startup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8a2017da-9806-4592-940a-6f9a7e795a1c

📥 Commits

Reviewing files that changed from the base of the PR and between 4de001e and 64c2950.

📒 Files selected for processing (4)
  • src/main/java/com/mr/domain/history/dto/res/HistoryDetailResponseDTO.java
  • src/main/java/com/mr/domain/history/service/HistoryService.java
  • src/main/resources/application.yml
  • src/test/java/com/mr/domain/history/service/HistoryServiceTest.java

@on1yoneprivate on1yoneprivate changed the title [FIX] 히스토리 샹세 응답의 미구현 필드 추가 [FIX] 히스토리 상세 응답의 미구현 필드 추가 Aug 9, 2026

@on1yoneprivate on1yoneprivate left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

수고하셨습니다~

@rkdehdrbs7885-oss
rkdehdrbs7885-oss merged commit a0cde06 into develop Aug 9, 2026
2 checks passed
@kimyw1018
kimyw1018 deleted the fix/#167-history-detail-response branch August 9, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 BugFix - 히스토리 상세 응답 미구현 필드 보완

3 participants