docs(req): dcy-008 kill-switch confirm-discovery + REQ-043~047 (Approved)

dcy-008(비상 정지/kill-switch) OQ-2(별도 테이블/store)·OQ-4(수동 해제
resume_kill_switch) 결정 → confirm-discovery(confirmed) → draft-req →
confirm-req(5개 Approved).

- REQ-043 (Interface): trex.pause.req → trex.control.req 제어 채널 + action dispatch (OQ-1)
- REQ-044 (Data): day-scoped killswitch_exclusion 테이블 + store + 005 마이그레이션 (OQ-2)
- REQ-045 (Interface): kill_switch 실행 — 범위별 holding 순차 sell() + idempotency + 이력 (NFR-1/2 흡수)
- REQ-046 (Interface): 당일 제외 masking + 다음 거래일 자동복귀 + resume_kill_switch (OQ-4, NFR-3 흡수)
- REQ-047 (Documentation): baseline 3문서 정합

OQ-3(pending_buy 롤백)은 REQ Deferred. srs index Next ID REQ-048, Register +5,
요약 갱신. dcy-008 생성된 REQ 참조 기록.

dcy-009(멀티 인스턴스 RabbitMQ, draft)는 별도 주제로 제외.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 11:29:31 +09:00
co-authored by Claude Opus 4.8
parent 6fda381f62
commit c912c08071
8 changed files with 638 additions and 45 deletions
@@ -0,0 +1,113 @@
# req-047: kill-switch baseline 문서 정합
- Status: Approved
- Type: Documentation
- Priority: Medium
- Owner: project maintainers
## Intent
dcy-008(비상 정지/kill-switch) 기능(REQ-043~046)의 구현 완료 후 `docs/interface-contract.md`, `docs/runtime-flows.md`, `docs/project-structure.md` 세 baseline 문서를 최신 아키텍처와 정합시킨다.
## Requirement
- `docs/interface-contract.md` 에 아래를 반영한다:
- `trex.pause.req` → `trex.control.req` 제어 채널 확장 + action 목록(`pause`/`resume`/`list`/`kill_switch`/`resume_kill_switch`) (REQ-043)
- `kill_switch` payload(`scope`, `portfolio_id?`)/응답(`liquidated`) 계약 (REQ-045)
- `resume_kill_switch` payload/응답 계약 (REQ-046)
- snapshot masking 소스에 "kill-switch 당일 제외" 추가 명시 (REQ-046)
- `docs/runtime-flows.md` 에 아래 흐름을 추가한다:
- kill-switch 발동 흐름(control RPC → 범위별 holding 순차 sell() → 당일 제외 표시) (REQ-045)
- 당일 제외 masking / 다음 거래일 자동 복귀 / 수동 resume 흐름 (REQ-046)
- `docs/project-structure.md` 에 아래를 반영한다:
- control consumer(`trex.control.req`) 로의 전환 (REQ-043)
- 신규 `killswitch_exclusion` 테이블 + `005_create_killswitch_exclusion.sql` + kill-switch store 모듈 (REQ-044)
## Acceptance Criteria
1. Given `docs/interface-contract.md` 를 읽을 때, When 제어 채널을 찾으면, Then `trex.control.req` + action 목록(kill_switch/resume_kill_switch 포함)이 명시되어 있다.
2. Given `docs/interface-contract.md` 를 읽을 때, When kill_switch/resume_kill_switch 를 찾으면, Then payload(scope/portfolio_id)와 응답 구조가 명시되어 있다.
3. Given `docs/runtime-flows.md` 를 읽을 때, When kill-switch 관련 흐름을 찾으면, Then 발동(순차 sell()+당일 제외)·masking·자동 복귀·수동 resume 흐름이 서술되어 있다.
4. Given `docs/project-structure.md` 를 읽을 때, When 제어 채널/저장소를 찾으면, Then control consumer 전환 + `killswitch_exclusion` 테이블/store + `005_*.sql` 이 반영되어 있다.
## Impacted Area
- Docs:
- `docs/interface-contract.md`
- `docs/runtime-flows.md`
- `docs/project-structure.md`
- Modules: 없음 (문서 전용)
- Tests: 없음
## Notes
- 이 REQ 는 REQ-043~046 구현 완료 후 batch verification 단계에서 최신 구현 상태를 반영해 수행한다(REQ-042 선례).
- baseline 문서가 없는 갭이 아니라 기존 baseline 갱신이므로 `bootstrap-baseline` 선행 불필요.
## Change Log
### CHG-20260607-01
- Date: 2026-06-07
- Author: Justin Ko
#### Change Summary
- dcy-008(confirmed) → REQ-047 초안 생성.
#### Intent
- kill-switch 구현 후 세 baseline 문서 정합을 Documentation REQ 로 정규화.
#### Acceptance Criteria Delta
- Added: AC-1~4 전체
#### Impacted Area Delta
- Docs: interface-contract.md, runtime-flows.md, project-structure.md
#### 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-043~046 구현 batch 이후 연계).
### CHG-20260607-02
- Date: 2026-06-07
- Author: Justin Ko
#### Change Summary
- Proposed → Approved (confirm-req).
#### Intent
- 승인 게이트 통과: 필수 필드·구체 AC(1~4)·Impacted Area·Change Log 완비. baseline 정합 문서 REQ로 REQ-043~046 구현 후 verification 단계 수행 예정. 범위와 모순 없음.
#### Acceptance Criteria Delta
- (변경 없음)
#### Impacted Area Delta
- (변경 없음)
#### Delivery Trace Delta
- Batches: none (미할당)
- Releases: none
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: keep-current
- Follow-up Action: suggest-batch-reqs / draft-batch 로 delivery 편성(REQ-043~046 이후 연계).