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>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# BAT-037 Implementation
|
||||
|
||||
- Status: draft
|
||||
- Status: completed
|
||||
- Batch: BAT-037
|
||||
|
||||
## Plan Summary
|
||||
- `make_slots_rpc_handler` 에 `max_active_slots` 파라미터 추가 및 응답에 `available_slots` 포함
|
||||
- `daemon.py` wiring 에 `max_active_slots` 전달
|
||||
- `test_slots_handler.py` AC-3/AC-6 갱신
|
||||
- `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`
|
||||
@@ -14,10 +14,15 @@
|
||||
- `tests/application/test_slots_handler.py`
|
||||
|
||||
## Execution Log
|
||||
1. 구현 예정
|
||||
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
|
||||
- 없음
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# BAT-037: slots RPC 응답에 available_slots capacity hint 추가 (CHG-20260612-01)
|
||||
|
||||
- Status: draft
|
||||
- Status: in-delivery
|
||||
- Profile: standard
|
||||
- Source Discovery: dcy-025 (REQ-073 change-req)
|
||||
- Included REQ: REQ-073 (CHG-20260612-01)
|
||||
|
||||
@@ -44,4 +44,4 @@
|
||||
| BAT-034 | standard | release-candidate | REQ-002 (CHG-20260610-02), REQ-006 (CHG-20260610-02), REQ-007 (CHG-20260610-02), REQ-028 (CHG-20260610-01), REQ-032 (CHG-20260610-07) | dcy-023 (issue #22) | [bat-034](./bat-034_20260610_drop-allocated-capital/) |
|
||||
| BAT-035 | standard | confirmed | REQ-073, REQ-074, REQ-075, REQ-021 (CHG-20260611-01), REQ-034 (CHG-20260611-01), REQ-063 (CHG-20260611-01) | dcy-025 | [bat-035](./bat-035_20260611_strategy-read-surface-slots-req/) |
|
||||
| BAT-036 | standard | confirmed | REQ-048 (CHG-20260611-01), REQ-005 (CHG-20260611-01) | dcy-024 | [bat-036](./bat-036_20260611_safety-sell-disable-mode/) |
|
||||
| BAT-037 | standard | draft | REQ-073 (CHG-20260612-01) | dcy-025 (REQ-073 change-req) | [bat-037](./bat-037_20260612_slots-rpc-available-slots/) |
|
||||
| BAT-037 | standard | in-delivery | REQ-073 (CHG-20260612-01) | dcy-025 (REQ-073 change-req) | [bat-037](./bat-037_20260612_slots-rpc-available-slots/) |
|
||||
|
||||
Reference in New Issue
Block a user