Files
trex-core/docs/batches/bat-037_20260612_slots-rpc-available-slots/implementation.md
T
genichinandClaude Sonnet 4.6 6c24bd4c2c feat(slots-rpc): available_slots capacity hint 추가 (BAT-037 / REQ-073 AC-6)
slots RPC 응답에 available_slots: int|null 포함.
max_active_slots 미설정 시 null, 설정 시 max(0, M-active).
16 tests passed (AC-6 신규 3개 포함), 423 전체 통과.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 10:28:29 +09:00

1.2 KiB
Raw Blame History

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

  • 없음