Files
trex-core/docs/srs/Migration/req-064_pool-to-permanent-slot-cutover.md
T
genichinandClaude Opus 4.8 f7d309be71 docs(req): dcy-020 confirm-req(REQ-056~065 Approved) + 기존 REQ supersession change-req
- confirm-req: REQ-056~065 Proposed→Approved (CHG-20260610-02 각). srs/index Register Approved.
- change-req(forward-looking): REQ-002/003/005/006/007 에 dcy-020 재정의/폐기 예정 기록
  (CHG-20260610-01). 현재 코드 불변이라 status Implemented 유지(keep-current);
  실제 폐기/재정의·status 전환은 dcy-020 delivery 배치에서 확정.
  - REQ-002 상태머신/도메인 → REQ-056/057/062
  - REQ-003 테스트 계약 → REQ-056/057
  - REQ-005 일일 preallocation 폐기 → REQ-058(reconcile)/REQ-060(M)
  - REQ-006 persistence 스키마 → REQ-056/062/064
  - REQ-007 admission/intent → REQ-059/061

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

4.1 KiB

req-064: 풀 모델 → 영구 자산 슬롯 cutover 마이그레이션

  • Status: Approved
  • Type: Migration
  • Priority: High
  • Owner: project maintainers

Intent

  • 출시·운영 중인 익명 풀 모델(일일 daily_slot 행) 데이터를 자산 영구 슬롯 모델로 안전하게 이행한다. 라이브 트레이딩 데이터(보유 포지션)를 잃지 않고 cutover 한다. (dcy-020 NFR-2/R-1)

Requirement

  • 기존 일일 daily_slot 행을 자산당 영구 1행으로 전환하고, 현재 보유(holding) 포지션을 새 영구 슬롯으로 carry-over 한다. 기존 slot-scoped 행(slot_transition_log/intent_log/ledger_outbox 등)에 instance_key 를 태깅한다. cutover 는 거래 세션 외 시간에 수행하고, 롤백 계획(역마이그레이션 또는 스냅샷 복원)을 갖춘다. 단계적 전환(읽기 정합 → 모델 전환)을 우선 검토하고, cutover 전후 보유 포지션·safety-sell 보호가 끊기지 않음을 검증한다.

Acceptance Criteria

  1. Given 기존 풀 모델 데이터(보유 N개 포함), When cutover 적용, Then 각 보유 자산이 영구 슬롯 1행(holding)으로 보존되고 수량/임계값 등 보호 컨텍스트가 유실되지 않는다.
  2. Given cutover 후, When 데몬 기동, Then universe reconcile(REQ-058)·admission(REQ-059)·safety-sell 이 회귀 없이 동작한다.
  3. Given cutover 실패, When 롤백, Then 직전 released 리비전/스키마로 복원 가능하다(롤백 계획 검증).
  4. Given slot-scoped 기존 행, When cutover, Then instance_key 태깅이 적용되어 인스턴스 스코프 쿼리가 정확하다.

Impacted Area

  • Docs: docs/runtime-flows.md(cutover 절차), 릴리즈 Rollback Plan
  • Modules: trex_core/adapters/persistence/sql/(cutover 마이그레이션), 이행 스크립트
  • Tests: tests/adapters/persistence/(cutover round-trip), 회귀 스위트

Notes

  • 라이브 데이터 영향 — 배포 게이트·운영자 입회 권장. 실행은 별도 배치(BAT-δ)로 분리하고 confirm-release 전 run-the-app/cutover 리허설 evidence 필요.
  • 출처: dcy-020 NFR-2, R-1.

Change Log

CHG-20260610-01

  • Date: 2026-06-10
  • Author: Justin Ko

Change Summary

  • dcy-020 NFR-2/R-1 로부터 최초 생성(Proposed). 일일행→영구행 cutover + 보유 carry-over + instance_key 태깅 + 롤백 계획.

Intent

  • 라이브 풀 모델 데이터를 무손실로 영구 슬롯 모델로 이행하는 cutover 를 backlog 정규화.

Acceptance Criteria Delta

  • Added: 보유 carry-over/기동 회귀/롤백/instance_key 태깅 4개 기준
  • Updated: 없음
  • Removed: 없음

Impacted Area Delta

  • Docs: docs/runtime-flows.md, 릴리즈 Rollback Plan
  • Modules: persistence cutover 마이그레이션, 이행 스크립트
  • Tests: cutover round-trip, 회귀 스위트

Delivery Trace Delta

  • Batches: none
  • Releases: none

Revalidation Impact

  • Reverification Needed: yes (cutover 리허설/회귀 필수)
  • Existing Implementation Invalidated: no (이행 절차 신규)
  • Status Recommendation: keep-current
  • Follow-up Action: confirm-req. 별도 배치(BAT-δ)·운영자 입회·confirm-release 전 리허설 evidence.

Validation Plan

  • cutover 리허설(보유 보존·기동 회귀·롤백) + run-the-app evidence.

CHG-20260610-02

  • Date: 2026-06-10
  • Author: Justin Ko

Change Summary

  • Status Proposed → Approved (confirm-req). 필수 필드·구체 AC 충족, source dcy-020(confirmed, handoff 승인)과 모순 없음.

Intent

  • delivery input 으로 승격(라이브 cutover 는 별도 배치·운영자 입회).

Acceptance Criteria Delta

  • Added: 없음 / Updated: 없음 / Removed: 없음

Impacted Area Delta

  • Docs: docs/srs/index.md (Register Approved) / Modules: 없음 / Tests: 없음

Delivery Trace Delta

  • Batches: none / Releases: none

Revalidation Impact

  • Reverification Needed: no (승인 단계) / Existing Implementation Invalidated: no / Status Recommendation: keep-current / Follow-up Action: 별도 cutover 배치(BAT-δ), confirm-release 전 리허설 evidence.

Validation Plan

  • 승인 후 cutover 배치 planning 에서 본 REQ AC 를 검증 기준으로 사용.