feat(config): expose paper broker tuning via env (REQ-010 AC-5, BAT-009)

Wire the existing PaperBroker scenario knobs (fill_after_polls /
qty_per_poll / reject_symbols) to daemon env so REQ-011 AC-2 e2e
scenarios (delayed / partial / reject) can be reproduced by a daemon
restart. Unset == prior PaperBroker() behaviour, byte-for-byte (no
regression).

- config.py: PaperBrokerConfig + from_env parsing (TREX_PAPER_*)
- daemon.py: _build_broker injects config.paper into PaperBroker
- .env.example: document the 3 paper tuning keys (paper-only, e2e)
- tests: paper broker defaults + env tuning parsing

SDLC: REQ-010 CHG-20260606-01 (AC-5 added) / -02 (Implemented);
BAT-009 batch-lite release-candidate; REL-001 feedback handoff records
pre-deployment e2e observations incl. event-publisher idle-drop and
paper correlation_id collision (GitHub #4, #5).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 16:49:51 +09:00
co-authored by Claude Opus 4.8
parent f8c5661147
commit 2f57aad7b2
13 changed files with 280 additions and 8 deletions
+2 -2
View File
@@ -117,8 +117,8 @@
## Recent Change Log Summary
- 2026-06-06 :: REQ-010 CHG-20260606-02 — Status Approved → Implemented (confirm-req-implemented, 근거 BAT-009 release-candidate). AC-1~4 BAT-003 회귀 + AC-5 단위 2개·e2e(거부/지연/부분) evidence 충족. (confirm-req-implemented)
- 2026-06-06 :: REQ-010 CHG-20260606-01 — paper broker 튜닝 knob(REQ-011 AC-2 지연/부분/거부)을 데몬 env(`TREX_PAPER_FILL_AFTER_POLLS`/`QTY_PER_POLL`/`REJECT_SYMBOLS`)로 노출(AC-5 신설). 미설정=기존 동작 byte-for-byte. 신규 AC 한정 Implemented → Approved(BAT-009 batch-lite verification 대기). REL-001 의 AC-1~4 coverage 는 유효. (change-req)
- 2026-06-06 :: REQ-017 CHG-20260606-01 — 실 portfolio-hub ledger write 계약 정정(`POST /v1/portfolios/{portfolio_id}/ledger/trades`, body `quantity`/`fee_amount`/`tax_amount`, 성공 201). 구 orbit 가정(`/v1/assets/{asset_id}`, `qty`/`fee`/`tax`) 폐기. 정정 구현 재검증 완료(unit 16 + 실 e2e 201)·Implemented 유지. REL-001 ledger blocker 해소. (change-req)
- 2026-06-06 :: REQ-027 CHG-04 — 실 portfolio-hub 계약 정정(whoami `/v1/user_info`, `{portfolios}` envelope, 클라이언트측 daemon 필터, 전략 필드 None/`{}` 이월). 정정 구현 재검증 완료·Implemented 유지. (change-req)
- 2026-06-06 :: REQ-029 CHG-04 — orb-v1 소비 참고 사항 추가(strategy_key 없이 view=buyable, 전략 필드 부재 무해). 문서 전용·Implemented 유지. (change-req)
- 2026-06-06 :: REQ-027~029, REQ-031~033 Approved → Implemented — BAT-008 release-candidate verification evidence 기반. REQ-030 은 AC-1 evidence 확보·AC-2/AC-3 portfolio-hub#8 배포 대기로 Approved 유지. (confirm-req-implemented)
- 2026-06-06 :: REQ-027~033 Proposed → Approved — dcy-005 confirmed, 전체 승인 게이트 통과. REQ-030 옵션 D 구현은 portfolio-hub#8 배포 후 착수. (confirm-req)