docs(dcy-009): confirm-req-implemented — REQ-044/045 Implemented, bat-019 confirmed
머지 PR #16(7f15c6b) 반영. 사용자 read 엔드포인트 delivery 완료. REQ-045 env토큰 처리 200+empty로 문서 동기화(change-req).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHtM5Ws1HKCKQ4JGi6GRb5
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
# BAT-019 Index
|
# BAT-019 Index
|
||||||
|
|
||||||
- Status: in-delivery
|
- Status: confirmed
|
||||||
- Profile: standard
|
- Profile: standard
|
||||||
- Batch: BAT-019
|
- Batch: BAT-019
|
||||||
- Discovery: dcy-009
|
- Discovery: dcy-009
|
||||||
- Created: 2026-06-27
|
- Created: 2026-06-27
|
||||||
|
- Confirmed: 2026-06-27
|
||||||
|
- PR: #16 (main 머지, HEAD `7f15c6b`)
|
||||||
|
- QC: PASS (독립 qc-reviewer)
|
||||||
|
|
||||||
## Included REQ
|
## Included REQ
|
||||||
|
|
||||||
|
|||||||
+11
-6
@@ -1,7 +1,10 @@
|
|||||||
# BAT-019 Verification
|
# BAT-019 Verification
|
||||||
|
|
||||||
- Status: draft
|
- Status: confirmed
|
||||||
- Batch: BAT-019
|
- Batch: BAT-019
|
||||||
|
- Confirmed: 2026-06-27
|
||||||
|
- PR: #16 (main 머지, HEAD `7f15c6b`)
|
||||||
|
- QC: PASS (독립 qc-reviewer)
|
||||||
|
|
||||||
## Acceptance Mapping
|
## Acceptance Mapping
|
||||||
|
|
||||||
@@ -87,8 +90,10 @@ pytest 실행 원문 마지막 줄:
|
|||||||
|
|
||||||
## Result
|
## Result
|
||||||
|
|
||||||
- Ready for Release: false
|
- Ready for Release: true
|
||||||
- Blocking Issues:
|
- Blocking Issues: 없음
|
||||||
- 없음 (모든 AC 충족, 테스트 전체 통과)
|
- Verification Outcome: PASS
|
||||||
- DB 통합 테스트는 로컬 인프라 필요(비활성 환경) — mock 기반 커버로 대체
|
- 모든 AC 충족, 472 passed / 0 failed (2026-06-27)
|
||||||
- `confirm-batch-verification` 팀장 승인 대기
|
- QC 독립 검증 PASS
|
||||||
|
- PR #16 main 머지 완료 (HEAD `7f15c6b`)
|
||||||
|
- DB 통합 테스트는 로컬 인프라 필요(비활성 환경) — mock 기반 커버로 대체 (비차단)
|
||||||
|
|||||||
@@ -26,4 +26,4 @@
|
|||||||
| BAT-016 | standard | released | REQ-036, REQ-037, REQ-038 | dcy-006 | [bat-016](./bat-016_20260605_ledger-accounting-consolidation/) |
|
| BAT-016 | standard | released | REQ-036, REQ-037, REQ-038 | dcy-006 | [bat-016](./bat-016_20260605_ledger-accounting-consolidation/) |
|
||||||
| BAT-017 | standard | released | REQ-039, REQ-040, REQ-041, REQ-042 | dcy-007 | [bat-017](./bat-017_20260618_trade-history-and-pnl-api/) |
|
| BAT-017 | standard | released | REQ-039, REQ-040, REQ-041, REQ-042 | dcy-007 | [bat-017](./bat-017_20260618_trade-history-and-pnl-api/) |
|
||||||
| BAT-018 | batch-lite | release-candidate | REQ-043 | dcy-008 | [bat-018](./bat-018_20260625_holdings-cost-basis-endpoint/) |
|
| BAT-018 | batch-lite | release-candidate | REQ-043 | dcy-008 | [bat-018](./bat-018_20260625_holdings-cost-basis-endpoint/) |
|
||||||
| BAT-019 | standard | in-delivery | REQ-044, REQ-045 | dcy-009 | [bat-019](./bat-019_20260627_assets-read-permission-and-daemon-list/) |
|
| BAT-019 | standard | confirmed | REQ-044, REQ-045 | dcy-009 | [bat-019](./bat-019_20260627_assets-read-permission-and-daemon-list/) |
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# REQ-044: GET /v1/assets 권한 완화 — require_admin → require_read
|
# REQ-044: GET /v1/assets 권한 완화 — require_admin → require_read
|
||||||
|
|
||||||
- Status: Approved
|
- Status: Implemented
|
||||||
- Approved By: 팀장 (Claude), 2026-06-27 (confirm-req)
|
- Approved By: 팀장 (Claude), 2026-06-27 (confirm-req)
|
||||||
- Type: Interface
|
- Type: Interface
|
||||||
- Priority: High
|
- Priority: High
|
||||||
@@ -44,6 +44,43 @@
|
|||||||
|
|
||||||
## Change Log
|
## Change Log
|
||||||
|
|
||||||
|
### CHG-20260627-02
|
||||||
|
- Date: 2026-06-27
|
||||||
|
- Author: 팀장 (Claude)
|
||||||
|
|
||||||
|
#### Change Summary
|
||||||
|
- 상태 `Approved` → `Implemented` (confirm-req-implemented).
|
||||||
|
|
||||||
|
#### Intent
|
||||||
|
- BAT-019 PR #16이 main(`7f15c6b`)으로 머지 완료됨에 따라 구현·검증 완료를 공식화한다.
|
||||||
|
|
||||||
|
#### Acceptance Criteria Delta
|
||||||
|
- Added: 없음
|
||||||
|
- Updated: 없음
|
||||||
|
- Removed: 없음
|
||||||
|
|
||||||
|
#### Impacted Area Delta
|
||||||
|
- Docs: 상태 전환 기록만.
|
||||||
|
- Modules: 변경 없음.
|
||||||
|
- Tests: 변경 없음.
|
||||||
|
|
||||||
|
#### Delivery Trace Delta
|
||||||
|
- Batches: BAT-019
|
||||||
|
- PR: #16 (main 머지, HEAD `7f15c6b`)
|
||||||
|
- QC: PASS (독립 qc-reviewer)
|
||||||
|
- Releases: 미정
|
||||||
|
|
||||||
|
#### Revalidation Impact
|
||||||
|
- Reverification Needed: no
|
||||||
|
- Existing Implementation Invalidated: no
|
||||||
|
- Status Recommendation: Implemented
|
||||||
|
- Follow-up Action: 없음
|
||||||
|
|
||||||
|
#### Validation Plan
|
||||||
|
- BAT-019 verification.md Evidence — 472 passed, 0 failed (2026-06-27). AC-1~9 전부 PASS.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### CHG-20260627-01
|
### CHG-20260627-01
|
||||||
- Date: 2026-06-27
|
- Date: 2026-06-27
|
||||||
- Author: Justin Ko
|
- Author: Justin Ko
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# REQ-045: 사용자 가용 데몬 목록 read 엔드포인트 신설
|
# REQ-045: 사용자 가용 데몬 목록 read 엔드포인트 신설
|
||||||
|
|
||||||
- Status: Approved
|
- Status: Implemented
|
||||||
- Approved By: 팀장 (Claude), 2026-06-27 (confirm-req)
|
- Approved By: 팀장 (Claude), 2026-06-27 (confirm-req)
|
||||||
- Type: Interface
|
- Type: Interface
|
||||||
- Priority: High
|
- Priority: High
|
||||||
@@ -41,12 +41,51 @@
|
|||||||
## Notes
|
## Notes
|
||||||
- OQ-2(엔드포인트 경로·응답 스키마 형태): design 단계에서 기존 라우팅 컨벤션(`/v1/daemons` vs `/v1/users/me/daemons` 등)을 분석해 확정. 이 REQ에서는 경로를 확정하지 않으며 design Deferred. confirm-req 시 blocker 아님 — design 단계 위임 가능.
|
- OQ-2(엔드포인트 경로·응답 스키마 형태): design 단계에서 기존 라우팅 컨벤션(`/v1/daemons` vs `/v1/users/me/daemons` 등)을 분석해 확정. 이 REQ에서는 경로를 확정하지 않으며 design Deferred. confirm-req 시 blocker 아님 — design 단계 위임 가능.
|
||||||
- OQ-3("가용 데몬" 의미): 현재 기본안은 사용자 소유 데몬 전체(`find_candidate_daemons_for_user`). active 여부 필터링이 필요한지(소유 active 전체 vs 미바인딩 후보) design에서 확정. 이 REQ에서는 "caller 소유 데몬"으로만 명시하며 active 필터는 design 위임.
|
- OQ-3("가용 데몬" 의미): 현재 기본안은 사용자 소유 데몬 전체(`find_candidate_daemons_for_user`). active 여부 필터링이 필요한지(소유 active 전체 vs 미바인딩 후보) design에서 확정. 이 REQ에서는 "caller 소유 데몬"으로만 명시하며 active 필터는 design 위임.
|
||||||
- env 기반 token(`token_source="env"`)은 `user_id`가 None이다. 이 경우 `auth.user_id`가 없어 caller 스코프 적용이 불가 — design에서 env 토큰의 처리 방침(거부 vs 전체 반환)을 확정할 것. 기본안: DB 토큰만 허용(user_id 없으면 HTTP 403).
|
- env 기반 token(`token_source="env"`)은 `user_id`가 None이다. 이 경우 `auth.user_id`가 없어 caller 스코프 적용이 불가. **구현 확정(BAT-019 design/CHG-20260627-02): user_id=None이면 빈 목록 `[]` HTTP 200 반환.** 403 거부 대신 빈 목록으로 안전하게 처리하며, env토큰 호출자는 소유 데몬이 없는 것으로 간주한다. 초안의 "기본안: DB 토큰만 허용(user_id 없으면 HTTP 403)"은 폐기한다. 근거: BAT-019 design.md OQ-2 결정 + AC-4/verification evidence `test_daemons_admin_token_with_user_id_none_returns_empty` PASSED.
|
||||||
- NFR-1(기존 admin asset 관리·토큰 daemon 바인딩 회귀 0)은 AC-7 회귀 확인으로 흡수한다.
|
- NFR-1(기존 admin asset 관리·토큰 daemon 바인딩 회귀 0)은 AC-7 회귀 확인으로 흡수한다.
|
||||||
- NFR-2(caller 스코프 정확)는 AC-1/3/6으로 흡수한다.
|
- NFR-2(caller 스코프 정확)는 AC-1/3/6으로 흡수한다.
|
||||||
|
|
||||||
## Change Log
|
## Change Log
|
||||||
|
|
||||||
|
### CHG-20260627-02
|
||||||
|
- Date: 2026-06-27
|
||||||
|
- Author: 팀장 (Claude)
|
||||||
|
|
||||||
|
#### Change Summary
|
||||||
|
- 상태 `Approved` → `Implemented` (confirm-req-implemented) + Notes env토큰 처리 정정(change-req: "403 거부" → "빈 목록 200").
|
||||||
|
|
||||||
|
#### Intent
|
||||||
|
- BAT-019 PR #16이 main(`7f15c6b`)으로 머지 완료됨에 따라 구현·검증 완료를 공식화한다.
|
||||||
|
- QC가 지적한 문서(Notes: "user_id 없으면 HTTP 403")-구현(빈 목록 200) 불일치를 해소한다.
|
||||||
|
|
||||||
|
#### Acceptance Criteria Delta
|
||||||
|
- Added: 없음
|
||||||
|
- Updated: AC-4(데몬 없으면 빈 목록 200)는 env토큰(user_id=None) 케이스에도 적용됨을 명확히 함. AC 본문 변경 없음(이미 "해당 사용자에게 데몬이 없는 경우 빈 목록"으로 커버). Notes의 env토큰 처리 방침 기술 정정.
|
||||||
|
- Removed: Notes의 "기본안: DB 토큰만 허용(user_id 없으면 HTTP 403)" 폐기.
|
||||||
|
|
||||||
|
#### Impacted Area Delta
|
||||||
|
- Docs: REQ-045 Notes 내 env토큰 처리 기술 정정.
|
||||||
|
- Modules: 변경 없음 (구현은 이미 빈 목록 200으로 배포됨).
|
||||||
|
- Tests: 변경 없음 (`test_daemons_admin_token_with_user_id_none_returns_empty` PASSED — 이미 커버).
|
||||||
|
|
||||||
|
#### Delivery Trace Delta
|
||||||
|
- Batches: BAT-019
|
||||||
|
- PR: #16 (main 머지, HEAD `7f15c6b`)
|
||||||
|
- QC: PASS (독립 qc-reviewer, env토큰 문서-구현 불일치 지적 → 이번 change-req로 해소)
|
||||||
|
- Releases: 미정
|
||||||
|
|
||||||
|
#### Revalidation Impact
|
||||||
|
- Reverification Needed: no
|
||||||
|
- Existing Implementation Invalidated: no (구현은 이미 빈 목록 200, 문서만 맞춤)
|
||||||
|
- Status Recommendation: Implemented
|
||||||
|
- Follow-up Action: 없음
|
||||||
|
|
||||||
|
#### Validation Plan
|
||||||
|
- BAT-019 verification.md Evidence — 472 passed, 0 failed (2026-06-27). AC-1~7 전부 PASS.
|
||||||
|
- env토큰 케이스: `test_daemons_admin_token_with_user_id_none_returns_empty` PASSED.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### CHG-20260627-01
|
### CHG-20260627-01
|
||||||
- Date: 2026-06-27
|
- Date: 2026-06-27
|
||||||
- Author: Justin Ko
|
- Author: Justin Ko
|
||||||
|
|||||||
+3
-4
@@ -124,14 +124,13 @@
|
|||||||
| REQ-041 | WAC 기반 cost_basis 산출 및 실현 PnL 계산 로직 (service/domain 계층 격리) | Integration | Implemented | High | Justin Ko | [req-041](./Integration/req-041_wac-cost-basis-pnl-calculation.md) |
|
| REQ-041 | WAC 기반 cost_basis 산출 및 실현 PnL 계산 로직 (service/domain 계층 격리) | Integration | Implemented | High | Justin Ko | [req-041](./Integration/req-041_wac-cost-basis-pnl-calculation.md) |
|
||||||
| REQ-042 | 체결 내역/실현 PnL API 테스트 커버리지 (WAC 시나리오 기댓값 대조, 날짜 필터, 422) | Testing | Implemented | High | Justin Ko | [req-042](./Testing/req-042_trade-pnl-api-test-coverage.md) |
|
| REQ-042 | 체결 내역/실현 PnL API 테스트 커버리지 (WAC 시나리오 기댓값 대조, 날짜 필터, 422) | Testing | Implemented | High | Justin Ko | [req-042](./Testing/req-042_trade-pnl-api-test-coverage.md) |
|
||||||
| REQ-043 | GET /v1/portfolios/{id}/holdings/cost-basis 현재 보유 평단(WAC) read 엔드포인트 신설 | Interface | Implemented | High | Justin Ko | [req-043](./Interface/req-043_holdings-cost-basis-read-endpoint.md) |
|
| REQ-043 | GET /v1/portfolios/{id}/holdings/cost-basis 현재 보유 평단(WAC) read 엔드포인트 신설 | Interface | Implemented | High | Justin Ko | [req-043](./Interface/req-043_holdings-cost-basis-read-endpoint.md) |
|
||||||
| REQ-044 | GET /v1/assets 권한 완화 — require_admin → require_read | Interface | Approved | High | Justin Ko | [req-044](./Interface/req-044_get-v1-assets-require-read-relaxation.md) |
|
| REQ-044 | GET /v1/assets 권한 완화 — require_admin → require_read | Interface | Implemented | High | Justin Ko | [req-044](./Interface/req-044_get-v1-assets-require-read-relaxation.md) |
|
||||||
| REQ-045 | 사용자 가용 데몬 목록 read 엔드포인트 신설 | Interface | Approved | High | Justin Ko | [req-045](./Interface/req-045_user-daemon-list-endpoint.md) |
|
| REQ-045 | 사용자 가용 데몬 목록 read 엔드포인트 신설 | Interface | Implemented | High | Justin Ko | [req-045](./Interface/req-045_user-daemon-list-endpoint.md) |
|
||||||
|
|
||||||
## Recent Change Log Summary
|
## Recent Change Log Summary
|
||||||
|
|
||||||
|
- 2026-06-27: REQ-044/045 `Approved` → `Implemented` — BAT-019 PR #16 main 머지(`7f15c6b`) QC PASS. 472 passed/0 failed. REQ-045 env토큰(user_id=None) 처리 Notes 정정: "HTTP 403" → "빈 목록 [] HTTP 200"(change-req CHG-20260627-02).
|
||||||
- 2026-06-27: REQ-044/045 신규 (Proposed) — dcy-009 FR-1(GET /v1/assets require_read 완화)·FR-2(사용자 가용 데몬 목록 엔드포인트 신설) REQ 초안 작성. 엔드포인트 경로·스키마(OQ-2) 및 가용 데몬 의미(OQ-3)는 design Deferred.
|
- 2026-06-27: REQ-044/045 신규 (Proposed) — dcy-009 FR-1(GET /v1/assets require_read 완화)·FR-2(사용자 가용 데몬 목록 엔드포인트 신설) REQ 초안 작성. 엔드포인트 경로·스키마(OQ-2) 및 가용 데몬 의미(OQ-3)는 design Deferred.
|
||||||
- 2026-06-26: REQ-041 WAC 공식 change-req(CHG-20260626-01) — 매수 수수료 cost basis 편입(사장님 결정). 신 공식: `running_wac = (running_wac*qty + price*qty + buy_fee) / new_total_qty`. `calculate_realized_pnl`과 `calculate_current_wac` 양 함수 적용. AC-9/AC-10 추가. 신규 테스트 9개 포함 456 passed / 0 failed. REQ-040/REQ-043 Notes 참조 갱신.
|
- 2026-06-26: REQ-041 WAC 공식 change-req(CHG-20260626-01) — 매수 수수료 cost basis 편입(사장님 결정). 신 공식: `running_wac = (running_wac*qty + price*qty + buy_fee) / new_total_qty`. `calculate_realized_pnl`과 `calculate_current_wac` 양 함수 적용. AC-9/AC-10 추가. 신규 테스트 9개 포함 456 passed / 0 failed. REQ-040/REQ-043 Notes 참조 갱신.
|
||||||
- 2026-06-26: REQ-043 `Approved` → `Implemented` — BAT-018 PR #14 squash-merge(d93c0bc) 팀장 QC PASS 후 origin/main 머지 완료. AC-1~11 전부 PASS(447 passed / 0 failed). 배포 별도(release-candidate).
|
- 2026-06-26: REQ-043 `Approved` → `Implemented` — BAT-018 PR #14 squash-merge(d93c0bc) 팀장 QC PASS 후 origin/main 머지 완료. AC-1~11 전부 PASS(447 passed / 0 failed). 배포 별도(release-candidate).
|
||||||
- 2026-06-25: REQ-043 `Proposed` → `Approved` (confirm-req 팀장 승인) — dcy-008 근거 Discovery 양방향 링크 확정. OQ-1(service token 소유권 blocker) 해소: cold-start는 `managed_by_daemon_id=daemon` 포트폴리오만 조회하므로 null 케이스 blocker 아님, daemon scope 소유권 정책(REQ-029 선례) 유지 확정. OQ-2(domain 함수) 구현 단계 재량 위임. AC-1~11 유지.
|
- 2026-06-25: REQ-043 `Proposed` → `Approved` (confirm-req 팀장 승인) — dcy-008 근거 Discovery 양방향 링크 확정. OQ-1(service token 소유권 blocker) 해소: cold-start는 `managed_by_daemon_id=daemon` 포트폴리오만 조회하므로 null 케이스 blocker 아님, daemon scope 소유권 정책(REQ-029 선례) 유지 확정. OQ-2(domain 함수) 구현 단계 재량 위임. AC-1~11 유지.
|
||||||
- 2026-06-25: REQ-043 신규 (Proposed) — trex-core dcy-034 cold-start 평단 seed(FR-7) 선행 의존으로 draft-req 실행. GET /v1/portfolios/{id}/holdings/cost-basis 현재 보유 WAC read 엔드포인트 신설(Interface). OQ-1=service token 소유권 정책(daemon_id 일치 여부), OQ-2=domain 함수 확장 vs 신규 분리 — confirm-req에서 결정 필요.
|
|
||||||
- 2026-06-18: REQ-039/040/041/042 `Approved` → `Implemented` (BAT-017 release-candidate, 독립 QC PASS-WITH-NOTES, 50 passed/전체 427 회귀없음, WAC 199,300 검증). 잔여 비차단: symbol 필터 edge 테스트·HTTP_422 deprecated.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user