# BAT-036: safety_sell_enabled TOML 설정 + 조건부 데몬 워커 기동 (dcy-024) - Status: released - Profile: standard - Source Discovery: dcy-024 - Included REQ: REQ-048 (CHG-20260611-01), REQ-005 (CHG-20260611-01) - Excluded REQ: 없음 ## Summary - per-instance TOML 에 `safety_sell_enabled: bool = true` 필드를 추가하고, `false` 시 daemon.start() 가 `trex-safety-sell` 워커를 workers 리스트에서 제외해 스레드를 기동하지 않는다. 기동 로그로 상태를 가시화하며, 나머지 실행 경로(ExecutionService/CLI exit/cancel/kill-switch/strategy sell intent)는 이 값과 무관하게 동작한다. ## Scope - In: `trex_core/runtime/config.py` — DaemonInstanceConfig에 `safety_sell_enabled: bool = True` 필드 추가 + from_toml/from_config 파싱 + DaemonConfig로 전파, `trex_core/runtime/daemon.py` — start() workers 리스트 조건 분기 (safety_sell_enabled=False → trex-safety-sell 제외 + RUNNING 로그 + 경고 로그), 관련 테스트 - Out: env 변수 TREX_SAFETY_SELL_ENABLED, CLI 노출, slots/snapshot 응답 노출, 다른 워커 제어 ## Documents - Planning: [planning.md](./planning.md) - Design: [design.md](./design.md) - Implementation: [implementation.md](./implementation.md) - Verification: [verification.md](./verification.md) ## Notes - absent=true 기본값: TOML에 키 없으면 True(기존 동작 보존). - 선례: max_active_slots, default_order_timeout_sec 와 동일한 per-instance TOML 경로. - REQ-005 AC-6: ExecutionService/CLI exit/cancel/kill-switch/strategy sell intent 는 safety_sell_enabled 값과 무관하게 동작 — 이번 배치 구현에서 그 경로를 건드리지 않는 것이 검증 기준.