feat(reset): cutover 도구 폐기 → trex-core-reset(DB 재초기화) 대체 (REQ-064 CHG-20260610-03)
실 DB 점검 중 마이그레이션 009 부분 유니크 인덱스가 legacy 풀 데이터(같은 자산이 closed+재진입 holding 으로 portfolio_id 중복)에 적용 불가 → cutover· 데몬 부팅 모두 차단되는 결함 확인. 데이터 보존 cutover 를 폐기하고 DB wipe + 자산 중심 재초기화로 전환(사용자 결정). 빈 테이블에는 009 인덱스가 정상 생성되고 자산 중심에서 (instance_key, portfolio_id)는 설계상 유일. - trex_core/runtime/reset.py 신규(trex-core-reset): slot-core 7테이블 wipe + apply_migrations 재적용 → 자산 중심 스키마 착지 검증. dry-run 기본/--yes 적용, 파괴적·DB 전역. 보유 carry-over 없음(재초기화 후 reconcile_core_holdings 재편입). - runtime/cutover.py + trex-core-cutover console script + test_cutover_rehearsal.py 삭제. - pyproject: trex-core-reset 등록. - tests/runtime/test_reset.py 신규 5건(PG-gated): wipe+착지·dry-run 무변경·멱등· wipe 후 admission·테이블 커버리지. - change-req REQ-064 CHG-20260610-03(cutover→재초기화 재정의) + srs index 갱신. - baseline 4문서(data-model/runtime-flows/project-structure/interface-contract) + BAT-030 design/planning/index/implementation/verification 도구 서술 reset 으로 교체. 검증: ruff clean, 단위 367 passed, PG+RabbitMQ 통합 411 passed/1 skip(KIS sandbox). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
|
||||
> **체크포인트 결정(2026-06-10)**: D1=**전체 rebuild**(보유는 브로커 잔고 기준 carry-over) / D2=**전부 완성**(literal inactive + 별칭 제거 + entry_count·trading_date drop) / D3=**집행 매도 qty 브로커 정본**(미러 fallback 없음, 0이면 skip+divergence) / D4=**실 cutover 는 운영자(REL 단계, 리허설 후)**. 아래 §1 을 전체 rebuild 로 읽는다.
|
||||
|
||||
|
||||
> **2026-06-10 갱신(CHG-20260610-03)**: D1(데이터 보존 cutover) 폐기 — 실 DB 점검에서 마이그레이션 009 부분 유니크 인덱스가 legacy 풀 중복 데이터에 적용 불가한 결함 확인. **DB wipe + 자산 중심 재초기화**(`trex-core-reset`)로 대체. §1 의 cutover(전체 rebuild·보유 carry-over·promote-unique)는 미적용; 보유는 재초기화 후 universe reconcile + reconcile_core_holdings(REQ-062)로 운영자 재편입. D2/D3 는 유효.
|
||||
|
||||
## 설계 목표
|
||||
- 자산 중심 모델을 완성하고 라이브로 안전 전환. 보유 포지션 무손실·집행 정확·비가역 변경 통제.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user