# BAT-037 Implementation - Status: completed - Batch: BAT-037 ## Plan Summary - `make_slots_rpc_handler` 에 `max_active_slots: Optional[int] = None` 파라미터 추가, 응답에 `available_slots` 포함 - `daemon.py` 핸들러 wiring 에 `max_active_slots=self.config.max_active_slots` 전달 - `test_slots_handler.py` AC-3 반전 + AC-6 테스트 3개 추가 ## Changed Files - `trex_core/application/messaging_handlers.py` - `trex_core/runtime/daemon.py` - `tests/application/test_slots_handler.py` ## Execution Log 1. `make_slots_rpc_handler` 시그니처에 `max_active_slots: Optional[int] = None` 추가 2. 응답 구성 직전 `available_slots` 계산: None → null, 설정 시 `max(0, M − count_active)` 3. `daemon.py` `_slots_rpc_loop` 에 `max_active_slots=self.config.max_active_slots` wiring 4. `test_slots_handler.py` AC-3 키 집합 갱신(`available_slots` 포함), `_wire` 에 `max_active_slots` 파라미터 전달 5. AC-6 테스트 3개 추가: uncapped(null), remaining(M-N), full(0) ## Validation - `pytest tests/application/test_slots_handler.py` — 16 passed (신규 3개 포함) - `pytest tests/` — 423 passed, 45 skipped, 회귀 없음 ## Remaining Risks - 없음