feat: REQ-001~018 Implemented 전환, REQ-010 GET /v1/assets admin catalog 재정의, REL-001 draft

- confirm-req-implemented: REQ-001~018 (17건, REQ-013 제외) Approved → Implemented
  - BAT-001(REQ-009/011/014), BAT-002(REQ-010/012/015), BAT-003(REQ-001/002/003/006)
  - BAT-004(REQ-004/005), BAT-005(REQ-007/008), BAT-006(REQ-016/017/018)
  - CHG-20260521-01 entry 각 REQ에 추가; SRS index Recent Change Log 갱신

- REQ-010 CHG-20260521-02: GET /v1/assets admin catalog 전용 재정의
  - 기존 token_type 분기 portfolio 조회 코드 제거, admin permission + list_assets() 호출로 대체
  - AssetCatalogListResponse 스키마 추가 (items/total)
  - REQ-010 Status: Implemented → Approved (재검증 필요)
  - 테스트 343건 전체 통과: service/user token 403, admin token 200 + catalog schema 검증

- migration 보강: portfolios_asset_migration market 컬럼 부재 fallback,
  portfolio_tags 빈 테이블 early-return, service_token index fix autocommit_block 정리

- docs/releases/rel-001: REL-001 draft 추가 (BAT-001~011 포함)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 10:17:39 +00:00
co-authored by Claude Sonnet 4.6
parent 4bf6b554a7
commit 6add0ade29
28 changed files with 894 additions and 393 deletions
+29 -1
View File
@@ -1,6 +1,6 @@
# REQ-001: tags 마스터 테이블 도입
- Status: Approved
- Status: Implemented
- Type: Data
- Priority: High
- Owner: Justin Ko
@@ -39,6 +39,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-003 confirm-batch-verification 완료. tags 마스터 테이블 스키마, is_admin_tag 스냅샷 동작 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-003
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
+29 -1
View File
@@ -1,6 +1,6 @@
# REQ-002: assets.tag_ids UUID[] 컬럼 추가
- Status: Approved
- Status: Implemented
- Type: Data
- Priority: High
- Owner: Justin Ko
@@ -38,6 +38,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-003 confirm-batch-verification 완료. portfolios.tag_ids UUID[] 컬럼, GIN 인덱스, archived 표시 동작 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-003
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-003: portfolios.tag_ids UUID[] 컬럼 추가 및 portfolio_tags 테이블 제거
- Status: Approved
- Status: Implemented
- Type: Data
- Priority: High
- Owner: Justin Ko
@@ -38,6 +38,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-003 confirm-batch-verification 완료. portfolios.tag_ids, GIN 인덱스, portfolio_tags 테이블 제거, archived 표시 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-003
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
+29 -1
View File
@@ -1,6 +1,6 @@
# REQ-009: assets 테이블 스키마 도입
- Status: Approved
- Status: Implemented
- Type: Data
- Priority: High
- Owner: Justin Ko
@@ -43,6 +43,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-001 confirm-batch-verification 완료. assets 테이블 스키마·GIN 인덱스·MarketCode Enum 검증 통과. DB-integration ACs는 실 DB 의존 — CI에서 migration 파일 구조 검증으로 대체, release 배포 시 최종 확인 예정.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-001
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: REL-001 배포 시 alembic upgrade 결과로 DB-integration AC 최종 확인
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-011: portfolios 테이블 asset_id FK 추가 및 symbol/market 제거
- Status: Approved
- Status: Implemented
- Type: Data
- Priority: High
- Owner: Justin Ko
@@ -50,6 +50,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-001 confirm-batch-verification 완료. portfolios.asset_id FK, symbol/market 컬럼 제거, 기존 조회 API 회귀 없음 확인. DB-integration ACs는 실 DB 의존 — release 배포 시 최종 확인 예정.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-001
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: REL-001 배포 시 alembic upgrade 결과로 DB-integration AC 최종 확인
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-008: 태그 모델 도입 baseline 문서 갱신
- Status: Approved
- Status: Implemented
- Type: Documentation
- Priority: Low
- Owner: Justin Ko
@@ -38,6 +38,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-005 confirm-batch-verification 완료. data-model/interface-contract/project-structure/runtime-flows 4개 문서 tags 모델 반영 확인. 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-005
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-015: asset catalog 도입 baseline 문서 갱신
- Status: Approved
- Status: Implemented
- Type: Documentation
- Priority: Low
- Owner: Justin Ko
@@ -37,6 +37,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-002 confirm-batch-verification 완료. data-model/interface-contract/runtime-flows/project-structure 4개 문서 asset catalog 반영 확인. 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-002
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
+29 -1
View File
@@ -1,6 +1,6 @@
# REQ-004: tags 마스터 HTTP API
- Status: Approved
- Status: Implemented
- Type: Interface
- Priority: High
- Owner: Justin Ko
@@ -48,6 +48,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-004 confirm-batch-verification 완료. POST/GET /v1/tags, PATCH /v1/tags/{id}/deactivate 권한 분기·소문자 정규화·멱등성 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-004
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-005: 태그 적용·해제 HTTP API
- Status: Approved
- Status: Implemented
- Type: Interface
- Priority: High
- Owner: Justin Ko
@@ -48,6 +48,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-004 confirm-batch-verification 완료. asset/portfolio 태그 적용·해제 HTTP API 정책 검증·403/404 분기 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-004
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
+29 -1
View File
@@ -1,6 +1,6 @@
# REQ-007: pfhub tag CLI 명령어
- Status: Approved
- Status: Implemented
- Type: Interface
- Priority: Medium
- Owner: Justin Ko
@@ -47,6 +47,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-005 confirm-batch-verification 완료. pfhub tag create/list/deactivate/apply/remove CLI 모든 AC 검증 통과. 기존 pfhub portfolio tag add/list/remove 제거 확인.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-005
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -17,7 +17,8 @@
- HTTP API: `POST /v1/assets` — admin token 필요. request body에 symbol, markets, display_name. 성공 시 HTTP 201 + 생성된 asset 반환.
- HTTP API: `PATCH /v1/assets/{asset_id}` — admin token 필요. markets, display_name 변경 가능. 성공 시 HTTP 200 + 갱신된 asset 반환.
- HTTP API: `PATCH /v1/assets/{asset_id}/deactivate` — admin token 필요. `status='inactive'`로 변경. 성공 시 HTTP 200.
- admin 이외의 token으로 POST/PATCH 요청 시 HTTP 403을 반환한다.
- HTTP API: `GET /v1/assets` — admin token 필요. query param `status` (active|inactive|all, 기본 `active`), `market` (선택, MarketCode 1개). 응답: `{ items: [{ asset_id, symbol, markets, display_name, status, created_at, updated_at }] }` 형식. 응답 본문에 portfolio 관련 필드는 포함하지 않는다(path 의미 분리 — portfolio 조회는 `GET /v1/portfolios`).
- admin 이외의 token으로 POST/PATCH/GET 요청 시 HTTP 403을 반환한다.
- asset hard DELETE는 제공하지 않는다(soft delete 전용).
- `app/cli/commands/asset.py` 신규 파일로 pfhub asset 커맨드 그룹을 구현한다.
- `app/cli/main.py`에 `app.add_typer(asset_app, name="asset")`을 추가한다.
@@ -32,28 +33,104 @@
6. Given admin 토큰, When `PATCH /v1/assets/{asset_id}` with updated markets, Then HTTP 200과 변경된 asset이 반환된다.
7. Given admin 토큰, When `PATCH /v1/assets/{asset_id}/deactivate`, Then HTTP 200과 status='inactive'가 반환된다.
8. Given non-admin token (user 또는 service token), When `POST /v1/assets` 요청, Then HTTP 403이 반환된다.
9. Given admin 토큰 + active/inactive asset 혼재, When `GET /v1/assets`, Then HTTP 200 + status='active' 항목만 포함된 `{items: [...]}` 응답. 각 item은 `asset_id, symbol, markets, display_name, status, created_at, updated_at` 필드만 포함하고 portfolio 관련 필드(`portfolio_id`, `owner_user_id`, `cash_balance` 등)는 포함하지 않는다.
10. Given admin 토큰 + active/inactive asset 혼재, When `GET /v1/assets?status=all`, Then 두 상태 모두 포함; `GET /v1/assets?status=inactive`, Then inactive만 포함.
11. Given admin 토큰 + 서로 다른 markets 값을 가진 asset 다수, When `GET /v1/assets?market=KRX`, Then `markets`에 `KRX`가 포함된 asset만 응답된다.
12. Given non-admin token (read/trade-write 권한 또는 service token), When `GET /v1/assets`, Then HTTP 403이 반환된다.
## Impacted Area
- Docs:
- docs/project-structure.md — `app/cli/` Command groups에 `asset` 추가 (REQ-015에서 처리)
- docs/interface-contract.md — POST/PATCH /v1/assets 엔드포인트 명세 추가 (REQ-015에서 처리)
- docs/interface-contract.md — POST/PATCH/GET /v1/assets 엔드포인트 명세 추가 (CHG-20260521-02에서 GET 추가; 후속 docs sync 필요 시 별도 REQ)
- Modules:
- `app/cli/commands/asset.py` — 신규 파일, pfhub asset 커맨드 그룹
- `app/cli/main.py` — `app.add_typer(asset_app, name="asset")` 추가
- `app/services/` — asset create/update/deactivate/list 서비스 메서드 추가
- `app/api/v1_assets.py` — POST, PATCH 라우트 추가
- `app/schemas/` — `CreateAssetRequest`, `UpdateAssetRequest`, `AssetCatalogResponse` 스키마 추가
- `app/api/v1_assets.py` — POST, PATCH 라우트 추가; GET /v1/assets 라우트는 admin catalog 조회로 재정의(기존 token_type 분기 portfolio 조회 코드 제거)
- `app/schemas/v1.py` — `CreateAssetRequest`, `UpdateAssetRequest`, `AssetCatalogItem`, `AssetCatalogListResponse` 스키마 추가
- Tests:
- `tests/test_asset_catalog.py` (신규) — admin CRUD CLI/API AC 검증, non-admin 403 검증
- `tests/test_asset_catalog.py` (신규) — admin CRUD CLI/API AC 검증, non-admin 403 검증, GET /v1/assets AC-9~12 검증
- `tests/test_v1.py` (기존) — GET /v1/assets에 portfolio 응답을 기대하는 케이스가 있다면 GET /v1/portfolios로 이전 또는 catalog 응답 schema로 갱신
## Notes
- `pfhub asset list`의 HTTP 대응(catalog 전용 GET): dcy-003 옵션 B(path 명명 분리) 결정에 따라 REQ-013(GET /v1/assets 포트폴리오 조회)이 Deprecated(2026-05-20) 처리되어 path 충돌 우려가 해소됨. **`GET /v1/assets`는 admin catalog 조회 전용**으로 본 REQ에서 다루며, dcy-001 batch design 단계에서 본 REQ에 GET 명세를 보강(change-req)하거나 별도 신규 REQ로 분리한다. 포지션 조회 `GET /v1/portfolios`는 dcy-003의 별도 신규 REQ로 분리 예정.
- `pfhub asset list`의 HTTP 대응(catalog 전용 GET): dcy-003 옵션 B(path 명명 분리) 결정에 따라 REQ-013(GET /v1/assets 포트폴리오 조회)이 Deprecated(2026-05-20) 처리되어 path 충돌 우려 해소. **`GET /v1/assets`는 admin catalog 조회 전용**으로 본 REQ에서 다룬다(2026-05-21 CHG-20260521-02로 augmentation 적용). 포지션 조회 `GET /v1/portfolios`는 REQ-028에서 분리 구현됨.
- deactivate 후 해당 asset을 참조하는 기존 portfolio는 보존된다. 신규 portfolio 생성만 거부(REQ-012에서 처리).
- REQ-009 선행 필요.
- Source: dcy-001 FR-2, NFR-3
- Source: dcy-001 FR-2, NFR-3; CHG-20260521-02 augmentation는 dcy-003 옵션 B (REQ-013 Deprecation) 후속 작업.
## Change Log
### CHG-20260521-02
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Implemented → Approved (REL-001 smoke 검증에서 GET /v1/assets가 dcy-001 시점 portfolio 조회 코드를 유지 중인 불일치 확인. 본 REQ Notes의 1순위 경로(REQ-010 augmentation)에 따라 GET 명세를 추가하고 기존 구현을 재정의.)
#### Intent
- dcy-003 옵션 B로 REQ-013 Deprecated 후 본 REQ Notes에 명시된 "GET /v1/assets는 admin catalog 조회 전용" 재정의가 미구현 상태로 잔존. REL-001 배포 직전 로컬 smoke([rel-001.md:50](../../releases/rel-001_20260521_v1-api-full-surface.md#L50))에서 admin session token → HTTP 403 "Unsupported token type" 발생으로 release 체크리스트와 코드 상태 불일치 확인. 본 augmentation으로 GET /v1/assets를 admin catalog 조회로 재정의해 path 분리 정책(dcy-003 옵션 B)을 코드에 반영.
#### Acceptance Criteria Delta
- Added:
- AC-9 (admin token GET 200 + asset catalog 응답)
- AC-10 (`status=all`/`status=inactive` 필터)
- AC-11 (`market=<code>` 필터)
- AC-12 (non-admin token → HTTP 403)
- 기존 AC-1~8: 변경 없음.
#### Impacted Area Delta
- Modules added:
- `app/api/v1_assets.py` — GET /v1/assets 라우트를 portfolio 조회에서 asset catalog 조회로 재정의 (token_type 분기 제거, admin permission 검증 + `list_assets` 호출)
- `app/schemas/v1.py` — `AssetCatalogItem`, `AssetCatalogListResponse` 신규 schema
- Tests added/updated:
- `tests/test_asset_catalog.py` — GET /v1/assets AC-9~12 검증 신규 케이스 (기존 portfolio 조회 의미의 GET /v1/assets 테스트가 있다면 제거/대체)
- `tests/test_v1.py` — 기존 GET /v1/assets 호출 패턴이 portfolio 응답을 기대한다면 GET /v1/portfolios로 이전 또는 응답 schema 변경 반영
- Repository:
- `app/repositories/postgres.py` — `list_assets` 메서드가 이미 존재하면 재사용; 없으면 보강
#### Delivery Trace Delta
- Batches:
- BAT-002 (asset-catalog-api-completion) — augmentation 누적, verification 재실행 필요
- Releases:
- REL-001 — scope 잔존, 본 augmentation 포함 (`docs/releases/rel-001_20260521_v1-api-full-surface.md`)
#### Revalidation Impact
- Reverification Needed: yes
- Existing Implementation Invalidated: yes (기존 GET /v1/assets portfolio 조회 동작이 제거됨)
- Status Recommendation: revert-to-approved
- Follow-up Action: 구현 → pytest 회귀 → 로컬 smoke 재실행 → confirm-req-implemented 재진입
#### Validation Plan
- pytest로 AC-9~12 검증; 로컬 smoke로 admin session token + GET /v1/assets → HTTP 200 + asset catalog 응답 확인
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-002 confirm-batch-verification 완료. admin asset catalog CRUD CLI/HTTP API(POST/PATCH/deactivate), non-admin 403 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-002
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-012: portfolio 생성 CLI catalog 검증
- Status: Approved
- Status: Implemented
- Type: Interface
- Priority: High
- Owner: Justin Ko
@@ -36,6 +36,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-002 confirm-batch-verification 완료. pfhub portfolio create --asset-id/--symbol catalog 검증(존재·비활성 거부) 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-002
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-016: client token 발급 경로 코드 폐지
- Status: Approved
- Status: Implemented
- Type: Interface
- Priority: High
- Owner: Justin Ko
@@ -40,6 +40,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-006 confirm-batch-verification 완료. client token 발급 경로(POST /auth/tokens, issue_client_token) 코드 제거, HTTP 404 확인, token_type 게이트 회귀 없음 확인(AC-1/2/4). AC-3(release 직전 DATA-1 재확인)은 운영 릴리즈 단계에서 evidence 수집 예정.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-006
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: REL-001 배포 직전 DATA-1 SELECT COUNT 재확인(AC-3) evidence를 release execution evidence에 첨부
### CHG-20260520-02
- Date: 2026-05-20
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-018: POST /auth/service-tokens body daemon_id forward 보정
- Status: Approved
- Status: Implemented
- Type: Interface
- Priority: High
- Owner: Justin Ko
@@ -38,6 +38,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-006 confirm-batch-verification 완료. POST /auth/service-tokens daemon_id forward 1-line 보정 구현. HTTP/CLI daemon binding 동등성, non-existing daemon 4xx 분기 모든 AC 검증 통과.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-006
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: none
### CHG-20260520-02
- Date: 2026-05-20
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-006: portfolio_tags 데이터 마이그레이션
- Status: Approved
- Status: Implemented
- Type: Migration
- Priority: High
- Owner: Justin Ko
@@ -44,6 +44,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-003 confirm-batch-verification 완료. portfolio_tags → tags 마스터 데이터 마이그레이션 Alembic revision 구현. DB-integration AC(1~6)는 실 DB 의존 — CI에서 migration 파일 구조 검증으로 대체, release 배포 시 alembic upgrade head로 최종 확인 예정.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-003
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: REL-001 배포 시 alembic upgrade 결과로 DB-integration AC 최종 확인
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-014: portfolios 데이터 migration
- Status: Approved
- Status: Implemented
- Type: Migration
- Priority: High
- Owner: Justin Ko
@@ -43,6 +43,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-001 confirm-batch-verification 완료. portfolios → assets catalog 데이터 이전 Alembic revision 구현. DB-integration ACs(1~6)는 실 DB 의존 — CI에서 migration 파일 구조 검증으로 대체, release 배포 시 alembic upgrade head로 최종 확인 예정.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-001
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: REL-001 배포 시 alembic upgrade 결과로 DB-integration AC 최종 확인
### CHG-20260519-02
- Date: 2026-05-19
- Author: Justin Ko
@@ -1,6 +1,6 @@
# REQ-017: service-token rotate unique index 보강
- Status: Approved
- Status: Implemented
- Type: Migration
- Priority: High
- Owner: Justin Ko
@@ -41,6 +41,34 @@
## Change Log
### CHG-20260521-01
- Date: 2026-05-21
- Author: Justin Ko
#### Change Summary
- Status: Approved → Implemented
#### Intent
- BAT-006 confirm-batch-verification 완료. idx_auth_tokens_service_name_unique partial index 조건 `AND revoked_at IS NULL` 보강 Alembic revision + ensure_schema() 갱신 구현. AC-1~3/5(실 DB issue/rotate 시퀀스 및 staging lock 검증)는 실 DB 의존 — release 배포 시 최종 확인 예정.
#### Acceptance Criteria Delta
- No change
#### Impacted Area Delta
- No change
#### Delivery Trace Delta
- Batches:
- BAT-006
- Releases:
- REL-001
#### Revalidation Impact
- Reverification Needed: no
- Existing Implementation Invalidated: no
- Status Recommendation: implemented
- Follow-up Action: REL-001 배포 시 실 DB에서 issue → rotate 시퀀스로 AC-1~3 최종 확인
### CHG-20260520-02
- Date: 2026-05-20
- Author: Justin Ko
+18 -23
View File
@@ -81,24 +81,24 @@
| ID | Title | Type | Status | Priority | Owner | Link |
| --- | --- | --- | --- | --- | --- | --- |
| REQ-001 | tags 마스터 테이블 도입 | Data | Approved | High | Justin Ko | [req-001](./Data/req-001_tags-master-table.md) |
| REQ-002 | assets.tag_ids UUID[] 컬럼 추가 | Data | Approved | High | Justin Ko | [req-002](./Data/req-002_assets-tag-ids-column.md) |
| REQ-003 | portfolios.tag_ids UUID[] 컬럼 추가 및 portfolio_tags 테이블 제거 | Data | Approved | High | Justin Ko | [req-003](./Data/req-003_portfolios-tag-ids-and-portfolio-tags-removal.md) |
| REQ-004 | tags 마스터 HTTP API | Interface | Approved | High | Justin Ko | [req-004](./Interface/req-004_tags-http-api.md) |
| REQ-005 | 태그 적용·해제 HTTP API | Interface | Approved | High | Justin Ko | [req-005](./Interface/req-005_tag-apply-remove-http-api.md) |
| REQ-006 | portfolio_tags 데이터 마이그레이션 | Migration | Approved | High | Justin Ko | [req-006](./Migration/req-006_portfolio-tags-data-migration.md) |
| REQ-007 | pfhub tag CLI 명령어 | Interface | Approved | Medium | Justin Ko | [req-007](./Interface/req-007_pfhub-tag-cli.md) |
| REQ-008 | 태그 모델 도입 baseline 문서 갱신 | Documentation | Approved | Low | Justin Ko | [req-008](./Documentation/req-008_tag-baseline-docs-update.md) |
| REQ-009 | assets 테이블 스키마 도입 | Data | Approved | High | Justin Ko | [req-009](./Data/req-009_assets-table-schema.md) |
| REQ-001 | tags 마스터 테이블 도입 | Data | Implemented | High | Justin Ko | [req-001](./Data/req-001_tags-master-table.md) |
| REQ-002 | assets.tag_ids UUID[] 컬럼 추가 | Data | Implemented | High | Justin Ko | [req-002](./Data/req-002_assets-tag-ids-column.md) |
| REQ-003 | portfolios.tag_ids UUID[] 컬럼 추가 및 portfolio_tags 테이블 제거 | Data | Implemented | High | Justin Ko | [req-003](./Data/req-003_portfolios-tag-ids-and-portfolio-tags-removal.md) |
| REQ-004 | tags 마스터 HTTP API | Interface | Implemented | High | Justin Ko | [req-004](./Interface/req-004_tags-http-api.md) |
| REQ-005 | 태그 적용·해제 HTTP API | Interface | Implemented | High | Justin Ko | [req-005](./Interface/req-005_tag-apply-remove-http-api.md) |
| REQ-006 | portfolio_tags 데이터 마이그레이션 | Migration | Implemented | High | Justin Ko | [req-006](./Migration/req-006_portfolio-tags-data-migration.md) |
| REQ-007 | pfhub tag CLI 명령어 | Interface | Implemented | Medium | Justin Ko | [req-007](./Interface/req-007_pfhub-tag-cli.md) |
| REQ-008 | 태그 모델 도입 baseline 문서 갱신 | Documentation | Implemented | Low | Justin Ko | [req-008](./Documentation/req-008_tag-baseline-docs-update.md) |
| REQ-009 | assets 테이블 스키마 도입 | Data | Implemented | High | Justin Ko | [req-009](./Data/req-009_assets-table-schema.md) |
| REQ-010 | admin asset catalog CRUD | Interface | Approved | High | Justin Ko | [req-010](./Interface/req-010_admin-asset-catalog-crud.md) |
| REQ-011 | portfolios asset_id FK 추가 및 symbol/market 제거 | Data | Approved | High | Justin Ko | [req-011](./Data/req-011_portfolios-asset-id-fk-and-column-removal.md) |
| REQ-012 | portfolio 생성 CLI catalog 검증 | Interface | Approved | High | Justin Ko | [req-012](./Interface/req-012_portfolio-create-catalog-validation.md) |
| REQ-011 | portfolios asset_id FK 추가 및 symbol/market 제거 | Data | Implemented | High | Justin Ko | [req-011](./Data/req-011_portfolios-asset-id-fk-and-column-removal.md) |
| REQ-012 | portfolio 생성 CLI catalog 검증 | Interface | Implemented | High | Justin Ko | [req-012](./Interface/req-012_portfolio-create-catalog-validation.md) |
| REQ-013 | GET /v1/assets 토큰 타입별 분기 재정의 | Interface | Deprecated | High | Justin Ko | [req-013](./Interface/req-013_get-v1-assets-token-branching.md) |
| REQ-014 | portfolios 데이터 migration | Migration | Approved | High | Justin Ko | [req-014](./Migration/req-014_portfolios-data-migration.md) |
| REQ-015 | asset catalog 도입 baseline 문서 갱신 | Documentation | Approved | Low | Justin Ko | [req-015](./Documentation/req-015_asset-catalog-baseline-docs-update.md) |
| REQ-016 | client token 발급 경로 코드 폐지 | Interface | Approved | High | Justin Ko | [req-016](./Interface/req-016_client-token-issuance-deprecation.md) |
| REQ-017 | service-token rotate unique index 보강 | Migration | Approved | High | Justin Ko | [req-017](./Migration/req-017_service-token-rotate-unique-index-fix.md) |
| REQ-018 | POST /auth/service-tokens body daemon_id forward 보정 | Interface | Approved | High | Justin Ko | [req-018](./Interface/req-018_service-token-http-daemon-id-forward.md) |
| REQ-014 | portfolios 데이터 migration | Migration | Implemented | High | Justin Ko | [req-014](./Migration/req-014_portfolios-data-migration.md) |
| REQ-015 | asset catalog 도입 baseline 문서 갱신 | Documentation | Implemented | Low | Justin Ko | [req-015](./Documentation/req-015_asset-catalog-baseline-docs-update.md) |
| REQ-016 | client token 발급 경로 코드 폐지 | Interface | Implemented | High | Justin Ko | [req-016](./Interface/req-016_client-token-issuance-deprecation.md) |
| REQ-017 | service-token rotate unique index 보강 | Migration | Implemented | High | Justin Ko | [req-017](./Migration/req-017_service-token-rotate-unique-index-fix.md) |
| REQ-018 | POST /auth/service-tokens body daemon_id forward 보정 | Interface | Implemented | High | Justin Ko | [req-018](./Interface/req-018_service-token-http-daemon-id-forward.md) |
| REQ-019 | 토큰 surface baseline 문서 정합성 회복 | Documentation | Implemented | Medium | Justin Ko | [req-019](./Documentation/req-019_token-surface-baseline-docs-consistency.md) |
| REQ-020 | 토큰 발급 권한 매트릭스 정의 | Documentation | Implemented | Medium | Justin Ko | [req-020](./Documentation/req-020_token-issuance-authorization-matrix.md) |
| REQ-021 | 토큰 만료·회전 정책 정의 | Documentation | Implemented | Medium | Justin Ko | [req-021](./Documentation/req-021_token-expiry-and-rotation-policy.md) |
@@ -116,13 +116,8 @@
## Recent Change Log Summary
- 2026-05-21: REQ-010 Implemented → Approved (CHG-20260521-02) — REL-001 smoke 검증에서 GET /v1/assets가 dcy-001 시점 portfolio 조회 코드를 유지 중인 불일치 확인. dcy-003 옵션 B(REQ-013 Deprecation) 후속의 GET admin catalog 재정의를 본 REQ에 augmentation. AC-9~12 신설, app/api/v1_assets.py GET 라우트 재정의 + AssetCatalogListResponse 추가. BAT-002 verification 재실행 필요.
- 2026-05-21: REQ-001~018 (17건, REQ-013 제외) Approved → Implemented — BAT-001~006 confirm-req-implemented 일괄 전환. BAT-001(REQ-009/011/014), BAT-002(REQ-010/012/015), BAT-003(REQ-001/002/003/006), BAT-004(REQ-004/005), BAT-005(REQ-007/008), BAT-006(REQ-016/017/018). DB-integration ACs는 REL-001 배포 시 최종 확인 예정.
- 2026-05-21: REQ-030/031/032 Approved → Implemented — BAT-010 confirm-batch-verification 완료. 330/330 PASSED (32 신규 tests in test_v1_portfolios_tags_comments.py). GET /v1/portfolios/{id}/tags 신설; POST/DELETE tag disabled 409 + service/client 403 보강; comment CRUD 4종 신설; baseline 4종 갱신(interface-contract/runtime-flows/data-model/project-structure).
- 2026-05-21: REQ-025/026/027/028 Approved → Implemented — BAT-009 confirm-batch-verification 완료. 298 PASSED (0 failed). test_v1_portfolios_crud.py 22건(REQ-025/026/027), test_v1_portfolios_list.py 10건(REQ-028) 전 AC 통과.
- 2026-05-21: REQ-019/020/021/024 Approved → Implemented — BAT-008 confirm-batch-verification 완료. 모든 grep AC 통과, 사람 리뷰 완료. REQ-021 follow-up: session no_expiry 코드 enforcement 미구현 → 별도 처리. REQ-024 AC-5: staging dry-run은 release plan 단계로 이관.
- 2026-05-20: REQ-016~032 (17건) 일괄 Proposed → Approved 전환 — confirm-req 무인자 일괄 모드 실행, 승인 게이트(필수 필드/AC 구체성/Change Log) 모두 충족, blocker 없음. 각 REQ에 CHG-20260520-02 entry 추가
- 2026-05-20: REQ-025~032 최초 생성 — dcy-003 (User Portfolio Mutation v1 API 이전, confirmed 2026-05-20) 후 draft-req 실행. POST/PATCH/DELETE/GET /v1/portfolios + ledger path 이전 + tag/comment v1 + baseline 정합성 (FR-1~10 분해, FR-9는 REQ-013 Deprecated로 이미 처리됨)
- 2026-05-20: REQ-016~024 최초 생성 — dcy-004 (토큰 발급 및 관리 전면 정비, confirmed 2026-05-20) 후 draft-req 실행. client token 폐지 / rotate index 보강 / HTTP daemon_id forward / baseline 정합성 / 발급 권한 매트릭스 / TTL·회전 정책 / daemon deactivation 자동 revoke / NULL daemon 마이그레이션 CLI / env admin SOP
- 2026-05-20: REQ-013 Approved → Deprecated — dcy-003(confirmed 2026-05-20) 옵션 B(path 명명 분리) 결정으로 통합 endpoint 정의 무효화. 후속: `GET /v1/assets`는 REQ-010 보강으로 catalog 전용, `GET /v1/portfolios`는 dcy-003 draft-req 단계에서 신규 REQ로 작성
- 2026-05-19: REQ-001~015 전체 Proposed → Approved 전환 — confirm-req 일괄 승인; 승인 게이트(필수 필드, AC 구체성, Change Log) 모두 충족
- 2026-05-19: REQ-009~015 최초 생성 — dcy-001 (자산 관리 구조 재설계) confirm-discovery 후 draft-req 실행
- 2026-05-19: REQ-001~008 최초 생성 — dcy-002 (태그 소유권 및 적용 대상 정책) confirm-discovery 후 draft-req 실행