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:
@@ -145,6 +145,9 @@ class DaemonInstanceConfig:
|
||||
# admission capacity cap. BAT-030: asset-centric is the only model; absent
|
||||
# means no cap (operators are expected to set it in production).
|
||||
max_active_slots: Optional[int] = None
|
||||
# dcy-022 / REQ-068: default order timeout in seconds (opt-in per instance).
|
||||
# None = OFF = indefinite wait (legacy behavior). Per-intent timeout_sec overrides.
|
||||
default_order_timeout_sec: Optional[int] = None
|
||||
|
||||
@staticmethod
|
||||
def from_toml(path: str) -> "DaemonInstanceConfig":
|
||||
@@ -163,11 +166,18 @@ class DaemonInstanceConfig:
|
||||
raise RuntimeError(
|
||||
f"instance TOML 'max_active_slots' must be > 0, got {raw_max}: {path}"
|
||||
)
|
||||
raw_timeout = data.get("default_order_timeout_sec")
|
||||
default_timeout = int(raw_timeout) if raw_timeout is not None else None
|
||||
if default_timeout is not None and default_timeout <= 0:
|
||||
raise RuntimeError(
|
||||
f"instance TOML 'default_order_timeout_sec' must be > 0, got {raw_timeout}: {path}"
|
||||
)
|
||||
return DaemonInstanceConfig(
|
||||
instance_key=str(instance_key),
|
||||
portfolio_hub_token=str(data.get("portfolio_hub_token") or ""),
|
||||
trading_timezone=str(data.get("trading_timezone") or "Asia/Seoul"),
|
||||
max_active_slots=max_active,
|
||||
default_order_timeout_sec=default_timeout,
|
||||
)
|
||||
|
||||
|
||||
@@ -200,6 +210,9 @@ class DaemonConfig:
|
||||
# threshold in seconds. 0 disables (default). When >0, dispatched-pending
|
||||
# slots older than this are surfaced (WARN + counter) without state change.
|
||||
pending_stale_threshold_sec: int = 0
|
||||
# dcy-022 / REQ-068: default order timeout (seconds). None = OFF = indefinite.
|
||||
# Per-intent timeout_sec overrides. Passed to IntentService at wiring time.
|
||||
default_order_timeout_sec: Optional[int] = None
|
||||
# dcy-014 / REQ-048: operator-local timezone (CLI date display etc.). The
|
||||
# daily preallocation trigger was removed with the pool model (BAT-030).
|
||||
trading_timezone: str = "Asia/Seoul"
|
||||
|
||||
Reference in New Issue
Block a user