fix(daemon): buy 심볼 resolver 결함 수정 + REL-004 draft (운영자 run 증거)

REL-004(미릴리즈 BAT-014~021 통합) draft-release 작성. confirm-release 전
운영자 프로그램 run-the-app 검증(실 데몬 + trex-core CLI e2e)을 수행했고,
369 passed 가 놓친 실 프로덕션 버그를 검출·수정했다.

- fix(REQ-007 CHG-20260608-03): Daemon._resolve_symbol 이 SnapshotAsset.symbol
  (없는 속성)을 접근 → 데몬 buy admission 매 요청 AttributeError → intent RPC
  타임아웃(실 데몬 매수 전면 불능). asset.item.symbol 로 수정. 단위 테스트가
  stub resolver 를 주입해 실 배선을 한 번도 실행하지 않아 미검출이었음
- test: tests/runtime/test_daemon_resolve_symbol.py — 실 Daemon._resolve_symbol
  × 실 SnapshotStore 회귀 가드(수정 전 실패하는 테스트)
- docs(release): rel-004 draft(app-service, BAT-014~021) + Pre-Release Run
  Evidence(데몬 기동 + universe/slots/enter/exit e2e + ledger completed +
  버그 검출·수정 + LIVE 미검증 한계) + releases/index REL-004 행

검증: 실 데몬 재기동 후 buy/sell e2e admitted→체결→closed + ledger completed,
단위 337 passed, ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 17:38:34 +09:00
co-authored by Claude Opus 4.8
parent 6d7bca1460
commit a570ac659e
5 changed files with 199 additions and 2 deletions
@@ -235,3 +235,41 @@
#### Validation Plan
- BAT-016: 가격 전달 매도 → 지정가 / 미전달 → 시장가 단위 + 핸들러 payload.
### CHG-20260608-03
- Date: 2026-06-08
- Author: Justin Ko
#### Change Summary
- (change-req, REL-004 사전 run 검증에서 발견된 결함 수정) 데몬 buy 심볼 resolver 버그 정정: `Daemon._resolve_symbol` 이 `SnapshotStore.get()` 반환값(`SnapshotAsset`)에서 `asset.symbol` 을 접근했으나 symbol 은 `asset.item.symbol` 에 있어 `AttributeError` → 데몬 buy admission 이 매번 크래시(intent RPC 타임아웃). `asset.item.symbol` 로 수정. 단위 테스트가 stub resolver 를 주입해 실 데몬 배선을 한 번도 실행하지 않아 369 passed 에도 누락됐다 — 실 데몬 기동 + CLI e2e(REL-004 smoke)에서 검출. Implemented 유지.
#### Intent
- dcy-011/REQ-007 의 buy 심볼 서버 resolve 가 실 런타임(daemon + SnapshotStore)에서 동작하도록 배선 결함 수정 + 회귀 가드 추가.
#### Acceptance Criteria Delta
- (변경 없음 — AC 동일; 배선 결함 수정. 실 데몬 resolver 가 SnapshotAsset.item.symbol 을 읽음)
#### Impacted Area Delta
- Modules: `trex_core/runtime/daemon.py`(`_resolve_symbol` → `asset.item.symbol`)
- Tests: tests/runtime/test_daemon_resolve_symbol.py(실 Daemon._resolve_symbol × 실 SnapshotStore 회귀)
#### Delivery Trace Delta
- Batches: BAT-015
- Releases: REL-004 (사전 run 검증에서 검출·수정)
#### Revalidation Impact
- Reverification Needed: yes (REL-004 live smoke + 회귀 테스트로 완료)
- Existing Implementation Invalidated: yes (데몬 buy admission 경로 — 실 런타임에서 전면 실패였음)
- Status Recommendation: Implemented (배선 수정 + 회귀 가드)
- Follow-up Action: REL-004 confirm-release 전 live smoke 증거에 반영.
#### Validation Plan
- 실 데몬 기동(paper + test PG/RabbitMQ) + `trex-core enter pf-005930 --yes` → admitted/체결/ledger completed e2e + test_daemon_resolve_symbol 회귀.