docs: record domain money contract evidence

This commit is contained in:
2026-08-25 22:31:24 +03:00
parent 68d975befd
commit 4dbff85654
+56
View File
@@ -7,6 +7,62 @@ delivery commits, точные verification commands с наблюдёнными
итог independent read-only review. Записи добавляются после archive и являются
неизменяемой историей поставки.
## 2026-08-25-align-domain-model-and-money-contract
**Change:** align-domain-model-and-money-contract (schema `wealth-ledger-sdd`)
**Archive path:** `specs/openspec/changes/archive/2026-08-25-align-domain-model-and-money-contract`
**Specs sync:** дельты `brokerage-account-upcoming-events`,
`brokerage-accounts`, `portfolio-view` и `project-documentation` слиты в main
specs; `openspec validate --specs --strict --store wealth-ledger-specs` —
`20 passed, 0 failed`.
### Delivery Map
| Area | Status | Outcome |
| --- | --- | --- |
| backend | affected | `UpcomingEventDto` заменил event-level `amount`/`currency` на nullable `projectedAmount` Money; mapping coupon/dividend/maturity возвращает Money, offer и неизвестная валюта возвращают `null`; focused tests покрывают новый contract |
| frontend | affected | OpenAPI snapshot/generated types синхронизированы; full events page, account overview recent events, hook tests и fixtures consume `projectedAmount` напрямую и сохраняют «Сумма неизвестна» для `null` |
| specs | affected | Delta specs синхронизированы в main specs, change заархивирован |
| docs | affected | Глоссарий и feature/system docs закрепляют Money, current-connection account accessibility, Portfolio Snapshot, Currency Instrument Position, Cash Balance и Future Cash Event terminology |
### Delivery commits
| Repo | Commit | Subject |
| --- | --- | --- |
| backend | `f1df1044623862770ecb40fd735e1aea08dc2a68` | feat: use money for upcoming event projections |
| frontend | `1fd9a3a861a8b915b6c64861a018db39e2598a83` | feat: consume money projected event amounts |
| specs | `039b72eed38b07e89e2f0234e7c12c202b6cf262` | docs(specs): archive domain money contract change |
| docs | `68d975befda90c198a0287bb8d43ac5d6e386eb5` | docs: align investment domain terminology |
### Verification
| Command (repo) | Наблюдённый результат |
| --- | --- |
| `npm test -- tbank/upcoming-events.service.spec.ts --runInBand` (backend, RED) | failed as expected before implementation because response lacked `projectedAmount`; later failed as expected for omitted currency until `null` behavior was implemented |
| `npm test -- tbank/upcoming-events.service.spec.ts --runInBand` (backend) | pass; 1 suite / 7 tests |
| `npm run lint && npm run typecheck:app && npm run typecheck:test && npm test -- --runInBand` (backend) | pass; Jest 22 suites / 71 tests |
| `PATH=/Users/ksv741/.nvm/versions/node/v22.21.0/bin:$PATH npm run verify` (backend) | pass; runtime/hygiene/lint/typecheck/Jest/build passed; Jest 22 suites / 71 tests |
| `VITE_API_BASE_URL=http://localhost:3001 npm run openapi:sync` (frontend) | pass; updated only OpenAPI snapshot and generated types for `UpcomingEventDto.projectedAmount` |
| `npm run test:run -- brokerage-event AccountEventsPage AccountPage.vm` (frontend, RED) | failed as expected before UI change because renderer still read old amount/currency fields |
| `npm run test:run -- brokerage-event AccountEventsPage AccountPage.vm` (frontend) | pass; 3 files / 6 tests |
| `npm run openapi:check && npm run typecheck` (frontend) | pass |
| `PATH=/Users/ksv741/.nvm/versions/node/v22.21.0/bin:$PATH npm run verify` (frontend) | pass; 21 test files / 67 tests, build and bundle budget passed |
| `PATH=/Users/ksv741/.nvm/versions/node/v22.21.0/bin:$PATH npm run verify` (docs) | pass; Node 22.21.0, markdownlint 35 files, 0 issues |
| `bash specs/scripts/verify-runtime-openapi.sh` (workspace) | pass; runtime SHA-256 = snapshot SHA-256 = `aa4db3d4d3bb5e6e4e8b6bf4641a2024d00c827ee612e09709c1b6fda75d3e50` |
| `PATH=/Users/ksv741/.nvm/versions/node/v22.21.0/bin:$PATH bash specs/scripts/verify-workspace-change.sh align-domain-model-and-money-contract` (workspace, pre-archive) | pass; Delivery Map verified frontend/backend/specs/docs=affected, runtime-openapi=required; all gates green |
| `openspec archive align-domain-model-and-money-contract --yes --store wealth-ledger-specs` (specs) | pass; archived as `2026-08-25-align-domain-model-and-money-contract`, 8 modified requirements applied |
| `openspec validate --specs --strict --store wealth-ledger-specs` (specs, post-archive) | pass; 20 passed, 0 failed |
| `bash scripts/verify-openspec-authority.sh` (specs, post-archive) | pass; OpenSpec CLI 1.10.0, authority `wealth-ledger-specs` |
### Independent read-only review
Verdict: **PASS**. Critical и Important findings отсутствовали. Reviewer
подтвердил, что breaking contract ограничен Future Cash Event projected amount,
backend не создаёт Money без валюты, frontend не читает removed
`event.amount`/`event.currency`, docs не стали параллельным SDD artifact, а
routes, storage, supported account policy, cache TTLs, sorting и upstream
sources не менялись.
## 2026-08-24-add-instrument-logos
**Change:** add-instrument-logos (schema `wealth-ledger-sdd`)