Files
trex-core/docs/batches/bat-046_20260616_observability-classification-pnl-runbook/verification.md
T
genichinandClaude Opus 4.8 d8d9021260 feat(execution,obs): 호가단위 스냅(dcy-030/#28) + 운영 관측성(dcy-029/#29) + REL-007 환류
dcy-030 (issue #28, P0 체결 복구):
- REQ-083 KRX 호가단위(tick) 순수 유틸 (domain/pricing.py)
- REQ-070 CHG: 슬리피지 실효가 호가단위 스냅 — 상한 준수(매수 floor/매도 ceil)
  + band<1tick 하한/상한 보장 + 부동소수 epsilon 가드. 147700→148400/54500→54700.
- BAT-044 release-candidate

dcy-029 (issue #29, 운영 관측성):
- REQ-084 구조화 로깅 기반 (runtime/logging_setup.py): ISO8601 KST·레벨·Loki JSON
  ·correlation id(slot_id)
- REQ-085 주문 결과 로깅 (event=order_submit|fill|reject)
- REQ-087 거부 ERROR 가시성 (조용한 롤백 제거)
- REQ-086 청산 reason+actor 동반 노출 (안전망/전략 구분, 신규 필드 없음)
- REQ-088 운영 조회 CLI report (application/operator_report.py, 보유·오늘 체결
  ·실현 PnL net·대기, direct-DB)
- REQ-089 운영자 런북 docs/operations.md
- REQ-090 baseline 정합 (runtime-flows·project-structure·interface-contract)
- BAT-045(P0)·BAT-046(P1) release-candidate

REL-007: confirmed → feedback-captured (운영 인스턴스 라이브 검증 + #28/#29 환류
정규화). BAT-037~041 released.

검증: 537 passed, 47 skipped, 회귀 0, ruff clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 13:19:31 +09:00

2.4 KiB

BAT-046 Verification

  • Status: confirmed
  • Batch: BAT-046

Acceptance Mapping

  • REQ-086 (청산 reason+actor 노출):
    • AC-1 (stop_loss+actor=safety_sell 함께): test_fire_log_exposes_reason_and_actor(forced_close_at+actor) + 로그 포맷(reason= actor=) ✅
    • AC-2 (전략 actor 구분): actor 어휘 interface-contract 문서화 + slot_transition_log actor 기록(기존) ✅
    • AC-3 (운영자 오해 제거): fire 로그 reason+actor 동반 ✅
    • AC-4 (safety_sell 4경로 reason+actor): _log_fire 모든 경로 공통 + 기존 forced/SL/TP/market 테스트 ✅
    • AC-5 (기존 reason 소비처 회귀 없음): reason 값 불변, 537 passed 회귀 0 ✅
    • AC-6 (interface-contract 문서화): "청산 사유 어휘 — reason + actor" 절 추가 ✅
  • REQ-088 (운영 조회 CLI):
    • AC-1 (보유): test_render_text_has_sections·render_json holdings ✅
    • AC-2 (오늘 체결 건수): test_build_counts_and_pnl(fills_count) ✅
    • AC-3 (실현 PnL fee/tax 반영, ledger_outbox 집계 일치): test_buy_then_sell_net_cash_flow_with_fee_tax ✅
    • AC-4 (대기 주문): pending 렌더 ✅
    • AC-5 (KST "오늘" 경계 전일 제외): test_today_boundary_excludes_yesterday ✅
    • AC-6 (신규 RPC 없이 동작): report=direct-DB, RPC 미추가(cli _cmd_report) ✅
  • REQ-089 (운영자 런북):
    • AC-1~5 (배포·CLI·로깅/관측성·디버깅 4영역 + 신규 운영자 수행 가능): docs/operations.md 4개 절(§1 배포/§2 CLI+report/§3 로깅·관측성·reason+actor/§4 디버깅+DB조회) ✅ (문서 리뷰)
  • REQ-090 (baseline 정합):
    • AC-1·2 (runtime-flows 로깅/관측성+주문결과+거부ERROR+reason+actor+report): "구조화 로깅/관측성" + "운영 조회 리포트" flow 추가 ✅
    • AC-3 (project-structure 신규 모듈): logging_setup·operator_report·operations.md·cli report 반영 ✅
    • AC-4 (구현과 무모순): 코드와 일치 ✅

Evidence

  • Test:
    • pytest tests/application/test_operator_report.py tests/application/test_safety_sell_visibility.py -q → 14 passed.
    • 전체 pytest -q → 537 passed, 47 skipped, 회귀 0.
    • ruff check trex_core/ tests/ → All checks passed.
  • Manual:
    • operations.md 4영역 포함 리뷰, interface-contract reason+actor 어휘 리뷰.
  • Logs:
    • report direct-DB·Loki 실 적재는 release 운영 검증 위임.

Result

  • Ready for Release: true
  • Blocking Issues:
    • 없음