fix(weather): 외부 날씨 API 실패 시 고정 폴백 반환으로 서비스 중단 방지 - #57
Merged
Conversation
해외 VPN·기상청 장애로 KMA 호출이 실패할 때 서비스가 멈추지 않도록 반환할 고정 폴백 값(흐림/20도 + 중립 수치)을 정의한다. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
필수 소스(current) 실패를 provider 전체 장애의 카나리로 보고 나머지 소스도 폴백으로 채운다. joinRequired 제거로 요청 전체가 503으로 죽지 않는다. current가 살아있는 부분 결측은 기존대로 null 유지하고, degraded=true는 그대로 표기한다. (BR-EXCEPTION-002) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
일자별 날씨 조회도 외부 API 장애면 흐림/20도 폴백을 반환한다. 입력 검증(미래/과거)과 실데이터 부재(404)는 그대로 전파한다. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
외부 날씨 API 장애 시 null 대신 고정 폴백(source=FALLBACK)을 제공해 AI 코칭이 중단되지 않게 한다. degraded 사유는 유지한다. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Kimseungin0529
marked this pull request as ready for review
July 21, 2026 04:44
This was referenced Jul 21, 2026
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.
변경 내용
외부 날씨 API(KMA) 호출이 실패하면 요청 전체를 실패시키는 대신 고정 폴백 데이터(흐림/20℃ + 중립 수치: 습도 50·풍속 0·강수확률 0·자외선 0·최저/최고 20)를 반환하도록 변경합니다.
WeatherFallback상수/팩토리 신설WeatherParallelFetcher: 필수 소스(실황current) 실패 시joinRequired가 던지던 503을 제거하고, 이를 provider 전체 장애의 카나리로 보아 나머지 소스도 폴백으로 채움 →/weather/home,/weather/detail항상 정상 응답FarmWeatherService.getDaily: provider 장애 시 폴백 반환RecordFeedbackContextAssembler: AI 코칭 라이브 날씨도 장애 시 폴백(source=FALLBACK) 사용partial.degraded=true와missing목록은 정직하게 유지변경 이유
해외 VPN 환경(및 기상청 자체 장애) 시 날씨 API 호출이 실패한다. 현재
기록하기플로우는 날씨를 필수로 요구해, 필수 소스(실황) 실패 시WEATHER_PROVIDER_UNAVAILABLE(503)로 요청 전체가 죽고 기록 저장이 차단된다 → 앱 심사 중 QA 불가. 서비스 중단을 막고 항상 정상 흐름을 제공하기 위함이다. (BR-EXCEPTION-002)영향 범위
GET /api/v1/weather/home,/detail,/daily— provider 장애 시 503 대신 200 + 폴백partial.missing에"current"값이 추가될 수 있음(필드 추가 아님)current가 살아있는 부분 결측은 기존대로 null 유지 → 최저/최고를 지어내지 않는 기존 동작 보존검증
./gradlew test전체 통과 (2026-07-21)WeatherParallelFetcherTest(실황 실패→상세/홈 폴백, missing에 current),FarmWeatherServiceTest(getDaily 오늘/과거 provider 장애 폴백),RecordFeedbackContextAssemblerTest(business/runtime 장애→폴백)배포 및 호환성
체크리스트
./gradlew test)🤖 Generated with Claude Code