Repository navigation
fix: 기상·스크린타임 최대 사용형이 잘 인증되지 않던 서버 원인 4가지 - #325
Merged
Merged
Conversation
- 기상 걸음 신뢰 출처가 삼성헬스·구글 피트니스 둘뿐이라, 그 앱이 없는 폰(Health Connect 플랫폼·기기 자체 걸음)은 매일 UNTRUSTED_ORIGIN 으로 빠져 늦잠이 됐다. 기상은 10걸음 문턱이라 출처를 넓힌다(손입력은 계속 뺀다). - 앱은 sync 마다 그날 걸음 기록을 다시 보내고 기록 앱은 같은 기록의 걸음 수를 키워 가며 고치는데, 기상·걸음 판정이 같은 기록 id 의 처음 값만 남겨 첫 sync 의 작은 값에 묶였다. 마지막에 받은 값을 쓴다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 같은 앱 안에서 화면을 옮기면 PAUSED(A)→RESUMED(B)→STOPPED(A) 순인데, 화면 구분이 없어 STOPPED(A) 가 B 세션을 닫아 사용 시간이 빠졌다(최소 사용형 오실패). 세션이 열린 직후(5초 안) STOPPED 는 앞 화면 것으로 본다. - 앱은 화면 꺼짐을 보내지 않아, 닫힘 없이 끊긴 세션이 창 끝(자정)까지 늘어 최대 사용형이 USAGE_EXCEEDED 로 잘못 실패했다. 창이 닫히면 열린 세션을 그 기기에서 마지막으로 받은 시각에서 닫는다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test Coverage
|
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.
요약
기상 루틴과 「앱을 제한 시간보다 적게 쓰기」(스크린타임 최대 사용형) 루틴이 잘 인증되지 않는다는 보고를 Android 전송 형식(develop 최신)과 서버 판정을 맞대어 조사했다. 형식(epoch millis·
appEvents·평평한 출처) 문제는 아니었고, 판정 로직·출처 정책에서 4가지를 고친다.커밋
UNTRUSTED_ORIGIN으로 늦잠com.google.android.apps.healthdata)·기기 자체(android) 추가. 손입력은 계속 제외recordId의 처음 값만 남김PAUSED(A)→RESUMED(B)→STOPPED(A)에서 STOPPED(A) 가 B 세션을 닫아 사용 시간이 빠짐USAGE_EXCEEDED로 잘못 실패서버 밖에 남는 것
className·화면 꺼짐 전송, V13 이전 기상 방 멤버의 걸음 권한·건강정보 동의 재요청.android출처명은 실기기로 확인 필요 — 판정 근거rejectedOrigins로 볼 수 있다.테스트
EvaluatorAccuracyTest에 앱 형식 회귀 3건(같은 기록 갱신 3→24걸음 SUCCESS, 화면 전환 21분 유지, 끊긴 세션 10분에서 닫힘) + 늦게 온 STOPPED 는 그대로 닫힘./gradlew test전체 통과🤖 Generated with Claude Code