fix: 1일 1매매 패스 가드 — 당일 재실행의 회전상한 우회 차단#444
Merged
Merged
Conversation
operation_events 점검에서 일일 태스크가 사이클을 2회 연속 실행한 날을 실측(7/3·7/7, CYCLE_START/END 두 쌍). 멱등 upsert라 스냅샷은 무해하지만 드리프트가 큰 날엔 실행마다 회전 상한(1회 15%)이 따로 적용돼 하루 30%가 돌 수 있다 — 6/10 진입 뭉침(하루 4회 실행 → 61% 집중 매입)과 같은 계열로, 지금까지 문서 경고로만 막던 것을 코드로 강제한다. - run_rebalance: 바스켓별 당일 체결 이력이 있으면 매매 패스(plan/execute) 생략, 스냅샷·리포트·관측성은 그대로 + REBALANCE_SKIPPED_DAILY_LIMIT 기록 - 판정 실패 시 기존 동작 유지(방어선이지 게이트가 아님), dry-run 미적용 - 우회는 --force-rebalance (운영자 명시 결정) - 부수 효과: 결측 복구 재시도(11/14시)가 매매 없이 스냅샷만 복구하게 돼 더 안전해짐 함께: 일일 태스크 프롬프트에 명령 1회 실행 명시(근원 방어), 문서 §3에 코드 강제 반영. 테스트 5케이스 추가(가드 발동/우회/무체결/dry-run/판정실패 폴백), 실CLI 스모크 정상. 전체 스위트 1643 통과.
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.
무엇
점검 중 발견한 운영 구멍 수정 — 같은 날 사이클 재실행이 회전 상한을 사실상 2배로 만드는 문제를 코드로 차단합니다.
발견 (실측)
operation_events확인 결과 일일 태스크가 사이클을 2회 연속 실행한 날이 있습니다(7/3, 7/7 — CYCLE_START/END 두 쌍, 1분 간격). 멱등 upsert라 스냅샷은 무해하지만, 드리프트가 큰 날엔 실행마다 회전 상한(1회 15%)이 따로 적용돼 하루 30%가 돌 수 있습니다. 6/10 진입 뭉침 사고(하루 4회 실행 → 61% 집중 매입, 타이밍 비용 -1%p)와 같은 계열이며, 지금까지는 문서 경고로만 막고 있었습니다.수정 — 1일 1매매 패스 가드
run_rebalance: 바스켓별로 당일 체결 이력이 있으면 매매 패스(plan/execute)를 건너뜀. 스냅샷·리포트·관측성은 그대로 진행하고REBALANCE_SKIPPED_DAILY_LIMIT이벤트를 남깁니다.--force-rebalance(운영자 명시 결정).함께
테스트
--force-rebalance우회 / 무체결 정상 경로 / dry-run 미적용 / 판정 실패 폴백 — 5케이스 추가.