feat: add portfolio item symbol to v1 responses

This commit is contained in:
2026-05-24 13:09:37 +09:00
parent 3a78e5c138
commit 136ae16885
17 changed files with 655 additions and 11 deletions
@@ -13,6 +13,7 @@
- `docs/interface-contract.md` 갱신:
- `/v1/portfolios*` 라우트 명세 추가: POST(REQ-025), PATCH(REQ-026), DELETE(REQ-027), GET(REQ-028), `/ledger/trades`(REQ-029), `/tags`(REQ-030), `/comments`(REQ-031)
- 각 라우트의 토큰 분기 규칙(`token_type ∈ {service, client}` 거부 + `permission` 기준 분기) 일관 명시
- `PortfolioItem` 응답 예시에 `symbol` 필드를 포함하고, 특히 `GET /v1/portfolios` 는 `portfolios JOIN assets` 기반 응답으로 `assets.symbol` 을 노출한다는 점을 명시
- 구 path `POST /v1/assets/{asset_id}/ledger/trades` 제거 + 동일 batch release 정책 명시
- `GET /v1/assets`는 dcy-001 FR-2 admin catalog 조회 전용으로 의미 복원 (REQ-013 Deprecated 정합)
- daemon authorization model 갱신 (3단계 fail-closed)
@@ -36,6 +37,7 @@
4. Given `grep -n "soft delete\|status='disabled'\|disabled" docs/data-model.md`, When 본 REQ 구현 후, Then Portfolio.status='disabled' 의미와 의존 데이터 보존 정책이 반영된다.
5. Given `grep -n "v1_portfolios.py" docs/project-structure.md`, When 본 REQ 구현 후, Then 신규 라우터 파일이 명시된다.
6. Given 사람 리뷰, When baseline 4종 문서를 점검, Then REQ-025~031의 v1 portfolio mutation 정책과 충돌하는 잔재가 없다.
7. Given `grep -n "symbol" docs/interface-contract.md`, When 본 REQ 구현 후, Then `PortfolioItem` 기반 POST/PATCH/DELETE/GET `/v1/portfolios` 응답 설명에 `symbol` 필드가 명시되고 GET 항목은 joined asset result 설명을 포함한다.
## Impacted Area
- Docs:
@@ -57,6 +59,64 @@
## Change Log
### CHG-20260524-02
- Date: 2026-05-24
- Author: Hermes Agent
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-014 verification 완료. `docs/interface-contract.md` 에 portfolio CRUD/list 응답의 `symbol` 필드와 GET join 기반 응답 설명이 반영되어 REQ-032 augmentation 범위가 충족되었다.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches: BAT-014 (release-candidate); BAT-010 interface-contract evidence superseded by BAT-014
- Releases: pending
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: promote-to-implemented
- Follow-up Action: release 단계 전 추가 baseline drift 점검
### CHG-20260524-01
- Date: 2026-05-24
- Author: Hermes Agent
#### Change Summary
- portfolio v1 baseline 문서에 `PortfolioItem.symbol` 및 GET `/v1/portfolios` asset-join 응답 계약 반영이 필요해 REQ-032를 augment 하고 상태를 Implemented → Approved로 되돌림.
#### Intent
- trex-orbit 팀 요청으로 CRUD/list portfolio 응답 계약이 `symbol` 포함 형태로 확장되었다. baseline 문서가 이를 반영하지 않으면 구현 후에도 API source of truth가 stale 해지므로, interface-contract/runtime 설명의 후속 갱신을 별도 delivery trace로 강제한다.
#### Acceptance Criteria Delta
- Added:
- AC-7: baseline 문서에 `symbol` 필드 및 GET join 기반 응답 설명이 존재해야 함
#### Impacted Area Delta
- Docs: `docs/interface-contract.md` (필수), 필요 시 `docs/runtime-flows.md` 의 GET `/v1/portfolios` 설명 보강
- Modules: 없음
- Tests: 없음 (문서 grep + 사람 리뷰)
#### Delivery Trace Delta
- Batches: BAT-010 evidence partially superseded; follow-up BAT-014 예정
- Releases: REL-001 baseline evidence 일부 재검토 필요
#### Revalidation Impact
- Reverification Needed: yes
- Existing Implementation Invalidated: yes (baseline documentation evidence partial)
- Status Recommendation: revert-to-approved
- Follow-up Action: BAT-014에서 interface-contract 예시와 설명 갱신 후 재검증
#### Validation Plan
- `docs/interface-contract.md` 에서 POST/PATCH/DELETE/GET `/v1/portfolios` 응답 설명과 예시에 `symbol` 이 추가됐는지, GET 섹션에 joined asset result 설명이 있는지 grep + 사람 리뷰로 확인한다.
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko