# BAT-035 Verification - Status: confirmed - Batch: BAT-035 ## Acceptance Mapping - REQ-073 AC-1: topology 선언 — `trex.slots.req` 큐 존재, `trex.snapshot.req` 큐·핸들러 부재 - REQ-073 AC-2: filter 분기 — inactive/pending(buy∪sell)/holding/error/all/invalid 처리 - REQ-073 AC-3: 응답 키 집합 — {slots/degraded/reason/message} only, assets/available_slots/watchdog(top) 키 부재 - REQ-073 AC-4: spy=true → last_seen_at 미갱신; spy=false(default) → holding watchdog 갱신 - REQ-073 AC-5: degraded=true + reason 전파, credentials sanitized - REQ-074 AC-1: 행 필드 — slot_id/status/avg_price/entry_price/forced_close_at/symbol/portfolio_id/cash_balance/asset_quantity/qty/watchdog:{expired,last_seen}/paused/warned 포함 - REQ-074 AC-2: qty≠asset_quantity → warned=true, 두 값 모두 노출 - REQ-074 AC-3: cash_estimated=true 구간 + 수렴 시 false - REQ-074 AC-4: paused holding → filter=holding 반환, paused=true (직교) - REQ-074 AC-5: strategy 계열 키 부재 (strategy_id/sell_strategy_id/strategy_params/active_strategy_id) - REQ-075 AC-1: interface-contract.md 에 slots.req 계약 + 필드 소스 테이블 추가, snapshot.req 현행 계약 섹션 제거 - REQ-075 AC-2: runtime-flows.md read 흐름 slots.req 기준으로 업데이트 - REQ-075 AC-3: `trex.snapshot.req` 현행 계약 서술 제거됨 (change log 이력 제외) - REQ-021 CHG-01 AC: 토폴로지에 slots.req 선언, snapshot.req 없음 (SNAPSHOT_REQ_QUEUE 상수 제거) - REQ-034 CHG-01 AC: spy=true → watchdog 미갱신; spy=false → holding watchdog 갱신 - REQ-063 CHG-01 AC: CLI spy=true 전송, --status 인자 server-side filter 매핑 (buyable→inactive) ## Evidence ### Tests (420 passed, 45 skipped — 2026-06-11) - **REQ-073 AC-1**: `tests/adapters/messaging/test_topology.py::test_topology_constants` - `topology.SLOTS_REQ_QUEUE == "trex.slots.req"` ✓ - `not hasattr(topology, "SNAPSHOT_REQ_QUEUE")` ✓ - **REQ-073 AC-2**: `tests/application/test_slots_handler.py` - `test_filter_all_returns_all_slots` ✓ - `test_filter_inactive_returns_inactive_slots` ✓ - `test_filter_holding_returns_holding_slots` ✓ - `test_filter_pending_returns_pending_buy_and_sell` ✓ - `test_invalid_filter_treated_as_all` ✓ - **REQ-073 AC-3**: `test_response_keys_only_slots_health` ✓ - **REQ-073 AC-4**: `test_spy_true_no_watchdog_update`, `test_spy_false_updates_watchdog` ✓ - **REQ-073 AC-5**: `test_degraded_signal_propagated` ✓ - **REQ-074 AC-1**: `test_slot_row_contains_merged_fields` ✓ - **REQ-074 AC-2**: `test_warned_true_when_qty_diverges` ✓ - **REQ-074 AC-3**: `tests/application/test_ledger_option_d.py::test_apply_cash_estimate_overlays_pending_delta` ✓ - **REQ-074 AC-4**: `test_paused_holding_orthogonal_to_filter` ✓ - **REQ-074 AC-5**: `test_strategy_fields_absent` ✓ - **REQ-021 CHG-01**: `test_topology_constants` + `tests/adapters/messaging/test_instance_topology.py::test_named_instance_suffix` ✓ - **REQ-034 CHG-01**: spy 워치독 억제 tests (위) ✓ - **REQ-063 CHG-01**: `tests/runtime/test_cli_operator.py` - `test_universe_uses_slots_queue_with_spy` ✓ - `test_slots_status_sends_server_side_filter` ✓ - `test_slots_buyable_maps_to_inactive_filter` ✓ ### Manual - `tests/application/test_killswitch_masking_resume.py`: View/build_snapshot_envelope 의존 제거 후 재작성 완료 - `tests/application/test_ledger_option_d.py`: _apply_cash_estimate 직접 테스트 → slots handler 경유 재작성 완료 ### Code Review - `trex_core/adapters/messaging/topology.py`: SNAPSHOT_REQ_QUEUE 제거, SLOTS_REQ_QUEUE 추가 ✓ - `trex_core/application/portfolio.py`: View, build_snapshot_envelope, _asset_to_dict, SnapshotEnvelope 제거 ✓ - `trex_core/application/messaging_handlers.py`: make_snapshot_rpc_handler 제거, make_slots_rpc_handler 추가 ✓ - `trex_core/runtime/daemon.py`: _snapshot_rpc_loop → _slots_rpc_loop, make_slots_rpc_handler 연결 ✓ - `trex_core/runtime/cli.py`: slots_queue + spy=True + server-side filter ✓ - `docs/interface-contract.md`: slots.req 계약 추가, snapshot.req envelope 섹션 제거 ✓ - `docs/runtime-flows.md`: 슬롯 RPC flow 추가, snapshot RPC flow 교체 ✓ - `docs/srs/index.md`: REQ-028 → Deprecated ✓ ## Result - Ready for Release: true - Blocking Issues: 없음