* feat: preserve ledger venue provenance * fix: satisfy ledger test lint ratchet * fix: advance image migration inventory
1.4 KiB
1.4 KiB
id, status
| id | status |
|---|---|
| ac-0039 | active |
Broker ledger venue API and persistence contract
Criterion
Broker ledger write는 optional nullable execution_venue와 order_venue를 수용해야 한다. execution_venue는 broker가 확인한 actual venue인 KRX, NXT 또는 NULL이고, order_venue는 original routing venue인 KRX, NXT, SOR 또는 NULL이다. Portfolio-hub는 두 값을 추정·상호 변환하지 않고 broker ledger row에 저장하며 POST의 new/duplicate 응답과 unified GET /v1/portfolios/{portfolio_id}/ledger broker item에서 그대로 반환해야 한다.
Verification
- 성공 조건:
(execution_venue=NULL, order_venue=SOR), KRX/NXT actual과 KRX/NXT/SOR order 조합이 POST→repository→실제 PostgreSQL→POST response→unified GET에서 동일하게 round-trip되고 OpenAPI가 두 nullable enum을 노출한다. - 실패·경계 조건:
execution_venue=SOR, AUTO 또는 미지원 값과order_venue=AUTO또는 미지원 값은422나 DB constraint로 거부되며, order venue·시간·default로 actual venue를 채우지 않는다. 필드 생략 request는 계속 유효하고 manual/corporate-action/historical item은 NULL을 반환할 수 있다. - 검사 방법: schema/OpenAPI·API·repository tests와 실제 PostgreSQL round-trip/check-constraint integration을 실행하고
LedgerEntry·request/response·unified mapper의 end-to-end field path를 검토한다.