Files
trex-core/docs/batches/bat-043_20260615_sell-intent-retryable-flag/index.md
T
genichinandClaude Opus 4.8 e0d4e71304 feat(slot,intent): slot strategy-state 저장소 (dcy-028) + sell retryable 플래그 (issue #27)
BAT-042 (dcy-028 / issue #26 C-1/C-2/C-2b/C-3, REQ-079~082 + REQ-073/074 CHG):
- slot_strategy_state 별도 테이블 + StrategyStateStore(in-memory+PG) + occupancy_seq·version CAS + opaque UTF-8 data + 2단 size cap (REQ-079)
- trex.slots.strategy_state.set write RPC — reject reason 집합, 멱등 (REQ-080)
- Slot.occupancy_seq 필드 + inactive→pending_buy bump + →INACTIVE close 삭제 훅 → 점유 전환 ABA 구조적 차단 (REQ-081)
- slots.req 응답 행에 strategy_state 맵(batched 조립)·occupancy_seq additive (REQ-073 AC-7/REQ-074 AC-6)
- 마이그레이션 014(occupancy_seq)/015(slot_strategy_state), baseline 문서 정합 (REQ-082)

BAT-043 (issue #27 / REQ-007 CHG):
- rejected SellIntent 응답에 additive retryable: bool (core 소유 reason→retryable 매핑, 미인식 기본 true, bad_request* false) — 손절매 재시도 안전 경로 decoupling

검증: 487 passed, 47 skipped (신규 41: store CAS 6+ABA, occupancy bump/close 4경로, set RPC 9, slots read 5, retryable 8, PG 게이트), ruff clean.
REQ-079·080·081·082·073·074·007 → Implemented. issue #27 close. PG 경로 실 DB 검증은 release 위임.

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

1.9 KiB

BAT-043: rejected SellIntent retryable 플래그 (issue #27)

  • Status: release-candidate
  • Profile: batch-lite
  • Source Discovery: 없음 (REQ-007 change-req, issue #27)
  • Included REQ: REQ-007 (CHG-20260615-01)
  • Excluded REQ: 없음

Summary

  • rejected SellIntent 응답(trex.intent.req, intent_type:"sell", status:"rejected")에 additive retryable: bool 을 추가한다. core 가 소유한 reason→retryable 매핑으로 채우고 reason 은 유지한다. trex-tsl 데몬이 손절매 재시도 판단을 reason 문자열 하드코딩 대신 권위 플래그로 하게 해 안전 경로 결합을 제거한다(issue #27, #26 sell-idempotency 후속).

Scope

  • In Scope:
    • trex_core/application/messaging_handlers.py — intent 응답 빌더에 sell+rejected 시 retryable 부여 + core 소유 _SELL_REJECT_RETRYABLE 매핑(미인식 기본 true).
    • docs/interface-contract.md — rejected sell 응답 retryable 필드 명시.
    • 테스트: reason→retryable 매핑 케이스, 미인식 기본 true, admitted/processing/buy 부재, 기존 reason 유지.
  • Out of Scope:
    • reason 어휘 자체 변경(매핑만 추가).
    • buy intent / admitted / processing 응답 변경.
    • dcy-028(strategy-state) — 독립.

Documents

Notes

  • 완전 additive·하위호환: 필드 부재(older core) → 데몬 reason-string 폴백. 기존 응답/admit/buy 불변이라 회귀 리스크 낮음.
  • 안전 기본값: 미인식 reason → retryable: true(멈춘 손절매가 hammering 보다 위험, issue #27 답변에서 확정).
  • bad_request:*(malformed) → false(클라이언트 결함, 같은 바이트 재시도 무의미).