refactor: pilot 순수 유틸 함수 pilot_util로 분리 - #391
Merged
Merged
Conversation
target_weight_rotation_pilot.py 모놀리스에서 외부 의존이 없는 stdlib 전용 헬퍼 4개를 tools/pilot_util.py로 추출했다. - stable_manifest_hash: dict 정렬·고정 직렬화 후 SHA-256 - numbers_match: 부동소수 오차 허용 비교(절대 허용오차 옵션) - coerce_float_or_none: float 변환, NaN/Inf는 None - coerce_int_or_zero: int 변환 실패 시 0 기존 호출부 호환을 위해 모놀리스에서 _접두어 별칭으로 re-import 하므로 동작은 100% 동일하다. 분리 전 전용 테스트가 없던 함수들이라 tests/test_pilot_util.py로 커버리지도 추가했다(15케이스). calendar 헬퍼 분리(#387)에 이은 2차 정리. 모놀리스 13458 -> 13425줄.
easygap
added a commit
that referenced
this pull request
Jul 6, 2026
refactor: pilot 순수 유틸 함수 pilot_util로 분리
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.
요약
target_weight_rotation_pilot.py모놀리스에서 외부 의존이 전혀 없는(stdlib 전용) 순수 유틸 함수 4개를tools/pilot_util.py로 분리했습니다. 캘린더 헬퍼 분리(#387)에 이은 2차 정리입니다.옮긴 함수
stable_manifest_hash— dict를 정렬·고정 직렬화 후 SHA-256 (키 순서·공백 무관)numbers_match— 부동소수 오차 허용 비교, 절대 허용오차 옵션coerce_float_or_none— float 변환, NaN/Inf면 Nonecoerce_int_or_zero— int 변환 실패 시 0호환성
기존 호출부가 쓰던
_접두어이름을 모놀리스에서pilot_util로부터 re-import 하므로 동작은 100% 동일합니다. import 정리는 없습니다(hashlib/json/math는 모놀리스 다른 곳에서 계속 사용).테스트
tests/test_pilot_util.py로 15케이스 추가