운영자 배포 증거 기반 운영 환류 기록: Feedback Handoff(관찰 사실 + Discovery/REQ/Change Request Input 분리), REL-004 confirmed→feedback-captured, 포함 BAT-014~023 release-candidate→released(register + 개별 index). 후속 입력: issue #16(preallocation 누락, Discovery), dcy-019(REQ 대기), BAT-024(차기 release 편입), daily_symbol_entries 제거(REQ-002 change-req). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.9 KiB
2.9 KiB
BAT-016: 매도 가격 정책 정정 + 슬롯 entry_price→limit_price rename (sell dispatch 버그)
- Status: released
- Profile: standard
- Source Discovery: dcy-012
- Included REQ: REQ-013 (CHG-20260608-01), REQ-007 (CHG-20260608-02), REQ-036 (CHG-20260608-01), REQ-002 (CHG-20260608-01), REQ-006 (CHG-20260608-01), REQ-003 (CHG-20260608-01), REQ-015 (CHG-20260608-01)
Summary
- dcy-012(매도 주문이 현재가가 아닌 entry_price 지정가로 나가는 버그, issue #10)를 단일 standard batch 로 delivery 한다. 거버넌스는 dcy-012 OQ-3 결정대로 전부 change-req, 신규 REQ 없음.
- 핵심: 슬롯의 매수 전용
entry_price를 side 무관 "현재 pending 주문 지정가" 단일 필드limit_price로 내부 rename(Option A) 하고, pending 이탈(→HOLDING/→CLOSED) 시 clear 한다._dispatch는slot.limit_price한 필드만 읽어 가격/주문유형을 결정(값=지정가00, 없음=시장가01).SellIntent/sell payload 에 optionallimit_price추가, 자율 매도(safety-sell/kill-switch)는 가격 미전달 → 시장가.
Scope
- In Scope:
- 슬롯
entry_price→limit_price내부 rename(도메인 모델/EXPECTED_SLOT_FIELDS, REQ-002) + pending 이탈 clear 생애주기 - DB 컬럼 rename 마이그레이션
006_*.sql(idempotent) + persistence 매핑 (REQ-006) _dispatch가slot.limit_price단일 필드로 가격/주문유형 결정 (REQ-013)SellIntent/sell payload optionallimit_price+_admit_sell운반,SlotService.selloptional 가격 (REQ-007/REQ-036)- 컬럼 계약/드리프트 가드 갱신 (REQ-003)
- baseline 문서(runtime-flows/interface-contract/data-model) 정합 (REQ-015)
- 슬롯
- Out of Scope:
- 외부 buy/sell payload·slot read 의 필드명(
entry_price) rename — REQ-007/dcy-011 과 조율할 별도 계약 변경(NFR-3 호환 유지) - issue #9(KIS 외부 취소 시 pending_sell 갇힘) 자체의 복구 로직 — 본 버그는 #9 의 한 원인 제거, 복구는 후속 분리
- dispatch 시 현재가 자동 조회(
get_current_price) 기반 지정가 — OQ-1 미채택 - buy 주문 가격 의미 변경(매수 지정가는 동일 limit_price 로 set, 동작 동일)
- 외부 buy/sell payload·slot read 의 필드명(
Documents
- Planning: planning.md
- Design: design.md
- Implementation: implementation.md
- Verification: verification.md
Notes
- Source discovery 단일(dcy-012). OQ-1(하이브리드)·OQ-2(가격 유무 분기)·OQ-3(전부 change-req) Answered.
- 버그 재현 조건:
entry_price가 채워진 지정가 매수 슬롯의 매도. 시장가 매수 슬롯은 entry_price=NULL 로 우연히 정상 → 검증은 지정가 매수 슬롯 케이스 필수(S-1). OrderRequest.limit_price(broker_port) 는 기존 존재 — 슬롯 필드 rename 으로 이름까지 정합.- 마이그레이션은 글롭 재적용 모델이므로 006 은 idempotent DO-block(컬럼 존재 시에만 rename).