diff --git a/docs/batches/bat-001_20260603_trex-core-slot-domain-seed/index.md b/docs/batches/bat-001_20260603_trex-core-slot-domain-seed/index.md index df0e3cc..b10c61c 100644 --- a/docs/batches/bat-001_20260603_trex-core-slot-domain-seed/index.md +++ b/docs/batches/bat-001_20260603_trex-core-slot-domain-seed/index.md @@ -1,6 +1,6 @@ # BAT-001: trex-core 베이스 부트스트랩 + slot 순수 도메인 시드 -- Status: release-candidate +- Status: released - Profile: standard - Source Discovery: dcy-001 - Included REQ: REQ-001, REQ-002, REQ-003, REQ-004 diff --git a/docs/batches/bat-002_20260603_slot-core-daemon-http-api/index.md b/docs/batches/bat-002_20260603_slot-core-daemon-http-api/index.md index 4b726ef..af095ab 100644 --- a/docs/batches/bat-002_20260603_slot-core-daemon-http-api/index.md +++ b/docs/batches/bat-002_20260603_slot-core-daemon-http-api/index.md @@ -1,6 +1,6 @@ # BAT-002: trex-core 슬롯 코어 데몬화 + HTTP intent API (슬라이스 1) -- Status: release-candidate +- Status: released - Profile: standard - Source Discovery: dcy-002 - Included REQ: REQ-005, REQ-006, REQ-007, REQ-008, REQ-009 diff --git a/docs/batches/bat-003_20260604_daemon-dotenv-config/index.md b/docs/batches/bat-003_20260604_daemon-dotenv-config/index.md index 258cd82..c675b4e 100644 --- a/docs/batches/bat-003_20260604_daemon-dotenv-config/index.md +++ b/docs/batches/bat-003_20260604_daemon-dotenv-config/index.md @@ -1,6 +1,6 @@ # BAT-003: 데몬 설정 .env 로딩 (minor-change) -- Status: release-candidate +- Status: released - Profile: batch-lite - Source Discovery: dcy-002 (REQ-010 은 데몬 설정 편의 개선) - Included REQ: REQ-010 diff --git a/docs/batches/bat-004_20260604_broker-execution-and-outbox/index.md b/docs/batches/bat-004_20260604_broker-execution-and-outbox/index.md index a9382a8..5a1d85b 100644 --- a/docs/batches/bat-004_20260604_broker-execution-and-outbox/index.md +++ b/docs/batches/bat-004_20260604_broker-execution-and-outbox/index.md @@ -1,6 +1,6 @@ # BAT-004: 브로커 집행 + KIS 어댑터 + durable 핸드오프 -- Status: release-candidate +- Status: released - Profile: standard - Source Discovery: dcy-003 - Included REQ: REQ-011, REQ-012, REQ-013, REQ-014, REQ-015 diff --git a/docs/batches/bat-005_20260604_kis-token-redis-cache/index.md b/docs/batches/bat-005_20260604_kis-token-redis-cache/index.md index 48abf65..25ac301 100644 --- a/docs/batches/bat-005_20260604_kis-token-redis-cache/index.md +++ b/docs/batches/bat-005_20260604_kis-token-redis-cache/index.md @@ -1,6 +1,6 @@ # BAT-005: KIS 토큰 Redis 캐시 (minor-change) -- Status: release-candidate +- Status: released - Profile: batch-lite - Source Discovery: dcy-003 (REQ-012 운영 견고성 보완) - Included REQ: REQ-016 diff --git a/docs/batches/bat-006_20260604_portfolio-hub-ledger-integration/index.md b/docs/batches/bat-006_20260604_portfolio-hub-ledger-integration/index.md index b853ea5..5f140ea 100644 --- a/docs/batches/bat-006_20260604_portfolio-hub-ledger-integration/index.md +++ b/docs/batches/bat-006_20260604_portfolio-hub-ledger-integration/index.md @@ -1,6 +1,6 @@ # BAT-006: portfolio-hub ledger 통합 -- Status: release-candidate +- Status: released - Profile: standard - Source Discovery: dcy-004 - Included REQ: REQ-017, REQ-018, REQ-019, REQ-020 diff --git a/docs/batches/bat-007_20260605_strategy-module-rabbitmq-transport/index.md b/docs/batches/bat-007_20260605_strategy-module-rabbitmq-transport/index.md index f895a00..cd185b6 100644 --- a/docs/batches/bat-007_20260605_strategy-module-rabbitmq-transport/index.md +++ b/docs/batches/bat-007_20260605_strategy-module-rabbitmq-transport/index.md @@ -1,6 +1,6 @@ # BAT-007: 전략 모듈 RabbitMQ transport 전환 -- Status: release-candidate +- Status: released - Profile: standard - Source Discovery: dcy-006 - Included REQ: REQ-021, REQ-022, REQ-023, REQ-024, REQ-025, REQ-026 diff --git a/docs/batches/bat-008_20260606_portfolio-hub-snapshot-read-layer/index.md b/docs/batches/bat-008_20260606_portfolio-hub-snapshot-read-layer/index.md index f62d989..d4de38a 100644 --- a/docs/batches/bat-008_20260606_portfolio-hub-snapshot-read-layer/index.md +++ b/docs/batches/bat-008_20260606_portfolio-hub-snapshot-read-layer/index.md @@ -1,6 +1,6 @@ # BAT-008: portfolio-hub 스냅샷 read 레이어 -- Status: release-candidate +- Status: released - Profile: standard - Source Discovery: dcy-005 - Included REQ: REQ-027, REQ-028, REQ-029, REQ-030, REQ-031, REQ-032, REQ-033 diff --git a/docs/batches/index.md b/docs/batches/index.md index 0ce4ff9..d99eb79 100644 --- a/docs/batches/index.md +++ b/docs/batches/index.md @@ -8,12 +8,12 @@ | BAT ID | Profile | Status | Included REQ | Discovery | Folder | | --- | --- | --- | --- | --- | --- | -| BAT-001 | standard | release-candidate | REQ-001, REQ-002, REQ-003, REQ-004 | dcy-001 | [bat-001](./bat-001_20260603_trex-core-slot-domain-seed/) | -| BAT-002 | standard | release-candidate | REQ-005, REQ-006, REQ-007, REQ-008, REQ-009 | dcy-002 | [bat-002](./bat-002_20260603_slot-core-daemon-http-api/) | -| BAT-003 | batch-lite | release-candidate | REQ-010 | dcy-002 | [bat-003](./bat-003_20260604_daemon-dotenv-config/) | -| BAT-004 | standard | release-candidate | REQ-011, REQ-012, REQ-013, REQ-014, REQ-015 | dcy-003 | [bat-004](./bat-004_20260604_broker-execution-and-outbox/) | -| BAT-005 | batch-lite | release-candidate | REQ-016 | dcy-003 | [bat-005](./bat-005_20260604_kis-token-redis-cache/) | -| BAT-006 | standard | release-candidate | REQ-017, REQ-018, REQ-019, REQ-020 | dcy-004 | [bat-006](./bat-006_20260604_portfolio-hub-ledger-integration/) | -| BAT-007 | standard | release-candidate | REQ-021, REQ-022, REQ-023, REQ-024, REQ-025, REQ-026 | dcy-006 | [bat-007](./bat-007_20260605_strategy-module-rabbitmq-transport/) | -| BAT-008 | standard | release-candidate | REQ-027, REQ-028, REQ-029, REQ-030, REQ-031, REQ-032, REQ-033 | dcy-005 | [bat-008](./bat-008_20260606_portfolio-hub-snapshot-read-layer/) | +| BAT-001 | standard | released | REQ-001, REQ-002, REQ-003, REQ-004 | dcy-001 | [bat-001](./bat-001_20260603_trex-core-slot-domain-seed/) | +| BAT-002 | standard | released | REQ-005, REQ-006, REQ-007, REQ-008, REQ-009 | dcy-002 | [bat-002](./bat-002_20260603_slot-core-daemon-http-api/) | +| BAT-003 | batch-lite | released | REQ-010 | dcy-002 | [bat-003](./bat-003_20260604_daemon-dotenv-config/) | +| BAT-004 | standard | released | REQ-011, REQ-012, REQ-013, REQ-014, REQ-015 | dcy-003 | [bat-004](./bat-004_20260604_broker-execution-and-outbox/) | +| BAT-005 | batch-lite | released | REQ-016 | dcy-003 | [bat-005](./bat-005_20260604_kis-token-redis-cache/) | +| BAT-006 | standard | released | REQ-017, REQ-018, REQ-019, REQ-020 | dcy-004 | [bat-006](./bat-006_20260604_portfolio-hub-ledger-integration/) | +| BAT-007 | standard | released | REQ-021, REQ-022, REQ-023, REQ-024, REQ-025, REQ-026 | dcy-006 | [bat-007](./bat-007_20260605_strategy-module-rabbitmq-transport/) | +| BAT-008 | standard | released | REQ-027, REQ-028, REQ-029, REQ-030, REQ-031, REQ-032, REQ-033 | dcy-005 | [bat-008](./bat-008_20260606_portfolio-hub-snapshot-read-layer/) | | BAT-009 | batch-lite | release-candidate | REQ-010 (CHG-20260606-01 / AC-5) | dcy-002 | [bat-009](./bat-009_20260606_paper-broker-env-tuning/) | diff --git a/docs/releases/index.md b/docs/releases/index.md index a746a1f..3fba885 100644 --- a/docs/releases/index.md +++ b/docs/releases/index.md @@ -8,5 +8,5 @@ | REL ID | Profile | Status | Included Batch | Discovery/REQ Input | Link | | --- | --- | --- | --- | --- | --- | -| REL-001 | app-service | confirmed | BAT-001~008 | Discovery: orb-v1 전략 모듈, 부분 매도(#5) / Change-req: REQ-030 옵션 D, 전략 필드 실데이터, 이벤트 publisher idle 견고성, paper execution_id Redis(#4) | [rel-001](rel-001_20260606_trex-core-slot-core-baseline.md) | +| REL-001 | app-service | feedback-captured | BAT-001~008 | Discovery: orb-v1 전략 모듈, 부분 매도(#5) / Change-req: REQ-030 옵션 D, 전략 필드 실데이터, 이벤트 publisher idle 견고성, paper execution_id Redis(#4) | [rel-001](rel-001_20260606_trex-core-slot-core-baseline.md) | | REL-002 | tooling | released | BAT-009 | Change-req: paper execution_id Redis(#4) | [rel-002](rel-002_20260606_paper-broker-env-tuning.md) | diff --git a/docs/releases/rel-001_20260606_trex-core-slot-core-baseline.md b/docs/releases/rel-001_20260606_trex-core-slot-core-baseline.md index 4c6fbdb..f88b85c 100644 --- a/docs/releases/rel-001_20260606_trex-core-slot-core-baseline.md +++ b/docs/releases/rel-001_20260606_trex-core-slot-core-baseline.md @@ -1,6 +1,6 @@ # REL-001: trex-core slot-core baseline (daemon + broker + ledger + RabbitMQ transport + portfolio-hub snapshot read) -- Status: confirmed +- Status: feedback-captured - Profile: app-service - Included Batch: BAT-001, BAT-002, BAT-003, BAT-004, BAT-005, BAT-006, BAT-007, BAT-008 @@ -49,58 +49,64 @@ ### Deployment Facts - Executed At: - - <배포 시작 시각> + - 2026-06-06T11:18:16Z (운영자 Hermes Agent 기동) - Completed At: - - <배포 완료 시각> + - 2026-06-06T11:18:16Z (데몬 기동 + RabbitMQ 연결 + intent→KIS→rollback 흐름 검증 완료) - Environment: - - <배포 대상 환경> + - Host: 86ba33f2997a / Workdir: /root/release/trex-core / Runtime: `.venv/bin/trex-core-daemon` (실 KIS 계좌 연동, `broker=kis` LIVE) - Operator: - - <배포 수행자> + - Hermes Agent (운영자) — evidence 본 release 문서로 전달, Claude Code 세션이 문서화/검증 보강. - Revision or Artifact: - - <커밋 SHA 또는 배포 artifact 식별자> + - 71faa23 (현재 origin/main HEAD). REL-001 코드(BAT-001~008)는 이 revision의 부분집합이며 BAT-009(REL-002)까지 포함된 빌드로 배포됨. - Commands or Procedure: - - <실행 명령 또는 배포 절차 요약> + - `.env` 로드 후 `.venv/bin/trex-core-daemon` 기동 → RabbitMQ 연결 및 워커 실행 확인 → RabbitMQ RPC 로 intent 수신 → KIS 제출 → (휴장일) 거절 → slot rollback 흐름 검증. ### Profile-Specific Checks - app-service: - Health Endpoint: - - + - HTTP health 없음(RabbitMQ transport). 운영자 확인: 데몬 기동 후 RabbitMQ 연결 성립 로그 확인 = 큐 declare readiness 동등 신호. 개별 큐/exchange declare 완료 로그는 부분 확인(코드상 `trex.snapshot.req`/`trex.intent.req`/`trex.pause.req`/`trex.events`/`trex.events.dlq` 선언, RabbitMQ 연결 로그 확인됨). - Startup Log Fields: - - + - 6 워커 스레드 구성 확인(trex-execution / trex-ledger / trex-intent-rpc / trex-snapshot-rpc / trex-pause-rpc / trex-snapshot-scheduler). 데몬 정상 기동 + RabbitMQ 연결 성공 로그. - Request Log Fields: - - + - intent RPC 가 admitted 처리됨(correlation_id 기반 RPC 동작 확인). 개별 request_id 로그 필드는 부분 확인. - Smoke or Manual Verification: - - <배포 후 재실행한 snapshot/pause RPC 검증과 결과> + - 배포 시점 운영자 검증: RabbitMQ → intent 수신 → execution loop → KIS 실제 제출 → KIS 거절 → slot `pending_buy→idle` 복구 흐름 의도대로 동작 확인(아래 Rollback Outcome). + - 보강(동일 revision 71faa23, Claude Code 세션): snapshot RPC `degraded=false` + universe 수신 확인(이전 검증), pause→resume RPC live 검증(이 세션), paper e2e 전체 그룹(admission/read + broker-behavior) 통과. **pre-deploy 테스트 게이트 재현**: 단위 166 passed / 23 skipped, 메시징 통합 16 passed, `ruff check` All passed. (KIS sandbox 1건은 `.env=LIVE` 산물로 deselect — 코드 결함 아님.) ### Rollback Outcome - Rollback Required: - - + - no (배포/서비스 롤백은 발생하지 않음 — 데몬은 계속 정상 가동) - Rollback Trigger: - - <발생 시 원인, 없으면 none> + - none (배포 차원의 롤백 트리거 없음). 참고: 운영자가 보고한 "rollback yes"는 **배포 롤백이 아니라 slot 상태 머신의 정상 거동**이다 — KIS 가 휴장일(2026-06-06 현충일)로 주문을 거절("장운영일자가 주문일과 상이합니다")하자, intent 는 admitted 였던 슬롯이 `pending_buy→idle` 로 복구된 것. broker_order_id / ledger_outbox 체결 흔적 없음 = 정상(체결 안 됨). 이는 매수 거부 경로 smoke 의 **성공 관찰**이다. - Rollback Action: - - <수행한 조치, 없으면 none> + - none (배포 유지). slot-level rollback 은 설계대로 자동 수행됨(REQ-011~015 실행 루프). ### Release Decision Evidence - Released Decision: - - + - yes (confirmed → released) - Rationale: - - + - 실 환경 배포 + 데몬 정상 기동(6 워커) + RabbitMQ 연결 성공 + 핵심 slot-core 경로(RabbitMQ → intent admitted → execution loop → KIS 실제 제출 → 거절 → slot rollback) live 동작 확인. app-service profile 검증 바(큐 declare readiness=health 동등, startup/RPC 로그, live RPC smoke) 충족. pre-deploy 테스트/ruff 게이트는 동일 revision(71faa23) 재현으로 보강. + - **잔여 항목(blocker 아님, 차기 거래일 확인 대상)**: (a) ledger outbox flush(fill→ledger 기록, BAT-006/REQ-017~020)는 휴장일 거절로 **실 체결이 없어 운영 미실증**(paper e2e 에서만 검증). (b) DB 마이그레이션 001~003 적용은 명시 로그 부재 — 단 데몬 boot `apply_migrations` + intent admitted(슬롯 테이블 기록 성공)로 스키마 존재 implicit 확인. (c) 포지션 정합/warning 마스킹 개별 결과 로그 부분 확인(루프는 동작). - Recorded By: - - <기록자> + - Hermes Agent (released 결정) / Claude Code 세션 (evidence 문서화·게이트 보강) - Recorded At: - - <기록 시각> + - 2026-06-06T11:18:16Z (운영자 결정) / 2026-06-07 (KST, 문서 반영) ## Feedback Handoff -> 주의: 아래는 **배포 전(pre-deployment) paper-broker e2e/smoke 관찰**이다. REL-001 은 아직 `released` 가 아니므로(Release Execution Evidence 미기재) release status 는 `confirmed` 유지하며, capture-release-feedback 의 status 전환(`feedback-captured` / batch `released`)은 실제 배포 후 수행한다. +> 주의: 아래 Observation Summary 의 1~2번 항목은 **배포 전(pre-deployment) paper-broker e2e/smoke 관찰**이다. REL-001 은 2026-06-06 실 환경 배포 완료로 status `released` 전환됨(Release Execution Evidence 참조). 남은 거버넌스 단계는 `capture-release-feedback`(release `feedback-captured` 전환 + 포함 batch BAT-001~008 `released` 갱신 + 아래 후속 입력 정리)이다. +> +> 배포 후(post-deployment) 잔여 확인 대상(차기 거래일): (a) **ledger outbox flush(fill→ledger)** — 휴장일 거절로 실 체결이 없어 운영 미실증(paper e2e 에서만 검증). 다음 거래일 실 체결 1건으로 확인 필요. (b) DB 마이그레이션 001~003 명시 적용 로그 확보. (c) 포지션 정합/warning 마스킹 개별 결과 로그 확보. - Observation Summary: - - paper-broker e2e (2026-06-06): admission/read 그룹(멱등성·매수 거부 no_idle_slot·매도 거부 slot_not_found·pause/resume RPC·pause 는 intent 비차단·snapshot buyable 마스킹·happy-path 이벤트 캡처)과 broker-behavior 그룹(거부 롤백 `idle→pending_buy→idle`·지연 체결 `+3.7s`·부분 체결 qty 누적 `+2.5s`) 전부 통과. snapshot/pause RPC envelope·ledger outbox·슬롯 전이 정상. - - 견고성 관찰: 데몬 부팅 후 오래 idle 였던 이벤트 publisher pika 연결이 **첫 발행 시 `StreamLostError(EOF)` 로 1회 끊겼다가 자동 복구**(best-effort 경로, 롤백 없음, 슬롯/ledger 정합 영향 없음). 첫 이벤트 1건 유실 가능. + - (배포 전) paper-broker e2e (2026-06-06): admission/read 그룹(멱등성·매수 거부 no_idle_slot·매도 거부 slot_not_found·pause/resume RPC·pause 는 intent 비차단·snapshot buyable 마스킹·happy-path 이벤트 캡처)과 broker-behavior 그룹(거부 롤백 `idle→pending_buy→idle`·지연 체결 `+3.7s`·부분 체결 qty 누적 `+2.5s`) 전부 통과. snapshot/pause RPC envelope·ledger outbox·슬롯 전이 정상. + - (배포 전) 견고성 관찰: 데몬 부팅 후 오래 idle 였던 이벤트 publisher pika 연결이 **첫 발행 시 `StreamLostError(EOF)` 로 1회 끊겼다가 자동 복구**(best-effort 경로, 롤백 없음, 슬롯/ledger 정합 영향 없음). 첫 이벤트 1건 유실 가능. + - (배포 후, 2026-06-06T11:18:16Z, 운영자 Hermes Agent) 실 환경(host 86ba33f2997a, `broker=kis` LIVE) 데몬 정상 기동(6 워커) + RabbitMQ 연결 성공. 실 KIS 계좌 대상 RabbitMQ → intent admitted → execution loop → KIS 실제 제출 → KIS 거절(휴장일 "장운영일자가 주문일과 상이합니다") → slot `pending_buy→idle` 자동 복구 흐름 의도대로 동작. broker_order_id/ledger 체결 흔적 없음(정상). + - (배포 후 잔여) **ledger outbox flush(fill→ledger)는 운영 미실증** — 현충일 휴장으로 실 체결이 발생하지 않음(paper e2e 에서만 검증). 차기 거래일 실 체결 1건으로 확인 필요. 마이그레이션 001~003 명시 적용 로그·포지션 정합/warning 마스킹 개별 결과 로그도 차기 거래일 보강 대상. - Discovery Input: - 전략 모듈(orb-v1) Discovery — REQ-029 CHG-04 소비 참고 사항 입력. - 부분 매도(한 슬롯 수량 일부) 능력 — 현재 미구현(전량 매도만). 신규 Discovery 후보. (GitHub #5) - REQ Input: - - <후속 req 후보> + - 없음 (본 release 환류에서 신규 REQ 후보 없음; 후속 작업은 Discovery/Change Request 입력 및 차기 거래일 운영 실증으로 처리) - Change Request Input: - REQ-030 옵션 D 활성화(portfolio-hub#8 배포 후) — cash/position `*_after` 갱신. - 전략 필드 실데이터 채움(2번째 전략 도입 시) — REQ-027/REQ-029 연계.