# req-026: messaging 레이어 baseline 문서 정합 - Status: Implemented - Type: Documentation - Priority: Medium - Owner: project maintainers ## Intent - dcy-006 transport 전환(REQ-021~025) 이 도입하는 메시지 토폴로지/계약, RabbitMQ 어댑터 + sync+thread 런타임, delivery 신뢰성 + degrade 정책, HTTP 표면 0 결과를 baseline 문서에 반영해 코드와 문서의 정합을 유지한다. ## Requirement - 아래 baseline 문서를 messaging 레이어에 맞게 갱신한다. - `docs/interface-contract.md` - HTTP `/v1` 섹션 제거(또는 deprecated 명시). - 신규 섹션: messaging 메시지 계약(스냅샷/intent RPC, 이벤트 topic), 큐/익스체인지/routing key, `correlation_id`/reply-to 규약, ack/durable/DLQ/TTL 정책, 어댑터 신선도 상태 노출. - `docs/runtime-flows.md` - 기존 매수/매도 intent HTTP 흐름 제거. - 신규 섹션: 스냅샷 RPC 흐름, intent admission RPC 흐름, 체결/슬롯 이벤트 발행/구독 흐름, broker degrade 분기 흐름, consumer/publisher 스레드 구성. - `docs/project-structure.md` - `trex_core/adapters/api/` 제거, `trex_core/adapters/messaging/` 추가. - sync+thread 런타임 구성(intent RPC consumer / snapshot RPC consumer / execution / ledger 스레드) 반영. - 의존성 변경(`fastapi`/`uvicorn` 제거, `pika` 추가) 반영. - 각 baseline 문서의 `Change Log` 에 본 변경(REQ-021~026 일괄 반영) 항목을 남긴다. - baseline 문서 본문이 코드와 충돌하지 않도록 manual review evidence 를 남긴다(REQ-020 패턴). ## Acceptance Criteria 1. Given REQ-021~025 구현 완료 상태, When 3 baseline 문서를 점검, Then `interface-contract.md`/`runtime-flows.md`/`project-structure.md` 모두에 messaging 레이어 섹션이 반영되어 있다. 2. Given 갱신된 baseline 문서, When 실제 코드(`trex_core/adapters/messaging/`, `runtime/daemon.py`, 토폴로지 선언) 와 대조, Then 메시지 계약·토폴로지·런타임 스레드 구성·의존성 변경이 모순 없이 일치한다. 3. Given 3 baseline 문서의 `Change Log`, When 점검, Then 본 transport 전환(REQ-021~026) 반영이 2026-06-05 일자로 기록되어 있다. 4. Given baseline 문서, When 점검, Then HTTP `/v1` 섹션과 `adapters/api` 트리 항목이 잔존하지 않는다(또는 deprecated 라벨로 명시). ## Impacted Area - Docs: docs/interface-contract.md, docs/runtime-flows.md, docs/project-structure.md - Modules: 없음(문서 전용) - Tests: 문서-코드 정합 점검(리뷰); 필요 시 interface-contract 예시와 실제 메시지 형식 대조. ## Notes - 출처: dcy-006 FR-6. - baseline 갱신은 REQ-021~025 구현 내용에 의존하므로 동일 batch 후반 또는 구현 직후 수행한다(REQ-020 baseline 정합 선례와 동일 패턴). - `data-model.md` 는 본 transport 전환의 직접 대상이 아니다(이벤트 페이로드/큐 스키마는 interface-contract 가 담는 편이 자연스러움). 추후 이벤트 페이로드가 entity 수준으로 안정화되면 별도 REQ 에서 data-model 갱신 여부 판단. ## Change Log ### CHG-20260605-01 - Date: 2026-06-05 - Author: Justin Ko #### Change Summary - dcy-006 FR-6 로부터 최초 생성(Proposed). #### Intent - transport 전환에 따른 baseline 3문서(interface-contract/runtime-flows/project-structure) 정합을 backlog 로 정규화. #### Acceptance Criteria Delta - Added: - 3 baseline 반영, 코드 정합, 변경 이력 기록, HTTP 잔존 0 (총 4개 기준) - Updated: - 없음 - Removed: - 없음 #### Impacted Area Delta - Docs: - docs/interface-contract.md, docs/runtime-flows.md, docs/project-structure.md - Modules: - 없음 - Tests: - 문서-코드 정합 점검 #### Delivery Trace Delta - Batches: - none - Releases: - none #### Revalidation Impact - Reverification Needed: no - Existing Implementation Invalidated: no - Status Recommendation: keep-current - Follow-up Action: confirm-req 후 REQ-021~025 와 동일 batch 편성 권장. #### Validation Plan - REQ-021~025 구현 후 3 baseline 문서를 코드와 대조해 정합 확인. ### CHG-20260605-02 - Date: 2026-06-05 - Author: Justin Ko #### Change Summary - Status 변경: Proposed -> Approved. confirm-req 승인 게이트 통과. #### Intent - messaging 레이어 baseline 3문서(interface-contract/runtime-flows/project-structure) 정합 요구사항을 delivery input 으로 승인. #### Acceptance Criteria Delta - Added/Updated/Removed: 없음 #### Impacted Area Delta - Docs/Modules/Tests: 없음 #### Delivery Trace Delta - Batches: - none - Releases: - none #### Revalidation Impact - Reverification Needed: no - Existing Implementation Invalidated: no - Status Recommendation: Approved - Follow-up Action: REQ-021~025 와 동일 batch 후반 또는 후속 batch 편성 권장. #### Validation Plan - 기존 Acceptance Criteria 로 batch delivery 에서 검증. ### CHG-20260605-03 - Date: 2026-06-05 - Author: Justin Ko #### Change Summary - Status 변경: Approved -> Implemented. BAT-007 release-candidate verification evidence 기반. #### Intent - messaging 레이어 baseline 3문서(interface-contract/runtime-flows/project-structure) 정합을 구현 완료 상태로 동기화. #### Acceptance Criteria Delta - Added/Updated/Removed: 없음 #### Impacted Area Delta - Docs/Modules/Tests: 없음 #### Delivery Trace Delta - Batches: - BAT-007 (release-candidate) - Releases: - none #### Revalidation Impact - Reverification Needed: no - Existing Implementation Invalidated: no - Status Recommendation: Implemented - Follow-up Action: release 단계는 별도 진행. #### Validation Plan - AC-1: 3 baseline 문서 messaging 섹션 + Interface Summary/Covered Entry Points/트리 반영 완료. - AC-2: baseline ↔ 코드 정합 manual review (BAT-007 verification.md Manual 섹션). - AC-3: 3 baseline 문서 Change Log 모두 2026-06-05 BAT-007 항목 추가. - AC-4: docs/interface-contract.md 의 HTTP `/v1` 섹션 제거 + project-structure 트리에서 adapters/api 제거. ### CHG-20260608-01 - Date: 2026-06-08 - Author: Justin Ko #### Change Summary - (change-req, dcy-016) baseline 문서를 운영자 CLI·RPC 매핑·워치독 억제 플래그에 맞춰 정합: `docs/interface-contract.md`(운영자 CLI↔RPC 매핑 표 + snapshot 요청 `touch_watchdog`/`actor` 플래그), `docs/runtime-flows.md`(운영자 CLI flow: 라우팅·워치독 억제·enter/exit 안전장치·실패 표시). BAT-020 정합 완료 → Implemented 유지. #### Intent - 코드(cli/messaging_handlers) 변경과 messaging baseline 문서를 일치시켜 운영자 참조 정합 유지. #### Acceptance Criteria Delta - Updated: - interface-contract/runtime-flows 의 CLI 명령·RPC 매핑·워치독 억제 기술 정합. #### Impacted Area Delta - Docs: docs/interface-contract.md, docs/runtime-flows.md #### Delivery Trace Delta - Batches: BAT-020 - Releases: none #### Revalidation Impact - Reverification Needed: no (문서 정합) - Existing Implementation Invalidated: no - Status Recommendation: Implemented (change-req → BAT-020 정합) - Follow-up Action: confirm-req-implemented(BAT-020). #### Validation Plan - BAT-020: 코드-문서 diff 대조.