Repository navigation
[Test] 한 번도 실행되지 않던 백그라운드 전송 경로를 픽스처에 연결한다 - #235
Merged
Merged
Conversation
1,975줄 한 파일이었다. 동작은 그대로 두고 이음매 두 곳만 갈랐다. 1. 맨 위 175줄은 코디네이터가 아니라 어휘였다. 폴링 정책 둘과 대기 게이트, 진단 이벤트, 프로토콜 둘. 셋 중 셋(PrefetchPollingPolicy, VoiceSelectionVersionStoring, Diagnostics)은 ServerVoiceCommonAudioProvider와 RemoteFirstRoutineGuidancePlayer도 쓰는 공용 어휘라 코디네이터 파일에 있을 이유가 없었다. 세 파일로 나눴다. RoutineTTSForegroundWaitGate는 private이라 파일을 나누면 안 보인다. 모듈 내부로 올렸다 — 쓰는 쪽은 여전히 코디네이터 하나뿐이다. 2. 바인딩 검증 8개 함수는 코디네이터의 가변 상태를 하나도 건드리지 않고 동기화 저장소만 읽는다. RoutineTTSBindingValidator로 옮겼다. validateCurrentBinding이 중첩 private 타입(PreparedPlan/LocalPlanKey)을 받던 것은 remote ID 두 개로 풀어서 넘긴다. 값어치는 줄 수가 아니라 시험 가능성이다. 이 규칙을 확인하려면 전에는 원격 서비스·오디오 캐시·다운로더·음성 선택 저장소까지 세워 코디네이터를 만들어야 했다. 지금은 동기화 저장소 하나면 된다. 그래서 "남의 루틴 음성이 재생되면 안 된다"를 여섯 가지 상황으로 직접 고정할 수 있었다 — remote ID가 바뀐 경우, 계정이 바뀐 경우, 바인딩이 없는 경우까지. 코디네이터 1,975 → 1,648줄. 스모크 1,055개 통과. Co-Authored-By: Claude <noreply@anthropic.com>
makeWarmupFixture가 backgroundTransferManager를 넘기지 않았다. 파라미터조차 없어서 코디네이터는 모든 테스트에서 이 의존성을 nil로 받았고, 그러면 persistPlayableIntroJobIfSupported와 resumePersistedTransfersNow가 첫 guard에서 그대로 반환한다. 즉 프리페치 지속화와 전송 재개 코드는 **한 줄도 실행되지 않은 채** 초록이었다. 다음에 이 근처를 고치면 깨져도 아무도 모른다. BackgroundTransferSpy를 붙이고 여섯 가지를 고정했다. - 씬 활성화가 남은 전송을 재개한다 - 백그라운드로 내려갈 때는 재개하지 않는다 (내려가는 길에 할 일이 아니다) - 로그아웃하면 큐를 전부 버린다 — 남기면 다음 계정이 이전 계정 음성을 받는다 - 계정 전환은 새 계정 것만 재개한다 - BGAppRefresh 진입점이 전송을 정리한다 - 동기화 완료 스캔은 앱이 앞에 있을 때만 돈다 테스트가 실제로 무는지 변이로 확인했다. setSceneActive에서 resumePersistedTransfers() 제거, 로그아웃에서 discardAllTransfers() 제거, routineSyncDidComplete에서 isSceneActive 가드 제거 — 셋 다 각각 해당 테스트가 잡았다. 확인 뒤 제품 코드는 원복했다. 스모크 1,061개 통과. Co-Authored-By: Claude <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ PR 유형
어떤 변경 사항이 있나요??
스택 PR 3/5 · base:
refactor/tts-warmup-split🛠️ 작업내용
[Test] 한 번도 실행되지 않던 백그라운드 전송 경로를 픽스처에 연결한다
makeWarmupFixture가 backgroundTransferManager를 넘기지 않았다. 파라미터조차
없어서 코디네이터는 모든 테스트에서 이 의존성을 nil로 받았고, 그러면
persistPlayableIntroJobIfSupported와 resumePersistedTransfersNow가 첫 guard에서
그대로 반환한다. 즉 프리페치 지속화와 전송 재개 코드는 한 줄도 실행되지 않은
채 초록이었다. 다음에 이 근처를 고치면 깨져도 아무도 모른다.
BackgroundTransferSpy를 붙이고 여섯 가지를 고정했다.
테스트가 실제로 무는지 변이로 확인했다. setSceneActive에서
resumePersistedTransfers() 제거, 로그아웃에서 discardAllTransfers() 제거,
routineSyncDidComplete에서 isSceneActive 가드 제거 — 셋 다 각각 해당 테스트가
잡았다. 확인 뒤 제품 코드는 원복했다.
스모크 1,061개 통과.
Co-Authored-By: Claude noreply@anthropic.com
규모 — 1 file changed, 159 insertions(+), 2 deletions(-)
📋 추후 진행 상황
4번 PR이 전경 준비의 여섯 갈래를 고정합니다. 그 위에서 두 준비 메서드의 중복을 줄입니다.
📌 리뷰 포인트
이 PR은 제품 코드를 한 줄도 바꾸지 않습니다. 그런데도 의미가 있는 이유는, 픽스처가
backgroundTransferManager를 넘기지 않아 해당 코드가 모든 테스트에서 첫guard에 걸려 한 번도 실행되지 않았기 때문입니다.새 테스트가 실제로 무는지 변이로 확인했습니다 —
setSceneActive에서resumePersistedTransfers()제거, 로그아웃에서discardAllTransfers()제거,routineSyncDidComplete에서isSceneActive가드 제거. 셋 다 각각 해당 테스트가 잡았고, 확인 뒤 제품 코드는 원복했습니다.✅ Checklist
검증: 시뮬레이터 smoke 1,067개 통과(실패 0, 실기기 전용 3건 skip). 정적 게이트 3종 통과.
앞 PR이 머지되면 이 PR의 base는 자동으로
main이 된다. 순서대로 머지한다.🤖 Generated with Claude Code