refactor(audit-log): AuditLogRepository를 신규 audit-log 모듈로 분리 (P0-1 단계 2)#107
Conversation
P0-1 단계 2. AuthRepository와 SellerRepository에 중복 구현되어 있던 createAuditLog 를 단일 책임의 audit-log 모듈로 통합. - 신규 모듈: src/features/audit-log/ - IAuditLogRepository + AUDIT_LOG_REPOSITORY Symbol 토큰 - AuditLogRepository 구체 구현 - 통합 테스트 (실DB) + 기본 분기 커버 - 제거: AuthRepository.createAuditLog (5개 args 포함 38줄), SellerRepository.createAuditLog (28줄) - 소비자 전환: - AuthService 1개 호출부 - Seller 6개 서비스 36개 호출부 (SellerBaseService 에 protected auditLogs 추가, 7개 subclass 생성자 전달) - 모듈 배선: AuthModule + SellerModule 에 AuditLogModule import - 영향 spec 모두 AUDIT_LOG_REPOSITORY provider 등록으로 동반 갱신
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Coverage report
Test suite run success1168 tests passing in 132 suites. Report generated by 🧪jest coverage report action from b2e22fd |
Summary
createAuditLog를 단일 책임의 audit-log 모듈로 통합.Scope
Non-goals
Plan deviation 안내
원 플랜은 audit-log 를 `auth/repositories/` 에 두는 안이었습니다. 실제 코드를 보니 Seller 서비스에서 36곳 사용 중이라 auth 내부로 두면 `seller → auth` 도메인 의존이 생겨 cross-cutting 한 audit 의 성격과 맞지 않아 별도 audit-log 모듈로 분리했습니다. 두 도메인이 동일한 import 라인을 통해 공유합니다.
Impact
Test plan