# BAT-058 Implementation - Status: in-progress - Batch: BAT-058 ## 변경 대상 1. `trex_core/adapters/portfolio/hub_read.py` - `get_cost_basis_with_diagnostics()` 새 메서드 추가 - canonical(`cost_basis_per_unit`) 우선 파싱 + legacy fallback 체인 적용 - invalid/parse 오류 reason 문자열 반환 2. `trex_core/application/reconciliation.py` - `sync_slot_to_broker()`에서 cost-basis 진단 메서드 사용 - inactive onboarding & no cost basis 시 dry-run/no-write + live fail-closed 구현 - sync 결과에 `seeded_avg_price`, `cost_basis_source`, `cost_basis_reason` 추가 3. `trex_core/runtime/cli.py` - sync 결과 출력에 `cost_basis.seeded`, `cost_basis.source`, `cost_basis.reason`, `error` 표시 4. `tests/adapters/portfolio/test_hub_read.py` - get_cost_basis canonical/legacy/invalid/오류 reason 검증 추가 5. `tests/application/test_sync.py` - inactive no-cost_basis live/dry-run 동작 - hold/warning scenarios 회귀 보존 ## 상태 - planning: completed - design: completed - implementation: completed - draft-batch-verification: completed