Skip to content

refactor(report): 월간 리포트 v1/v2 완전 분리 및 교차 생성 차단 로직 추가#172

Merged
1Seob merged 6 commits into
developfrom
refactor/monthly-report-v1-v2-separation
May 29, 2026
Merged

refactor(report): 월간 리포트 v1/v2 완전 분리 및 교차 생성 차단 로직 추가#172
1Seob merged 6 commits into
developfrom
refactor/monthly-report-v1-v2-separation

Conversation

@1Seob
Copy link
Copy Markdown
Collaborator

@1Seob 1Seob commented May 29, 2026

📝 요약(Summary)

배경

기존 월간 리포트 로직이 v2로 치환되면서 v1 복구 및 v1/v2 독립 운영이 어려운 상태였습니다.
이번 작업에서 v1/v2 도메인을 분리하고, 두 버전 간 중복 생성 방지 규칙을 명확히 적용했습니다.

주요 변경사항

1) 월간 리포트 v1/v2 분리 정리

  • v2 컨트롤러가 v2 서비스를 직접 사용하도록 의존성 분리
  • v2 전용 Service/TxService/Listener/DTO/PendingService/LlmClient 계층 정리
  • v1 로직은 v1 흐름으로 복구 가능하도록 책임 재배치

2) v1/v2 교차 생성 차단 추가

  • MonthlyReportCrossVersionGuardService 신규 추가
  • PendingMonthlyReportService, PendingMonthlyReportServiceV2에서 생성 전 교차 검증 수행
  • 검증 기준:
    • 동일 monthStartDate에 상대 버전 리포트가 COMPLETED면 생성 차단 (MONTHLY_REPORT_ALREADY_COMPLETED)
    • 동일 monthStartDate에 상대 버전 리포트가 FAILED 제외 상태면 생성 차단 (MONTHLY_REPORT_IN_PROGRESS)

3) 배포 워크플로우 프롬프트 시크릿 분리

  • .github/workflows/deploy-to-dev-ec2.yml
  • .github/workflows/deploy-to-prod-ec2.yml
  • MONTHLY_PROMPT 제거 후 아래로 분리
    • MONTHLY_V1_PROMPT
    • MONTHLY_V2_BASELINE_PROMPT

🔗 Related Issue

  • Closes:

💬 공유사항

✅ PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • PR 제목을 커밋 메시지 컨벤션에 맞게 작성했습니다.

1Seob added 6 commits May 29, 2026 18:39
v2 전용 Service/TxService/Listener/EventDto/PendingService/LlmClient 클래스 분리, 기존 v1 컴포넌트는 v1 흐름으로 복구할 수
있게 책임 재정렬
dev/prod 배포 워크플로우에서 MONTHLY_PROMPT 제거하고 MONTHLY_V1_PROMPT, MONTHLY_V2_BASELINE_PROMPT 시크릿 디코딩/환경변수
export 추가
…ortServiceV2 수정

MonthlyReportCrossVersionGuardService - status가 COMPLETED와 FAILED가 아닌 모든 경우에 생성 중 예외 처리를 던지도록 수정,
PendingMonthlyReportServiceV2 - status = "TEXT_COMPLETED"인 경우에도 생성 중 예외 처리를 던지도록 수정
@coldsunn
Copy link
Copy Markdown
Collaborator

LGTM!

@1Seob 1Seob merged commit e408c01 into develop May 29, 2026
1 check passed
@1Seob 1Seob deleted the refactor/monthly-report-v1-v2-separation branch May 29, 2026 11:47
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