Files
trex-core/docs/batches/bat-034_20260610_drop-allocated-capital/verification.md
T
genichinandClaude Sonnet 4.6 fb05a73130 feat(rel-006): dcy-022/023 + BAT-032~034 — 실행 정책·qty 검증·allocated_capital 제거 통합
BAT-032 (dcy-022): timeout_sec/slippage_pct 실행 정책, 미체결 자동 취소,
보호 지정가, `trex-core cancel` 백스톱. 마이그레이션 012.
BAT-033: `trex-core enter --qty` 필수 검증 — 미지정 시 RPC 전 즉시 오류.
BAT-034 (dcy-023): allocated_capital 죽은 필드 전 경로 제거 (domain·intent·
persistence·snapshot·CLI). 마이그레이션 013(비가역 DROP). 외부 발신자
unknown key 무시 수신 의미론 적용.
REL-006 confirmed: BAT-026~034 통합 릴리즈, pre-release smoke 증거 포함.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 07:42:03 +09:00

2.3 KiB

BAT-034 Verification

  • Status: approved
  • Batch: BAT-034

Acceptance Mapping

REQ / AC 검증 테스트/Evidence 결과
REQ-002 AC-5 Slot 모델·EXPECTED_SLOT_FIELDS·SlotService 경로에서 allocated_capital 부재 tests/domain/slot/test_contract.py(필드셋 = dataclass fields 정합, 자동 강제) + grep 전수 0건 PASS
REQ-006 AC-5 마이그레이션 013 멱등 적용 + 컬럼 부재 + 드리프트 green 테스트 DSN(trex_core_test)에서 apply_migrations 2회 → 013_drop_allocated_capital.sql 적용·재적용 무해, information_schema 에 컬럼 없음 확인. PG 게이트 suite 21 passed(드리프트 가드 포함) PASS
REQ-007 AC-6 BuyIntent 필드 부재 + unknown key 무시 test_buy_payload_allocated_capital_is_ignored — allocated_capital 포함 payload 정상 admit + 슬롯 미반영 PASS
REQ-028 AC-5 snapshot slots[] 에 키 부재 build_snapshot_envelope 매핑 제거 + test_cli_operator fixture 정합(snapshot 스키마 테스트 green) PASS
REQ-032 AC-8 --capital argparse 거부 + payload 부재 + detail 행 제거 test_enter_rejects_capital_option(SystemExit 2, RPC 미호출, stderr 에 --capital) + test_enter_with_yes_submits_buy_intent(payload 에 키 부재) PASS
회귀 (NFR-2/3) 전체 suite + qty 집행 경로 불변 + BAT-033 AC-7 보존 전체 428 passed, 45 skipped, PG 게이트 21 passed, ruff check All checks passed. AC-7 테스트(test_enter_without_qty_errors_before_rpc) green PASS
S-1 (dcy-023) 소스/테스트 grep 전수 grep -rn allocated_capital trex_core/ tests/ → 수신-무시 주석·전용 테스트 외 0건 PASS

환경

  • 단위/통합: in-memory + 테스트 PostgreSQL trex_core_test(TREX_POSTGRESQL_TEST_DSN 파생, 운영 DB 미사용)
  • 명령: python -m pytest -q (전체), python -m pytest tests/adapters/persistence/ -q (PG 게이트)

운영 이월 (release 시 필수)

  • 마이그레이션 013 은 비가역 — 운영 적용 전 daily_slot 백업, 롤백 = 백업 복원 + 구 리비전(BAT-030/011 선례). release 문서 Rollout/Rollback 에 명시할 것.
  • 운영자 스크립트/습관의 enter --capital 사용분은 배포 후 argparse 오류로 즉시 표면화(silent 실패 아님).