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>
This commit is contained in:
@@ -31,7 +31,6 @@ class Slot:
|
||||
# on pending exit (→HOLDING, →INACTIVE) so a buy limit never leaks into a
|
||||
# sell order (issue #10). None => market order at dispatch.
|
||||
limit_price: Optional[float] = None
|
||||
allocated_capital: Optional[float] = None
|
||||
order_id: Optional[str] = None
|
||||
strategy_id: Optional[str] = None
|
||||
broker_order_id: Optional[str] = None # BAT-003 / REQ-011 (trex-orbit lineage)
|
||||
@@ -47,6 +46,11 @@ class Slot:
|
||||
# instance-scoped. retired_at marks a soft-retired / universe-detached slot.
|
||||
instance_key: str = "default"
|
||||
retired_at: Optional[datetime] = None
|
||||
# dcy-022 / REQ-068: execution policy — set on PENDING entry, cleared on exit.
|
||||
# timeout_sec: cancel_order is sent after this many seconds of no fill.
|
||||
# slippage_pct: effective limit = entry_price * (1 ± pct/100); None = no band.
|
||||
timeout_sec: Optional[int] = None
|
||||
slippage_pct: Optional[float] = None
|
||||
|
||||
|
||||
# Canonical column contract for `Slot` (dcy-001 OQ-2 / FR-5).
|
||||
@@ -60,7 +64,6 @@ EXPECTED_SLOT_FIELDS: frozenset[str] = frozenset({
|
||||
"qty",
|
||||
"avg_price",
|
||||
"limit_price",
|
||||
"allocated_capital",
|
||||
"order_id",
|
||||
"strategy_id",
|
||||
"broker_order_id",
|
||||
@@ -73,6 +76,8 @@ EXPECTED_SLOT_FIELDS: frozenset[str] = frozenset({
|
||||
"updated_at",
|
||||
"instance_key", # dcy-020 / REQ-056 (BAT-027)
|
||||
"retired_at", # dcy-020 / REQ-056 (BAT-027)
|
||||
"timeout_sec", # dcy-022 / REQ-068 (BAT-032)
|
||||
"slippage_pct", # dcy-022 / REQ-068 (BAT-032)
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user