# BAT-018 Verification - Status: verified - Batch: BAT-018 ## Acceptance Mapping ### REQ-005 (스케줄러 + 부트스트랩, change-req) | AC | Evidence | |----|----------| | trading_date = 설정 TZ 기준(UTC 아님) | tests/application/test_preallocation_scheduler.py::test_trading_date_uses_kst_not_utc_at_midnight_boundary | | 일자 경계 자동 생성(무재시작) + 멱등 | ::test_cross_day_boundary_auto_creates_next_day_idempotently | | 트리거 시각 게이팅 | ::test_trigger_time_gates_next_day_creation | | idle 슬롯 생성 | ::test_idle_slots_created_for_trading_date | | 부트스트랩/스레드 배선 회귀 | 전체 회귀(daemon import/setup) | ### REQ-048 (TOML 설정, change-req) | AC | Evidence | |----|----------| | TOML 기본값(KST/00:00) | tests/runtime/test_instance_config.py::test_trading_timezone_defaults_to_kst | | TOML 값 from_config 전파 | ::test_trading_timezone_from_toml_propagates | | 기존 TOML 키 회귀 | 기존 test_instance_config 전체 | ### REQ-009 (baseline 문서, change-req) | AC | Evidence | |----|----------| | runtime-flows/data-model 정합 | 문서 diff(BAT-018) + instance.example.toml | ## Evidence - Test: - 단위 전체 회귀: `302 passed / 32 skipped`(신규 스케줄러 6 + config 2 포함; `::test_sandbox_token_and_submit` deselect). - 인프라 게이트(PG trex_core_test + RabbitMQ): `334 passed`. - `ruff check trex_core tests` → All checks passed. - Logs: `302 passed, 32 skipped, 1 deselected` / `334 passed, 1 deselected ~16.1s`. ## 성공 기준(dcy-014) 대응 - S-1(설정 TZ "오늘" = DB trading_date, UTC 자정 경계 포함): test_trading_date_uses_kst_not_utc_at_midnight_boundary(15:30Z → KST 6/9). - S-2(timestamp UTC 유지): test_timestamps_stay_utc(updated_at utcoffset 0). - S-3(무재시작 일자 경계 자동 생성 + 중복 0): test_cross_day_boundary_auto_creates_next_day_idempotently. - S-4(TOML 타임존 설정 반영): test_configurable_timezone_changes_trading_date(UTC TZ → 6/8) + test_trading_timezone_from_toml_propagates. ## Carried-Over / 비차단 - 기본 타임존 `Asia/Seoul` 확정·TOML 키 명명(DATA): 구현에서 `trading_timezone`/`daily_preallocation_time` 로 확정. 운영 배포 안내는 instance.example.toml 에 문서화. - 실 다중 인스턴스 동시 일일 preallocation 무중복(NFR-2): 멱등 preallocate 로 보장, 실 환경 동시 기동 e2e 는 운영 검증 비차단. - 거래일 캘린더(주말/공휴일): OQ-2 결정으로 매 캘린더일 생성, 후속 분리. ## Result - Ready for Release: true - Blocking Issues: - 없음. 부트스트랩 TZ 전환·일일 preallocation·TOML 설정 모두 단위 green(334 passed 회귀). LIVE sandbox 토큰 deselect 는 `.env` 환경 의존(본 batch 무관).