Files
portfolio-hub/.proofline/lines/line-0006/req-0006.md
T

1.6 KiB

id, status, discovery, criteria
id status discovery criteria
req-0006 approved dcy-0006
create update retire satisfy
ac-0032
ac-0033
ac-0034
ac-0035
ac-0036

포트폴리오 전체 원장 조회 API

Objective

Portfolio owner가 manual·broker를 포함한 모든 원장 source를 안정적이고 page 가능한 단일 read 계약으로 조회하도록 한다.

Scope

  • GET /v1/portfolios/{portfolio_id}/ledger의 source-neutral 목록, optional exact source, latest-first keyset pagination과 signed opaque cursor.
  • canonical uppercase action, nullable source-specific facts, owner-only authorization, OpenAPI/repository/index migration 및 회귀.

Constraints

  • 기존 /ledger/manual 계약을 변경하지 않는다.
  • cursor는 portfolio/source와 tuple ordering에 결속하며 잘못된 cursor는 fail-closed HTTP 422다.
  • source에 없는 사실을 0 또는 추정값으로 만들지 않는다.

현재 구현 평가

구현 commit ac742b1150832f6c1cf58744308b4f3ea6803fd4에서 이 REQ의 모든 AC 동작이 구현됐다. pytest -q는 664 passed, 16 skipped; focused API/release/auth-surface는 29 passed; disposable PostgreSQL fresh migration에서 20260820_0030과 index 생성을 확인했다. local main은 origin/main보다 1 commit ahead이며 push·PR·배포·릴리스는 수행하지 않았다. 이 평가는 구현 evidence이며 approved/active status는 normative authority다.

Non-Goals

Ledger write/reversal 실행, broker/strategy/outbox producer 변경, UI 구현, aggregate #28 변경, push·PR·배포·릴리스는 포함하지 않는다.