docs(proofline): capture portfolio ledger discovery
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
---
|
||||
id: "ac-0032"
|
||||
status: active
|
||||
---
|
||||
|
||||
# Source-neutral portfolio ledger read
|
||||
|
||||
## Criterion
|
||||
|
||||
Portfolio owner는 `GET /v1/portfolios/{portfolio_id}/ledger`로 source 미지정 시 manual·broker를 포함한 모든 자기 portfolio 원장을 `recorded_at DESC, ledger_entry_id DESC` 순서로 조회할 수 있어야 한다.
|
||||
|
||||
## Verification
|
||||
|
||||
- mixed manual/broker 행이 최신순으로 반환되고 source 미지정이 모든 source를 포함한다.
|
||||
- 구현 평가: `tests/test_v1_portfolios_manual_ledger.py` 및 전체 회귀 `664 passed, 16 skipped`에서 확인됐다.
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
id: "ac-0033"
|
||||
status: active
|
||||
---
|
||||
|
||||
# Stable keyset pagination and fail-closed cursor
|
||||
|
||||
## Criterion
|
||||
|
||||
Unified ledger 목록은 `(recorded_at, ledger_entry_id)` keyset cursor로 동시각 행의 중복·누락 없이 page를 이어야 하며 cursor는 portfolio/source에 결속되고 malformed·tampered·scope mismatch는 HTTP 422이어야 한다.
|
||||
|
||||
## Verification
|
||||
|
||||
- cursor 경계, 변조 및 다른 source cursor 재사용은 각각 정확한 next page 또는 422을 반환한다.
|
||||
- 구현 평가: focused cursor 회귀와 전체 회귀 `664 passed, 16 skipped`에서 확인됐다.
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
id: "ac-0034"
|
||||
status: active
|
||||
---
|
||||
|
||||
# Canonical cross-source ledger representation
|
||||
|
||||
## Criterion
|
||||
|
||||
Unified ledger item은 canonical 대문자 `action`을 제공하고 internal `side`를 노출하지 않으며 source별로 없는 사실은 명시적 nullable schema 값으로 반환해야 한다.
|
||||
|
||||
## Verification
|
||||
|
||||
- manual/broker mixed 응답이 action casing과 nullable field 계약을 유지하고 OpenAPI가 해당 schema를 노출한다.
|
||||
- 구현 평가: focused schema/API regression 및 OpenAPI inspection으로 확인됐다.
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
id: "ac-0035"
|
||||
status: active
|
||||
---
|
||||
|
||||
# Owner-only unified read and manual compatibility
|
||||
|
||||
## Criterion
|
||||
|
||||
Unified ledger read는 user/session portfolio owner만 허용하고 타 owner와 service token을 거부하며 기존 `/ledger/manual`의 manual-only·latest-first·limit 계약을 유지해야 한다.
|
||||
|
||||
## Verification
|
||||
|
||||
- 타 owner/service token 거부, owner 허용 및 manual endpoint 하위호환 회귀를 실행한다.
|
||||
- 구현 평가: focused API/auth-surface `29 passed`, 전체 회귀 `664 passed, 16 skipped`에서 확인됐다.
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
id: "ac-0036"
|
||||
status: active
|
||||
---
|
||||
|
||||
# Unified ledger persistence and regression evidence
|
||||
|
||||
## Criterion
|
||||
|
||||
Unified ledger query는 portfolio/source keyset ordering에 맞는 PostgreSQL index migration을 제공하고 API/OpenAPI/repository 계약 회귀로 검증되어야 한다.
|
||||
|
||||
## Verification
|
||||
|
||||
- disposable PostgreSQL fresh upgrade가 head `20260820_0030`과 `idx_portfolio_ledger_portfolio_recorded_entry_desc` 생성을 확인하고 focused/full suite가 통과한다.
|
||||
- 구현 평가: fresh migration 확인 및 전체 회귀 `664 passed, 16 skipped`가 있다. 운영 규모 `EXPLAIN ANALYZE` latency 관찰은 비차단 후속이다.
|
||||
Reference in New Issue
Block a user