Files
trex-core/docs/batches/bat-027_20260610_asset-permanent-slot-foundation/index.md
T
genichinandClaude Opus 4.8 5330f32247 docs(batch): BAT-030 verification 승인 + REQ-056~065 Implemented (dcy-020 delivery 완료)
draft/confirm-batch-verification: BAT-030 AC 매핑(REQ-056·057·062·064·065) +
evidence(단위 367/PG 29/MQ 21, cutover 리허설 8건, run-the-app e2e) 기록,
Ready for Release: true → release-candidate 승격.
BAT-027/028/029 의 보류 사유(dcy-020 전체 delivery 미완)가 BAT-030 완성으로
해소되어 함께 release-candidate 승격.
confirm-req-implemented: REQ-056~065 전부 Approved → Implemented
(각 REQ Change Log CHG-20260610-IMPL + srs index 갱신).
실 운영 cutover(REQ-064)는 REL 단계 운영자 실행으로 위임.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 15:20:52 +09:00

2.6 KiB
Raw Blame History

BAT-027: 자산 영구 슬롯 토대 — 스키마 + 상태머신 재정의 (dcy-020 BAT-α)

  • Status: release-candidate
  • Profile: standard
  • Source Discovery: dcy-020
  • Included REQ: REQ-056 (영구 슬롯 스키마+마이그레이션), REQ-057 (상태머신 재정의 + 인스턴스 스코프 advisory lock)

Summary

  • dcy-020(자산 중심 영구 슬롯 모델)의 첫 구현 배치(BAT-α). 익명 풀 슬롯 도메인을 자산 1:1 영구 슬롯의 데이터 모델 + 상태머신 토대로 재작성한다. 외부 전략 계약 변경(BAT-γ)·라이브 cutover(BAT-δ)는 포함하지 않는다.
  • 핵심: Slot 모델/EXPECTED_SLOT_FIELDS 재정의(portfolio_id 영구키·instance_key·retired_at, entry_count/슬롯 trading_date 제거), 멱등 마이그레이션 009(UNIQUE(instance_key, portfolio_id)), 상태머신 inactive↔pending_buy↔holding↔pending_sell(+error) 으로 재정의(closed→idle 복구 제거), advisory lock 인스턴스 스코프화.

Scope

  • In Scope:
    • Slot 모델·EXPECTED_SLOT_FIELDS 영구 슬롯 재정의 (REQ-056)
    • 마이그레이션 009 (instance_key·retired_at·UNIQUE 복합, entry_count/trading_date 제거) + persistence flat 매핑 (REQ-056)
    • 상태머신 재정의(inactive 합침·closed→idle 제거) + holding 로컬 정본 + 인스턴스 스코프 advisory lock (REQ-057)
    • data-model.md 슬롯 스키마/상태 부분 갱신 (REQ-065 부분)
    • 상태/계약 단위테스트 재작성
  • Out of Scope:
    • universe reconcile lifecycle (REQ-058 → BAT-β)
    • admission/capacity·intent 계약 (REQ-059/061 → BAT-β/γ)
    • 수량/불일치 해소 (REQ-062 → BAT-γ)
    • 라이브 cutover (REQ-064 → BAT-δ)
    • 운영자 slots 단일 뷰 (REQ-063 → 후속)

Documents

Notes

  • Source discovery 단일(dcy-020). 본 배치는 dcy-020 의 토대 배치로, 후속 BAT-β(reconcile·admission)/BAT-γ(intent·수량)/BAT-δ(cutover)의 선행.
  • 핵심 리스크(R-cascade): Slot 모델·상태머신 변경은 intents.py·safety_sell·snapshot_handlers·execution 등 다수 소비처로 연쇄된다. design.md 에서 cascade 격리 전략(소비처 동시 수정 범위)을 확정한 뒤 구현한다 — design 체크포인트 필수.
  • 라이브 데이터는 본 배치에서 건드리지 않는다(스키마는 신규 마이그레이션으로 정의만; 기존 행 전환은 REQ-064/BAT-δ).