Conversation
Summary of ChangesHello @PeraSite, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 기존 Activity/XML 기반의 Android 애플리케이션을 Jetpack Compose로 전환하기 위한 중요한 첫 단계입니다. UI 구현 방식이 변경되더라도 도메인, 데이터, 프레젠테이션 로직의 회귀를 빠르게 감지할 수 있는 안전망을 확보하는 데 중점을 두었습니다. 이를 위해 JVM BDD 테스트 프레임워크를 구축하고, 시간 의존적인 로직을 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
안녕하세요! 모든 비즈니스 로직에 BDD 기반 테스트를 구축하는 대규모 작업을 진행해주셔서 감사합니다. Clock을 주입하여 시간 의존적인 로직을 테스트 가능하게 변경하신 점과 Kotest를 사용해 BDD 스타일로 테스트를 작성하신 점 모두 훌륭합니다. 이를 통해 향후 Compose 마이그레이션을 더 안전하게 진행할 수 있는 튼튼한 기반이 마련되었다고 생각합니다.
전반적으로 코드 변경 사항들은 매우 훌륭하며, 특히 방대한 양의 테스트 코드를 추가하신 노고에 감사드립니다. 리뷰 중 몇 가지 새로운 테스트 코드에서 발견된 기존 로직의 개선점을 발견하여 코멘트를 남겼습니다. 새로 추가된 테스트 덕분에 이런 부분들을 발견할 수 있었네요. 확인 부탁드립니다.
Summary
likeMenuIdList가 빈 리스트면 예외가 발생하던 문제를 수정했습니다..github/workflows/debug.yml에서./gradlew :app:testDebugUnitTest :core:common:testDebugUnitTest를 필수 단계로 추가했습니다../gradlew :app:testDebugUnitTest :core:common:testDebugUnitTestDescribe your changes
System.currentTimeMillis()/now()직접 호출로 테스트 재현성 낮음Clock주입으로 시간 제어 가능, flaky 테스트 감소 및 시나리오 검증 안정화BehaviorSpec (given-when-then)기반으로 분기/행동 중심 테스트 구조 통일likeMenuIdList = emptyList()입력 시NoSuchElementException발생menuLike = null로 안전하게 매핑해 정상 처리변경 상세
테스트 인프라
app,core/common에useJUnitPlatform()설정AppBehaviorSpec,MainDispatcherListener, fixtures/helpers)src/main변경AppModule:Clockprovider 추가AlarmUseCase: 시스템 시간 직접 참조 제거,Clock기반으로 알람 시점 계산CalendarUtil:getNextDayDate()가Clock주입 가능하도록 변경WidgetCacheManager,WidgetDataDisplayManager: 시간 계산/캐시 검증 로직에Clock파라미터 반영ReviewRepositoryImpl.writeMenuReview:likeMenuIdList.first()제거,firstOrNull()로 빈 리스트 안전 처리SetUserNicknameUseCase: 원격 변경 성공 시에만AccountDataStore.setName()수행테스트 보강/수정
ReviewRepositoryImplBehaviorSpec: 빈likeMenuIdList케이스를 예외 기대에서 정상 처리 검증으로 변경UserDelegatingUseCasesBehaviorSpec: 닉네임 변경 성공/실패 시 로컬 저장 호출 정책(성공시에만 저장) 검증CI/Workflow 변경
.github/workflows/debug.ymlRun unit tests (required)단계 추가./gradlew :app:testDebugUnitTest :core:common:testDebugUnitTest추가 라이브러리
io.kotest:kotest-runner-junit5io.kotest:kotest-assertions-coreio.kotest:kotest-propertyio.mockk:mockkorg.jetbrains.kotlinx:kotlinx-coroutines-testapp.cash.turbine:turbinekotlinx.datetime사용하지 않은 이유Clock)였습니다.java.time을 광범위하게 사용 중이고, 앱minSdk=28환경에서 추가 의존 없이 충분히 동작합니다.kotlinx.datetime전환은 타입/변환/호출부 마이그레이션 범위가 커서, 이번 단계의 목적(테스트 안전망 구축) 대비 변경 리스크가 커 후속 단계로 분리했습니다.Issue
To reviewers
Clock주입 이후 알림 예약/위젯 시간 판별/캐시 만료 로직이 기존 동작과 동일한지 확인 부탁드립니다.likeMenuIdList를menuLike = null로 처리한 정책이 API 계약과 맞는지 확인 부탁드립니다.debug.yml테스트 필수 게이트가 의도대로 동작하는지(실패 시 이후 단계 차단) 확인 부탁드립니다.Compose Migration Next Steps